diff --git a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php index c124fb372d129..78a8a14b560f5 100644 --- a/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php +++ b/src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php @@ -143,6 +143,7 @@ public function dump(array $options = array()) if ($this->container->isFrozen()) { $code .= $this->addFrozenConstructor(); $code .= $this->addFrozenCompile(); + $code .= $this->addIsFrozenMethod(); } else { $code .= $this->addConstructor(); } @@ -865,6 +866,26 @@ public function compile() throw new LogicException('You cannot compile a dumped frozen container.'); } +EOF; + } + + /** + * Adds the isFrozen method for a frozen container. + * + * @return string + */ + private function addIsFrozenMethod() + { + return <<docStar} + * {@inheritdoc} + */ + public function isFrozen() + { + return true; + } + EOF; } diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php index 8e0852c8df986..e573052e1c5d7 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services10.php @@ -41,6 +41,14 @@ public function compile() throw new LogicException('You cannot compile a dumped frozen container.'); } + /** + * {@inheritdoc} + */ + public function isFrozen() + { + return true; + } + /** * Gets the 'test' service. * diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php index d94cf3dedd53b..d5059b6f4b750 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services12.php @@ -45,6 +45,14 @@ public function compile() throw new LogicException('You cannot compile a dumped frozen container.'); } + /** + * {@inheritdoc} + */ + public function isFrozen() + { + return true; + } + /** * Gets the 'test' service. * diff --git a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php index 4ee512ab5040f..58052966744ee 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services13.php @@ -39,6 +39,14 @@ public function compile() throw new LogicException('You cannot compile a dumped frozen container.'); } + /** + * {@inheritdoc} + */ + public function isFrozen() + { + return true; + } + /** * Gets the 'bar' service. * 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 bcbd4a67b6b9d..c62fedaa3eccd 100644 --- a/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php +++ b/src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services9_compiled.php @@ -60,6 +60,14 @@ public function compile() throw new LogicException('You cannot compile a dumped frozen container.'); } + /** + * {@inheritdoc} + */ + public function isFrozen() + { + return true; + } + /** * Gets the 'bar' service. * pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy