[DependencyInjection] Deprecate scope concept#14984
[DependencyInjection] Deprecate scope concept#14984fabpot merged 1 commit intosymfony:2.8from dosten:dependency-injection/deprecate-scope-concept
Conversation
|
You need to make sure that core code does not trigger such deprecation though (for the and the loaders should trigger their own deprecations when using |
|
@stof The only cases in the core code are the |
|
@dosten As you can see on Travis, there are still many tests that need to be moved as legacy ones. For the |
|
@fabpot Thank you for your feedback, I didn't have enough time to continue with this PR. I'll work on this soon. |
|
I've added a initial implementation of a |
|
I can't trigger an error on the methods of the |
|
@dosten I was indeed refering to the old |
|
|
|
@fabpot This PR is ready to be reviewed. |
|
👍 good job |
There was a problem hiding this comment.
Do we really want to cast here? The docblock is explicit about the expected type.
There was a problem hiding this comment.
We actually cast in the other methods of the Definition class
|
👍 |
|
@fabpot Comments addressed |
|
Thank you @dosten. |
This PR was merged into the 2.8 branch. Discussion ---------- [DependencyInjection] Deprecate scope concept | Q | A | ------------- | --- | Bug fix? | no | New feature? | yes | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | License | MIT This PR mark as deprecated the concept of scopes in the DI container. See #10557 (comment). Also adds a new `shared` flag to the service definitions in replacement of the `prototype` scope. Commits ------- 6c4a676 Add "shared" flag and deprecate scopes concept
There was a problem hiding this comment.
the deprecation message should mention the service id IMO to make it easier to understand
…outerJ) This PR was merged into the 2.8 branch. Discussion ---------- Added minimal cookbook article about the shared flag | Q | A | --- | --- | Doc fix? | no | New docs? | yes (symfony/symfony#14984) | Applies to | 2.8+ | Fixed tickets | #5437 Commits ------- 943ee0c Added minimal cookbook article about shared
This PR mark as deprecated the concept of scopes in the DI container. See #10557 (comment).
Also adds a new
sharedflag to the service definitions in replacement of theprototypescope.