Sulu Release 2.5.20 & 2.6.4
We are excited to announce numerous new releases from the last weeks. The Sulu core packages received plenty of fixes and improvements. The following releases were tagged:
- sulu/sulu 2.5.20
- sulu/sulu 2.6.4
- sulu/article-bundle 2.6.1
- sulu/redirect-bundle 2.1.4
- sulu/comment-bundle 2.0.2
- sulu/form-bundle 2.5.4
- sulu/headless-bundle 0.10.3
- sulu/content-bundle 0.8.0
- sulu/theme-bundle 3.1.1
Besides performance improvements and fixes, these releases bring Symfony 7 support to the Sulu core and bundles.
Symfony 7 support
Supporting a new major version of a package can always be a challenge, while own code is adopted fast we still need to make sure that our own dependencies are also already compatible with the new Symfony 7 version. Over the last year, we and our whole community contributed to various PHP packages to make Symfony 7 compatibility possible. This included packages like SyliusThemeBundle, different PHPCR packages, and many more. A big thank you to the whole PHP and Symfony communities, who worked together to keep third-party packages and bundles up-to-date with the latest Symfony version.
![The Symfony 7 Upgrade issue Symfony 7 Upgrade](/uploads/media/960x/06/536-symfony-7-issue.gif?v=1-0)
We always want to make sure that Sulu is up-to-date with the latest Symfony version, still we don't want to force the upgrade when not required. We are happy that you can use the latest Sulu version with Symfony 5, Symfony 6 and now Symfony 7. This provides projects a longer time to do their upgrade. We also recommend doing Sulu, Symfony and PHP version upgrade always as separate tasks. Doing them all at once is usually more difficult, especially if you run into any production issues after the upgrade, and it will be much harder to find out which upgrade did cause it. Anyone who needs to upgrade their own library and projects can also take a look at the Symfony 7 upgrade issue that lists many links to different upgrade tasks. We hope this helps also others to tackle their upgrades.
Stricter Media Download and Image generation validation
In previous releases, the filename of a media file was not kept for the validation of the download and image formats URLs. While Sulu always generated the same URLs, some manually linked to the wrong files, which could cause increased resource usage on the servers. To avoid such performance issues, we now force that URLs always must also match the filename.
Improvement Http Cache layer and changes of s-maxage handling
Accidentally, the image format generation / thumbnail generation was also stored in the HttpCache directory. These files are normally directly written to the public directory or cached in a cloud setup in an own reverse proxy cache. The current behavior of caching was accidentally hit as such responses have an s-maxage cache-control header directive defined.
It was never the expected behavior by Sulu caching based on s-maxage header, Sulu always used for its internal server-side caching a custom X-Reverse-Proxy-TTL header. The new version correctly skips the s-maxage header and no longer double-caches large media files. This should improve the HTTP cache size a lot.
If you want to cache a custom public response, make sure that you are defining cache lifetime via:
$response->headers->set(SuluHttpCache::HEADER_REVERSE_PROXY_TTL, $cacheLifetime);
Code cleanups and more
A big thank you to our contributors who are working to update Sulu core code to use new PHP features like constructor property promotion, and to the latest version of PHPUnit, and more.
What is coming next?
Currently, we are working on a whole rewrite of the SuluArticleBundle without PHPCR and without Elasticsearch. It is based on our new ContentBundle which will replace PHPCR in Sulu 3.0.
We are happy to hear your feedback about newly released features and bug fixes. Feel free to create an issue or a discussion on GitHub for bugs and feature requests. You can also contact us via Slack or our website anytime.