Contao news

Read the official Contao announcements.

Recap of the first Contao Core Developers Meeting 2022

by Yanick Witschi – Current issues

Every year, the Contao Core development team meets twice for a short code sprint of three days. If you have read my review of the last meeting, you will know that we meet in Colmar in France at the moment.

Like last year, Corona also took its toll this year and so this time "we" includes everyone but me. I had to do without hugs and attended the meeting via remote communications while isolating at home.

Nevertheless, it is me again who tries to summarize the meeting for you. Still very much convinced that this will create a certain transparency regarding the future of Contao. The developers meetings are crucial for Contao and therefore I would like to point out - as always - that the Contao Association is funding these meetings. As a Supporter you can do your part.

And now for the elephant in the room.

Contao 5

The time has come, we are talking about a new major release. Traditionally, a new version number at the first position on the one hand fuels expectations. On the other hand, it fans fears:

  • "Will I be able to update all my customers' installations?"
  • "We have so many extensions in our agency, do we have to start from scratch everywhere?"
  • "Somehow we just got used to Contao 4, now Contao 5 is coming?"

I think you know these and other questions all too well. I therefore see it as my task in this blogpost to conquer your fears as well as to put your expectations into perspective.

One of the tasks for us as a core team is to plan for the future, and sometimes that means making perhaps rather uncomfortable and difficult decisions. An example of such a decision might be the switch to Symfony and Composer with Contao 4, which we made in 2015. Yes, you read that right: Contao 4 is already seven years old! We have not regretted the decision for a second. We have been able to implement countless features that would have been unthinkable without this complete architectural change. We would certainly not have two-factor authentication, command line commands, HTTP caching, Twig, or automated tests. Meanwhile, we have thousands of tests and the software quality of Contao increases with every release.

It is very important to me that every user of Contao understands the development process and can understand our reasoning and decisions.

Status quo

I will list a few facts below to give you a better idea of the starting situation before the meeting:

  • The current core team consists of 8 developers, all of whom work on Contao on a volunteer basis. The only exception is Leo, who is able to spend a part of his working hours on Contao thanks to the Contao partners.
  • What people often forget: About 80 % of the working time on Contao is maintenance work. Regular bug fixes, compatibility to current Symfony and PHP versions, adjustments to Continuous Integration (tests, coding style etc.). These are all things that are invisible to users and are often taken for granted. Of course, everyone expects Contao to simply be compatible with the latest PHP versions. But this means a lot of work for the core team. So if 80 % is booked for maintenance, only 20 % can be invested in the further development of Contao. Yes, the Pareto principle can be applied everywhere.
  • Contao 4 is Contao 3 with Symfony underpinnings and since then, in every new version of Contao 4, a little bit of of the old system is rebuilt and improved. A CMS like Contao, which has evolved over many years, cannot be rebuilt from scratch. We didn't have the manpower (or womanpower) to do that back then and this situation has not changed. The only way to modernize Contao is to take small steps with every new version.
  • With Contao 4, we committed to stick to Semantic Versioning. In simple words this means: When a developer has written code for Contao 4.4, it must still work in Contao 4.13. The removal of interfaces is only allowed with Contao 5. Consequently, with each new version of Contao, we also introduced new so-called "backwards compatibility layers". Layers of code that keep the old interfaces compatible with the new ones, so that the old code continues to work. We call these "BC layers" for short, and I will use this term for the rest of this blogpost.
  • Contao 4.13 contains roughly 700 such BC layers. In other words, since Contao 4.0, we have made improvements in 700 places and made sure that the old way still works. 700 is an incredibly high number when you consider that they were introduced over only 13 versions. According to Adam Ries, that adds up to over 50 improvements in each Contao version and we are only talking about developer interfaces here. We do not even talk about improvements for users at this point.
  • Contao 4.13 consists of about 270,000 lines of own PHP code without dependencies like Symfony and Co. In addition there is a lot of code in templates, CSS and JavaScript.

Contao 5 is just a number

