diff --git a/src/Symfony/Component/DependencyInjection/Container.php b/src/Symfony/Component/DependencyInjection/Container.php index 450e2e33ed..603c560fbb 100644 --- a/src/Symfony/Component/DependencyInjection/Container.php +++ b/src/Symfony/Component/DependencyInjection/Container.php @@ -20,6 +20,7 @@ use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; use Symfony\Component\DependencyInjection\ParameterBag\EnvPlaceholderParameterBag; use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBagInterface; +use Symfony\Contracts\Service\ResetInterface; /** * Container is a dependency injection container. @@ -42,6 +43,7 @@ class Container implements ResettableContainerInterface { protected $parameterBag; protected $services = array(); + protected $privates = array(); protected $fileMap = array(); protected $methodMap = array(); protected $factories = array(); @@ -301,7 +303,18 @@ class Container implements ResettableContainerInterface */ public function reset() { - $this->services = $this->factories = array(); + $services = $this->services + $this->privates; + $this->services = $this->factories = $this->privates = array(); + + foreach ($services as $service) { + try { + if ($service instanceof ResetInterface) { + $service->reset(); + } + } catch (\Throwable $e) { + continue; + } + } } /** diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index 2e7a40285f..de426d6e54 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -960,11 +960,6 @@ class $class extends $baseClass private \$parameters; private \$targetDirs = array(); - /*{$this->docStar} - * @internal but protected for BC on cache:clear - */ - protected \$privates = array(); - public function __construct() { @@ -1011,12 +1006,6 @@ EOF; $code .= <<privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php index af5fa0c680..ce0f6d101c 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php +++ b/src/Symfony/Component/DependencyInjection/Tests/ContainerTest.php @@ -17,6 +17,7 @@ use Symfony\Component\DependencyInjection\Container; use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag; use Symfony\Component\DependencyInjection\ParameterBag\ParameterBag; +use Symfony\Contracts\Service\ResetInterface; class ContainerTest extends TestCase { @@ -317,11 +318,19 @@ class ContainerTest extends TestCase public function testReset() { $c = new Container(); - $c->set('bar', new \stdClass()); + $c->set('bar', $bar = new class() implements ResetInterface { + public $resetCounter = 0; + + public function reset() + { + ++$this->resetCounter; + } + }); $c->reset(); $this->assertNull($c->get('bar', ContainerInterface::NULL_ON_INVALID_REFERENCE)); + $this->assertSame(1, $bar->resetCounter); } /** diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php index a6b9962b3d..73f1bfd475 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_constructor_without_arguments.php @@ -21,11 +21,6 @@ class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tes private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { parent::__construct(); @@ -36,12 +31,6 @@ class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tes $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php index e513fd7219..67d00b7618 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_mandatory_constructor_arguments.php @@ -21,11 +21,6 @@ class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tes private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -33,12 +28,6 @@ class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tes $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php index 84986f1638..770b478e48 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_with_optional_constructor_arguments.php @@ -21,11 +21,6 @@ class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tes private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { parent::__construct(); @@ -36,12 +31,6 @@ class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tes $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_without_constructor.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_without_constructor.php index 0a4975b7da..23a361ff11 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_without_constructor.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/custom_container_class_without_constructor.php @@ -21,11 +21,6 @@ class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tes private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -33,12 +28,6 @@ class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tes $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php index a04d80affc..a03fa75674 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1-1.php @@ -21,11 +21,6 @@ class Container extends \Symfony\Component\DependencyInjection\Dump\AbstractCont private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -33,12 +28,6 @@ class Container extends \Symfony\Component\DependencyInjection\Dump\AbstractCont $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1.php index f25c59b815..c6ac23dd82 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services1.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -31,12 +26,6 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php index 31c4475ec7..0ede68b20d 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->parameters = $this->getDefaultParameters(); @@ -36,12 +31,6 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php index d4f872f944..1ec6a194e6 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $dir = __DIR__; @@ -40,12 +35,6 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php index 8c90280d27..8eaac031bf 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -34,12 +29,6 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php index 673c9d54bb..8bb9c72e33 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services19.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -35,12 +30,6 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php index 090a77dd3c..d8072f822a 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services24.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -34,12 +29,6 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php index f6e8d69184..0675c4a989 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services26.php @@ -19,11 +19,6 @@ class Symfony_DI_PhpDumper_Test_EnvParameters extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $dir = __DIR__; @@ -41,12 +36,6 @@ class Symfony_DI_PhpDumper_Test_EnvParameters extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services33.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services33.php index 1c70b0ee8d..72cb664cbb 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services33.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services33.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -35,12 +30,6 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php index eeeb37a072..6b3d3432a1 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services8.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->parameters = $this->getDefaultParameters(); @@ -33,12 +28,6 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt index 5353c7ef69..5bf6366c1c 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_as_files.txt @@ -377,11 +377,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct(array $buildParameters = array(), $containerDir = __DIR__) { $dir = $this->targetDirs[0] = \dirname($containerDir); @@ -432,12 +427,6 @@ class ProjectServiceContainer extends Container ); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php index eca262220b..b9560ffb2b 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->parameters = $this->getDefaultParameters(); @@ -64,12 +59,6 @@ class ProjectServiceContainer extends Container ); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php index d6f1d6b118..306270b2d5 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_private.php @@ -19,11 +19,6 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -45,12 +40,6 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Private extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php index 42c09d33f5..a1f6a345e3 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_almost_circular_public.php @@ -19,11 +19,6 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -52,12 +47,6 @@ class Symfony_DI_PhpDumper_Test_Almost_Circular_Public extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_array_params.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_array_params.php index d72e6fd000..f2943bc25d 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_array_params.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_array_params.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $dir = __DIR__; @@ -40,12 +35,6 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_base64_env.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_base64_env.php index 8af802f70d..9de944f511 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_base64_env.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_base64_env.php @@ -19,11 +19,6 @@ class Symfony_DI_PhpDumper_Test_Base64Parameters extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->parameters = $this->getDefaultParameters(); @@ -33,12 +28,6 @@ class Symfony_DI_PhpDumper_Test_Base64Parameters extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_csv_env.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_csv_env.php index 99215f5fd6..b183c845b6 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_csv_env.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_csv_env.php @@ -19,11 +19,6 @@ class Symfony_DI_PhpDumper_Test_CsvParameters extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->parameters = $this->getDefaultParameters(); @@ -33,12 +28,6 @@ class Symfony_DI_PhpDumper_Test_CsvParameters extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_proxy.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_proxy.php index 1653e6ef73..18f3afb998 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_proxy.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_dedup_lazy_proxy.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -35,12 +30,6 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_env_in_id.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_env_in_id.php index 4100dcdd2b..1a19bbb335 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_env_in_id.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_env_in_id.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->parameters = $this->getDefaultParameters(); @@ -37,12 +32,6 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_errored_definition.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_errored_definition.php index ddc5dc59da..b0506aae7a 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_errored_definition.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_errored_definition.php @@ -19,11 +19,6 @@ class Symfony_DI_PhpDumper_Errored_Definition extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->parameters = $this->getDefaultParameters(); @@ -64,12 +59,6 @@ class Symfony_DI_PhpDumper_Errored_Definition extends Container ); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_requires.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_requires.php index 7a882f4461..8a514c604c 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_requires.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_inline_requires.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $dir = __DIR__; @@ -49,12 +44,6 @@ class ProjectServiceContainer extends Container }; } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_json_env.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_json_env.php index dd2930a424..d6b3d1ae01 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_json_env.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_json_env.php @@ -19,11 +19,6 @@ class Symfony_DI_PhpDumper_Test_JsonParameters extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->parameters = $this->getDefaultParameters(); @@ -33,12 +28,6 @@ class Symfony_DI_PhpDumper_Test_JsonParameters extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_locator.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_locator.php index 59bbce3a99..4edbb3d7cd 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_locator.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_locator.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -41,12 +36,6 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy.php index cd5707ef29..24bca7e35b 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_non_shared_lazy.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -34,12 +29,6 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_frozen.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_frozen.php index 86315e2eba..1fe2259fa8 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_frozen.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_frozen.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -35,12 +30,6 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_in_expression.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_in_expression.php index 2ae3645803..1d2a3b21b8 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_in_expression.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_private_in_expression.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -34,12 +29,6 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_rot13_env.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_rot13_env.php index 7a334c41a6..4746f38d10 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_rot13_env.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_rot13_env.php @@ -19,11 +19,6 @@ class Symfony_DI_PhpDumper_Test_Rot13Parameters extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->parameters = $this->getDefaultParameters(); @@ -37,12 +32,6 @@ class Symfony_DI_PhpDumper_Test_Rot13Parameters extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_service_locator_argument.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_service_locator_argument.php index eeeb0ce9b0..26d4ad6be1 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_service_locator_argument.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_service_locator_argument.php @@ -19,11 +19,6 @@ class Symfony_DI_PhpDumper_Service_Locator_Argument extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -38,12 +33,6 @@ class Symfony_DI_PhpDumper_Service_Locator_Argument extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php index 8df578eb0b..fed44d6bb7 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_subscriber.php @@ -19,11 +19,6 @@ class ProjectServiceContainer extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -35,12 +30,6 @@ class ProjectServiceContainer extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.'); diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_uninitialized_ref.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_uninitialized_ref.php index 0f5090c80b..828266d6bc 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_uninitialized_ref.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_uninitialized_ref.php @@ -19,11 +19,6 @@ class Symfony_DI_PhpDumper_Test_Uninitialized_Reference extends Container private $parameters; private $targetDirs = array(); - /** - * @internal but protected for BC on cache:clear - */ - protected $privates = array(); - public function __construct() { $this->services = $this->privates = array(); @@ -36,12 +31,6 @@ class Symfony_DI_PhpDumper_Test_Uninitialized_Reference extends Container $this->aliases = array(); } - public function reset() - { - $this->privates = array(); - parent::reset(); - } - public function compile() { throw new LogicException('You cannot compile a dumped container that was already compiled.');