[Contracts] Rename ServiceSubscriberTrait to ServiceMethodsSubscriberTrait#54496
Merged
fabpot merged 1 commit intosymfony:7.1from Apr 5, 2024
Merged
Conversation
7f17197 to
caaa488
Compare
stof
requested changes
Apr 5, 2024
caaa488 to
8f47ced
Compare
stof
approved these changes
Apr 5, 2024
Member
|
Thank you @nicolas-grekas. |
Contributor
|
This PR seems to break the |
Member
|
@MatTheCat fixed now after the sub-tree split for the service contracts was synchronised |
GromNaN
reviewed
Apr 10, 2024
javiereguiluz
added a commit
to symfony/symfony-docs
that referenced
this pull request
Apr 10, 2024
…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 #19755 Related code change: symfony/symfony#54496 Commits ------- f17331c ServiceSubscriberTrait is deprecated and replaced by ServiceMethodsSubscriberTrait
Merged
xabbuh
added a commit
that referenced
this pull request
Oct 10, 2024
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 | MIT Since #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 deprecated Commits ------- fbfeefe add missing properties
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.
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