The initial situation should clearly show what the problem is: The maintenance effort is immense and increases with every new Contao version. It does so, because suddenly both, the new code and the corresponding BC layer have to be maintained. So, for example, when a new PHP version is released, we have to keep both layers compatible.

Meanwhile, the year is 2022, Contao 4 will be seven years old in June and we are facing a huge mountain of BC layers. Or in my very own words: Folks, we are swamped with old code and desperately need some air to breathe! We need to get rid of a lot of this old ballast, otherwise we won't be able to maintain our ship anymore, and it will sink.

According to Semantic-Versioning, removing these BC layers forces us to release the next version as 5.0.

On the other hand, manpower does not suddenly fall into our laps just because we change the version number from 4 to 5. Contao 5 has not been developed behind the curtain for years by unknown volunteers and all of a sudden, we will get an API, a completely new back end or <insert your wish here>. It's still the same 8 core developers plus community members, who have been - and still are - busy maintaining and developing Contao 4.

Contao 5 is simply the next iteration. We will continue on the same path and modernize the code base step by step. So Contao 5 is just a number. It is basically Contao 4.14 without most of the BC layers and thus it has to be version 5. Period.

A bit boring? Yes, and we are proud of that. Contao is not fancy and follows every new trend, even if the temptation to do so regularly flashes up in the core team. We know the needs of our agencies, for whom stability and continuity are much more important than choosing from 20 different slider scripts, half of which will no longer be cool in a year's time.

Contao is reliable, realistic and focuses on quality and continuity instead of fanfares and confetti with every new release. Malicious gossip has it that Contao is just pretty German (and that includes the neighboring German-speaking countries).

Accordingly, the current work mainly includes the removal of BC layers in the current development branch for Contao 5, which at the time of this blog post already contains about 30,000 lines (!) less code than its counterpart for Contao 4.13. This already means a reduction by more than 10 % and we are far from being done!

No more Contao 3 modules?

In line with our credo of continuity, we do not simply remove all BC layers, but discuss them as a team and try to assess the impact. If we were to completely remove support for old Contao 3 modules in system/modules the update to Contao 5 would be extremely time-consuming. We want to avoid this, therefore this BC layer will not be removed in Contao 5 yet. However, it will not work without at least some adjustments. We have to make compromises and expect the same from our extension developers who also need to modernize their extensions step by step, just like Contao itself does.

What customizations will be necessary for the release of Contao 5 are documented in the UPGRADE.md which is located in the development branch of Contao 5.

How can I prepare myself?

Basically, all developers can search their extensions for used BC layers. The most important information about the deprecations can be found in the DEPRECATED.md in the respective development branch and they are also listed in the Symfony Profiler. Just navigate to "Logs" and then open the tab "Deprecations".

Furthermore, it is also recommended following the developments in the Monorepository.

In other news

Besides removing BC layers, the 8 developers have been busy as follows:

  • Martin: Faster functional tests, improvements to the reviseTable process, SQL theme import in back end (getting rid of our Install Tool), improve contao:migrate command (getting rid of our Install Tool)
  • Leo: back end theme improvements, integration of contao/test-case into the monorepository
  • David: implementation of the new Symfony security system introduced as experimental in Symfony 5.1
  • Fritz: Removal of the <base> tag and absolute links everywhere
  • Andy: Removal of MooTools in the Contao back end and replacement with vanilla JS
  • Jim: Generated Doctrine entities, which are still our plan for long term replacement of models, PHP8 attributes
  • Moritz: Twig, conversion of content elements to fragments
  • Yanick: Permissions in the DC_* drivers for the long term change from the checkPermission() onload_callbacks to Security Voters

In total, more than 50 Pull Requests have been created at the developers meeting and, as always, it has provided many impulses which will result in even more Pull Requests.

That's all, folks!

I hope I was able to ease your fears with this blog post and show you why at the end of the day, Contao 5 is just a number.

— Yanick

Show all news

Comments

Comment by Bob Burch |

Thanks Yanick, the Bright Cloud Studio team, in the United States, loves Contao. It really is the best CMS out there. Thank you all for your hard work.

Add a comment

What is the sum of 2 and 2?