[FFe] Symfony 6

Bug #2057636 reported by Athos Ribeiro
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
php-symfony-contracts (Ubuntu)
Fix Committed
Undecided
Athos Ribeiro
symfony (Ubuntu)
Fix Committed
Undecided
Athos Ribeiro

Bug Description

Debian started the Symfony 6 transition after Ubuntu's Feature Freeze started. This is an upstream LTS releases to be maintained until November, 2027 (https://symfony.com/releases/6.4). Ubuntu currently has symfony 5, which will reach its EOL on November, 2025 (https://symfony.com/releases/5.4).

Symfony is not only a PHP web framework, but a (large) set of re-usable libraries.

PHP Standard Recommendations (PSR) are specifications that aim to standardize programming concepts and techniques in PHP.

The php-psr-* set of packages is used to enforce such specifications through the interfaces those packages expose to their users.

Symfony 5.x depends on versions 1.x of the php-psr-* stack.

When Ubuntu transitioned to PHP 8 ahead of Debian, back in Jammy, some of the php-psr-* stack was updated to versions 2.x or 3.x.

Several PHP packages were patched back then to adapt to the new psr stack, including symfony. However, symfony 5.x is not compatible with the new PSR stack and the patches left some of the package features broken.

Moreover, here is the changelog for our current symfony delta:

    - d/rules: Disable running phpunit testsuite during build.
    - d/p/implement-psr-log-3.patch: Implement psr/log 3
    - d/p/implement-psr-link-2.patch: Implement psr/link2 for php8.1
    - d/p/implement-psr-container-2.patch: Allow php-psr-container 2.0.2
    - d/p/implement-psr-cache-3.patch: Allow php-psr-cache 3.0 for php8.1
    - d/t/control: Mark tests flaky for now due to remaining php8.1
      inadequacies.

As one can see, despite all the compatibility patches being added, the fact that the test suite needed to be completely disable should suffice to show the package is currently not php-psr-* > 1 compatible.

With the Debian transition going on, this seems to be a great opportunity to fix the situation for noble.

It is also worth mentioning that, since auto-sync was still enabled for a while after feature freeze, some new package versions required for the symfony 6 transition ended up being sync'd already.

Finally, I staged part of the transition in a PPA at
https://launchpad.net/~athos-ribeiro/+archive/ubuntu/symfony6-attempt1/+packages, where you can find the build logs for symfony at
https://launchpadlibrarian.net/718957076/buildlog_ubuntu-noble-amd64.symfony_6.4.5+dfsg-3~ppa4_BUILDING.txt.gz.

This was needed so we could figure out how to deal with the symfony circular dependencies so we could get a proper symfony 6 build if/once this is approved.

Here are the steps we will need to take (not considering potential test failures):

- Remove the php-symfony-contracts >=3 hard requirement to get a first symfony6 build in the archive
  * d/control: remove php-symfony-contracts version requirement to get a first
    symfony6 build in the archive.
  * d/rules: do not run test suite during build.
- Introduce php-symfony-contracts 3 in the archive
- No-change rebuild symfony with php-symfony-contracts 3
- Revert the symfony changes introduced above, and patch symfony to build with the latest version of libicu (the patch is already available in the PPA linked above).
- Check reverse dependencies for pinned symfony versions, to ensure they are all ready for symfony 6.

For now, we need a FFe to update both
* symfony; and
* php-symfony-contracts.

The upstream changelogs are attached as comments to this bug.

This is the list of reverse dependencies which will need to be checked:

composer
doctrine
gregwar-captcha
libphp-swiftmailer
pdepend
php-async-aws-core
php-composer-class-map-generator
php-doctrine-annotations
php-doctrine-cache
php-doctrine-data-fixtures
php-doctrine-dbal
php-doctrine-persistence
php-embed
php-fruitcake-php-cors
php-giggsey-locale
php-league-commonmark
php-monolog
php-nyholm-psr7
php-oscarotero-gettext
php-phpstan-phpdoc-parser
php-proxy-manager
php-symfony-mercure
php-symfony-mercure-bundle
php-symfony-polyfill
php-symfony-security-acl
php-tijsverkoyen-css-to-inline-styles
php-twig
phpmyadmin
phpmyadmin-motranslator
phpunit-diff
tweeper

== Where problems could occur? ==

While we playd the builds in a PPA to ensure we can rapidly untangle the circular dependencies for symfony, we did not play its migration. We may need additional FFes in the PHP stack to complete symfony's migration (or to request removals). If that is needed, we will add additional components to this bug with the additional requests.

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

This is symfony's changelog. I parsed the entries for the versions being introduced and only fetched the entries listed as new features here.

Revision history for this message
Athos Ribeiro (athos-ribeiro) wrote :

This is the php-symfony-contracts changelog.

description: updated
description: updated
description: updated
Revision history for this message
Utkarsh Gupta (utkarsh) wrote :

Hey Athos, thanks for raising this up.

Honestly, I hate the fact we have to do it after FF but I guess it is how it is. I know symfony can be annoying and so on but I guess, the only way is to JFDI. :)

After assessing, I think the benefit to cost ratio is positive and I feel it's worth doing this now. Worst case, we can roll back the version if we think we're having too much difficulty getting things migrated.

So I think let's do this! Please consider this as an FFe approval. Go ahead with the upload. :)

Changed in symfony (Ubuntu):
status: New → Triaged
Utkarsh Gupta (utkarsh)
Changed in php-symfony-contracts (Ubuntu):
status: New → Triaged
Changed in php-symfony-contracts (Ubuntu):
status: Triaged → Fix Committed
Changed in symfony (Ubuntu):
status: Triaged → Fix Committed
Changed in php-symfony-contracts (Ubuntu):
assignee: nobody → Athos Ribeiro (athos-ribeiro)
Changed in symfony (Ubuntu):
assignee: nobody → Athos Ribeiro (athos-ribeiro)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.