Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a594b9f

Browse files
committed
feature #16424 [DI] Deprecate ContainerAware in favor of ContainerAwareTrait (nicolas-grekas)
This PR was merged into the 2.8 branch. Discussion ---------- [DI] Deprecate ContainerAware in favor of ContainerAwareTrait | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | no | Deprecations? | yes | Tests pass? | yes | Fixed tickets | n/a | License | MIT | Doc PR | - To be merged before #16411 (that then should be rebased) if we agree that this is the right approach (which I believe personally). The deprecation notice will be triggered by the existing mechanism in the DebugClassLoader (it can't be added inline because that would make symfony itself trigger it). PHP 5.3 users migrating to 3.0 must already move to 2.8+5.5 beforehand so this is really on the CUP (Continuous Upgrade Path). Commits ------- 807ebac [DI] Deprecate ContainerAware in favor of ContainerAwareTrait
2 parents 4fd60aa + 807ebac commit a594b9f

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/Symfony/Component/DependencyInjection/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
2.8.0
55
-----
66

7+
* deprecated the abstract ContainerAware class in favor of ContainerAwareTrait
78
* deprecated IntrospectableContainerInterface, to be merged with ContainerInterface in 3.0
89
* allowed specifying a directory to recursively load all configuration files it contains
910
* deprecated the concept of scopes

src/Symfony/Component/DependencyInjection/ContainerAware.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
* A simple implementation of ContainerAwareInterface.
1616
*
1717
* @author Fabien Potencier <[email protected]>
18+
*
19+
* @deprecated since version 2.8, to be removed in 3.0. Use the ContainerAwareTrait instead.
1820
*/
1921
abstract class ContainerAware implements ContainerAwareInterface
2022
{

0 commit comments

Comments
 (0)