Skip to content

CI fails because of forwards compatibility deprecations #33483

Closed
@derrabus

Description

@derrabus

Symfony version(s) affected: 4.4-dev

Description
#33430 taught DebugClassLoader to detect deprecated method signatures in classes that aren't autoloaded. Tests on the 4.4 branch are currently deep red because of this.

The feature is problematic because it also affects fixtures that intentionally have an old signature because we want to make sure that such classes can still be used.

  • Adding @group legacy to the test cases does not always help: If the fixture classes is defined in the same file as the test case, it is loaded before the test is even executed. Of course, we could move the class to a dedicated php file, but…
  • Those fixture classes are usually used for tests that already test for a deprecation message. Adding another one isn't helpful in that case.

How to reproduce
https://travis-ci.org/symfony/symfony/jobs/581278283

Possible Solution

  • It is in most cases possible to work around the issue by using an anonymous class as fixture. DebugClassLoader is not (yet?) able to check those. But that feels like a dirty workaround.
  • Maybe we can come up with a way to way to mark those classes so that DebugClassLoader will skip checks on them.

ping @nicolas-grekas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions