8000 feature #15347 [DependencyInjection][3.0] Add initialized to containe… · symfony/symfony@23919ab · GitHub
[go: up one dir, main page]

Skip to content

Commit 23919ab

Browse files
committed
feature #15347 [DependencyInjection][3.0] Add initialized to container interface (znerol)
This PR was merged into the 3.0-dev branch. Discussion ---------- [DependencyInjection][3.0] Add initialized to container interface | Q | A | ------------- | --- | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | #15346 | License | MIT | Doc PR | - Commits ------- bfddac3 [DependencyInjection] Add initialized() to the ContainerInterface
2 parents 803144d + bfddac3 commit 23919ab

File tree

3 files changed

+13
-9
lines changed

3 files changed

+13
-9
lines changed

src/Symfony/Component/DependencyInjection/Container.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
*
6262
* @api
6363
*/
64-
class Container implements IntrospectableContainerInterface, ResettableContainerInterface
64+
class Container implements ResettableContainerInterface
6565
{
6666
/**
6767
* @var ParameterBagInterface

src/Symfony/Component/DependencyInjection/ContainerInterface.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ public function get($id, $invalidBehavior = self::EXCEPTION_ON_INVALID_REFERENCE
7272
*/
7373
public function has($id);
7474

75+
/**
76+
* Check for whether or not a service has been initialized.
77+
*
78+
* @param string $id
79+
*
80+
* @return bool true if the service has been initialized, false otherwise
81+
*/
82+
public function initialized($id);
83+
7584
/**
7685
* Gets a parameter.
7786
*

src/Symfony/Component/DependencyInjection/IntrospectableContainerInterface.php

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,10 @@
1616
* for containers, allowing logic to be implemented based on a Container's state.
1717
*
1818
* @author Evan Villemez <evillemez@gmail.com>
19+
*
20+
* @deprecated Since version 3.0, to be removed in 4.0. Use ContainerInterface
21+
* instead.
1922
*/
2023
interface IntrospectableContainerInterface extends ContainerInterface
2124
{
22-
/**
23-
* Check for whether or not a service has been initialized.
24-
*
25-
* @param string $id
26-
*
27-
* @return bool true if the service has been initialized, false otherwise
28-
*/
29-
public function initialized($id);
3025
}

0 commit comments

Comments
 (0)
0