Skip to content

Commit 8a2634a

Browse files
committed
fixup
1 parent e47d070 commit 8a2634a

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/Symfony/Component/DependencyInjection/ContainerBuilder.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -610,8 +610,10 @@ public function merge(self $container)
610610
$otherBag = $container->getParameterBag();
611611
$parameterBag->add($otherBag->all());
612612

613-
foreach ($otherBag->allDeprecated() as $name => $deprecated) {
614-
$parameterBag->deprecate($name, $deprecated['package'], $deprecated['version'], $deprecated['message']);
613+
if ($parameterBag instanceof ParameterBag && $otherBag instanceof ParameterBag) {
614+
foreach ($otherBag->allDeprecated() as $name => $deprecated) {
615+
$parameterBag->deprecate($name, $deprecated['package'], $deprecated['version'], $deprecated['message']);
616+
}
615617
}
616618

617619
if ($this->trackResources) {

src/Symfony/Component/DependencyInjection/Tests/Fixtures/php/services_deprecated_parameters_as_files.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ if (in_array(PHP_SAPI, ['cli', 'phpdbg'], true)) {
176176
return;
177177
}
178178

179-
require dirname(__DIR__, 5).'/vendor/autoload.php';
179+
require dirname(__DIR__, %d).'/vendor/autoload.php';
180180
(require __DIR__.'/ProjectServiceContainer.php')->set(\Container%s\ProjectServiceContainer::class, null);
181181
require __DIR__.'/Container%s/getFooService.php';
182182

0 commit comments

Comments
 (0)
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