Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork9.7k
[Contracts] Rename ServiceSubscriberTrait to ServiceMethodsSubscriberTrait#54496
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
[Contracts] Rename ServiceSubscriberTrait to ServiceMethodsSubscriberTrait#54496
Uh oh!
There was an error while loading.Please reload this page.
Conversation
7f17197 tocaaa488CompareUh oh!
There was an error while loading.Please reload this page.
caaa488 to8f47cedComparefabpot commentedApr 5, 2024
Thank you@nicolas-grekas. |
MatTheCat commentedApr 9, 2024
This PR seems to break the |
xabbuh commentedApr 9, 2024
@MatTheCat fixed now after the sub-tree split for the service contracts was synchronised |
Uh oh!
There was an error while loading.Please reload this page.
…ated and replaced by `ServiceMethodsSubscriberTrait` (GromNaN)This PR was merged into the 7.1 branch.Discussion----------[DependencyInjection] `ServiceSubscriberTrait` is deprecated and replaced by `ServiceMethodsSubscriberTrait`Fix#19755Related code change:symfony/symfony#54496Commits-------f17331c ServiceSubscriberTrait is deprecated and replaced by ServiceMethodsSubscriberTrait
This PR was merged into the 7.1 branch.Discussion----------[Contracts] add missing properties| Q | A| ------------- | ---| Branch? | 7.1| Bug fix? | no| New feature? | no| Deprecations? | no| Issues || License | MITSince#54496 the property is no longer part of the `ServiceSubscriberTrait` triggering a PHP deprecation like:> Creation of dynamic property Symfony\Contracts\Tests\Service\LegacyTestService::$container is deprecatedCommits-------fbfeefe add missing properties
Uh oh!
There was an error while loading.Please reload this page.
As described in the linked PR, AbstractController is incompatible with ServiceSubscriberTrait because of the added type to the AbstractController::$container property, while ServiceSubscriberTrait's $container property cannot have a type without a BC break.
There are two parts to this PR:
trait will create a dynamic property. Those are deprecated, but since the trait is also deprecated, the upgrade path is clear.
I also tried to improve the description of the trait in the meantime.
/cc@kbond