Skip to content

Compatibility with Symfony 5.4 #4495

@dunglas

Description

@dunglas

Symfony 5.4 will require adding types to our codebase.
To prevent deprecation errors, we must add @return PHPDoc annotations where needed in our 2.6 branch.
In 3.0, we'll have to add real return types.

Symfony provides an automated tool to do this: symfony/symfony#43021

  1. Run the automated tool on 2.6 to add the annotations
  2. Run the test suite to check if all deprecations have been fixed. Report to Symfony and fix it otherwise
  3. Merge 2.6 in 2.7
  4. Run the script in 3.0 to convert annotations in real types

Maybe that we'll have to bump the minimal version of PHP to 7.2 to do that (in the 2.6 branch).
We'll also bump the minimal version of Symfony to 4.4 for all components (in 2.6).
We'll also have to remove the unused backward compatibility code thanks to the version bump (look for the calls to class_exists() and method_exists).

I started to work on this in #4479. However, I didn't notice the script provided by Symfony.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions