comparison vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php @ 17:129ea1e6d783

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:21:36 +0000
parents 1fec387a4317
children
comparison
equal deleted inserted replaced
16:c2387f117808 17:129ea1e6d783
108 { 108 {
109 if (!$config = $extension->getProcessedConfigs()) { 109 if (!$config = $extension->getProcessedConfigs()) {
110 // Extension::processConfiguration() wasn't called, we cannot know how configs were merged 110 // Extension::processConfiguration() wasn't called, we cannot know how configs were merged
111 return; 111 return;
112 } 112 }
113 $this->processedEnvPlaceholders = array(); 113 $this->processedEnvPlaceholders = [];
114 114
115 // serialize config and container to catch env vars nested in object graphs 115 // serialize config and container to catch env vars nested in object graphs
116 $config = serialize($config).serialize($container->getDefinitions()).serialize($container->getAliases()).serialize($container->getParameterBag()->all()); 116 $config = serialize($config).serialize($container->getDefinitions()).serialize($container->getAliases()).serialize($container->getParameterBag()->all());
117 117
118 foreach (parent::getEnvPlaceholders() as $env => $placeholders) { 118 foreach (parent::getEnvPlaceholders() as $env => $placeholders) {
145 145
146 public function __construct(ExtensionInterface $extension, ParameterBagInterface $parameterBag = null) 146 public function __construct(ExtensionInterface $extension, ParameterBagInterface $parameterBag = null)
147 { 147 {
148 parent::__construct($parameterBag); 148 parent::__construct($parameterBag);
149 149
150 $this->extensionClass = get_class($extension); 150 $this->extensionClass = \get_class($extension);
151 } 151 }
152 152
153 /** 153 /**
154 * {@inheritdoc} 154 * {@inheritdoc}
155 */ 155 */
156 public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION/*, int $priority = 0*/) 156 public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION/*, int $priority = 0*/)
157 { 157 {
158 throw new LogicException(sprintf('You cannot add compiler pass "%s" from extension "%s". Compiler passes must be registered before the container is compiled.', get_class($pass), $this->extensionClass)); 158 throw new LogicException(sprintf('You cannot add compiler pass "%s" from extension "%s". Compiler passes must be registered before the container is compiled.', \get_class($pass), $this->extensionClass));
159 } 159 }
160 160
161 /** 161 /**
162 * {@inheritdoc} 162 * {@inheritdoc}
163 */ 163 */
164 public function registerExtension(ExtensionInterface $extension) 164 public function registerExtension(ExtensionInterface $extension)
165 { 165 {
166 throw new LogicException(sprintf('You cannot register extension "%s" from "%s". Extensions must be registered before the container is compiled.', get_class($extension), $this->extensionClass)); 166 throw new LogicException(sprintf('You cannot register extension "%s" from "%s". Extensions must be registered before the container is compiled.', \get_class($extension), $this->extensionClass));
167 } 167 }
168 168
169 /** 169 /**
170 * {@inheritdoc} 170 * {@inheritdoc}
171 */ 171 */