Skip to content

Commit 6eb024b

Browse files
committed
bug #35247 [FrameworkBundle][ContainerLintCommand] Only skip .errored. services (fancyweb)
This PR was merged into the 4.4 branch. Discussion ---------- [FrameworkBundle][ContainerLintCommand] Only skip .errored. services | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - This PR partially reverts #34935 that was a kind of a mistake. Skipping all removed ids cannot work because all private services are in the "removed" ids. So the command ends up not validating much. To still fix the original issue #34858 we need to skip errored services. However, definition errors are not dumped / read (see #34928). So instead, even if it's bad, we can maybe rely on the name for this particular error since it's hardcoded 😕 At least it fixes this case in a simple way 😕 Commits ------- d38cdc9 [FrameworkBundle][ContainerLintCommand] Only skip .errored. services
2 parents ffd5d12 + d38cdc9 commit 6eb024b

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/Symfony/Bundle/FrameworkBundle/Command/ContainerLintCommand.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -102,11 +102,12 @@ private function getContainerBuilder(): ContainerBuilder
102102
$refl->setAccessible(true);
103103
$refl->setValue($parameterBag, true);
104104

105-
$passConfig = $container->getCompilerPassConfig();
106-
$passConfig->setRemovingPasses([]);
107-
$passConfig->setAfterRemovingPasses([]);
108-
109-
$skippedIds = $kernelContainer->getRemovedIds();
105+
$skippedIds = [];
106+
foreach ($container->getServiceIds() as $serviceId) {
107+
if (0 === strpos($serviceId, '.errored.')) {
108+
$skippedIds[$serviceId] = true;
109+
}
110+
}
110111
}
111112

112113
$container->setParameter('container.build_hash', 'lint_container');

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