From 12c1a01ac0f3441eecddae6990fb2c37725a1118 Mon Sep 17 00:00:00 2001 From: Nicolas Grekas Date: Sun, 4 Feb 2018 15:28:36 +0100 Subject: [PATCH] fix merge --- ...er_class_constructor_without_arguments.php | 24 +++++++++++-------- ...s_with_mandatory_constructor_arguments.php | 24 +++++++++++-------- ...ss_with_optional_constructor_arguments.php | 24 +++++++++++-------- ...om_container_class_without_constructor.php | 24 +++++++++++-------- 4 files changed, 56 insertions(+), 40 deletions(-) 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 3020602b89..01caae6489 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,21 +21,24 @@ 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(); - $this->services = array(); + $this->services = $this->privates = array(); $this->aliases = array(); } - public function getRemovedIds() + public function reset() { - return array( - 'Psr\\Container\\ContainerInterface' => true, - 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + $this->privates = array(); + parent::reset(); } public function compile() @@ -48,10 +51,11 @@ class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tes return true; } - public function isFrozen() + public function getRemovedIds() { - @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED); - - return true; + return array( + 'Psr\\Container\\ContainerInterface' => true, + 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, + ); } } 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 dd9ed9cbb3..e513fd7219 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,19 +21,22 @@ 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 = array(); + $this->services = $this->privates = array(); $this->aliases = array(); } - public function getRemovedIds() + public function reset() { - return array( - 'Psr\\Container\\ContainerInterface' => true, - 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + $this->privates = array(); + parent::reset(); } public function compile() @@ -46,10 +49,11 @@ class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tes return true; } - public function isFrozen() + public function getRemovedIds() { - @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED); - - return true; + return array( + 'Psr\\Container\\ContainerInterface' => true, + 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, + ); } } 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 d65ac7dfbc..1c20741bf7 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,21 +21,24 @@ 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(); - $this->services = array(); + $this->services = $this->privates = array(); $this->aliases = array(); } - public function getRemovedIds() + public function reset() { - return array( - 'Psr\\Container\\ContainerInterface' => true, - 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + $this->privates = array(); + parent::reset(); } public function compile() @@ -48,10 +51,11 @@ class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tes return true; } - public function isFrozen() + public function getRemovedIds() { - @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED); - - return true; + return array( + 'Psr\\Container\\ContainerInterface' => true, + 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, + ); } } 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 4cf1ae40b4..0a4975b7da 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,19 +21,22 @@ 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 = array(); + $this->services = $this->privates = array(); $this->aliases = array(); } - public function getRemovedIds() + public function reset() { - return array( - 'Psr\\Container\\ContainerInterface' => true, - 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, - ); + $this->privates = array(); + parent::reset(); } public function compile() @@ -46,10 +49,11 @@ class ProjectServiceContainer extends \Symfony\Component\DependencyInjection\Tes return true; } - public function isFrozen() + public function getRemovedIds() { - @trigger_error(sprintf('The %s() method is deprecated since Symfony 3.3 and will be removed in 4.0. Use the isCompiled() method instead.', __METHOD__), E_USER_DEPRECATED); - - return true; + return array( + 'Psr\\Container\\ContainerInterface' => true, + 'Symfony\\Component\\DependencyInjection\\ContainerInterface' => true, + ); } }