Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related PRs:
Description:
Symfony raises some deprecations while compiling the container, e.g. 8.2's deprecated
Symfony\Component\EventDispatcher\EventDispatcherInterfacealias referenced by league/oauth2-server-bundle's services. That happens in the first test that boots the kernel, and PHPUnit classifies every one of them as "third-party code calling into third-party code" (calleedeprecation-contracts/function.php, caller a Symfony compiler pass), whoever's config caused it. So withfailOnDeprecationa single vendor bundle fails CI in every package that boots it.ignoreIndirectDeprecations="true"isn't a way out either: for the same reason it also hides the ones the package's own config and compiler passes cause.IbexaTestKernel::initializeContainer()now runs insideContainerBuildDeprecationFilter, which decides who owns eachE_USER_DEPRECATEDraised while the container is built:AbstractRecursivePassprocesses (hidden.ids are kept, as they can belong to anyone).Deprecations owned by third-party code are dropped, the rest reach PHPUnit unchanged (same file and line, so baselines keep matching). Anything it can't attribute is kept, and runtime deprecations aren't touched. Every integration kernel extends
IbexaTestKernel, so packages don't need any change.What counts as ours is up to the
IBEXA_TEST_DEPRECATION_SCOPEenv variable:ibexa(default): the package itself, everything invendor/ibexa, and services with anibexaid or class;package: the package itself and services whose class is defined outsidevendor/, so deprecations owned by other Ibexa packages are dropped too. When a service's class can't be loaded, it falls back to theibexanaming rule.An unknown value throws. A package should only switch to
packageonce the packages it depends on fail on deprecations in their own integration tests, otherwise nothing catches theirs. Many integration configs don't setfailOnDeprecationyet (e.g. ibexa/core, payment, corporate-account, shipping).I checked it against copies of dam-user and checkout 6.0. league's 3 deprecations are gone from dam-user, and probes for our own config, our own compile-time code and our code calling a deprecated vendor API still fail in both scopes. checkout still reports the 8 caused by payment, corporate-account, fieldtype-address and shipping services with the default scope, and passes with
package.