You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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.
derrabus
changed the title
Tests fail because of forwards compatibility deprecations
CI fails because of forwards compatibility deprecations
Sep 6, 2019
…rabus, nicolas-grekas)
This PR was merged into the 4.3 branch.
Discussion
----------
Fix test fixtures with deprecated method signatures
| Q | A
| ------------- | ---
| Branch? | 4.3
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | #33483 (partly)
| License | MIT
| Doc PR | N/A
This PR upgrades two fixtures that implemented deprecated method signatures. As far as I can tell, they are used in tests that do not specifically test legacy behavior, so the fixtures should be up to date. Currently, these fixtures cause failing tests on the 4.4 branch.
Commits
-------
cc3e3d5 Fix more bad tests
592aacf Fix test fixtures with deprecated method signatures.
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.
@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…How to reproduce
https://travis-ci.org/symfony/symfony/jobs/581278283
Possible Solution
DebugClassLoader
will skip checks on them.ping @nicolas-grekas
The text was updated successfully, but these errors were encountered: