10000 bug #28861 [DependencyInjection] Skip empty proxy code (olvlvl) · symfony/symfony@060751d · GitHub
[go: up one dir, main page]

Skip to content

Commit 060751d

Browse files
bug #28861 [DependencyInjection] Skip empty proxy code (olvlvl)
This PR was merged into the 2.8 branch. Discussion ---------- [DependencyInjection] Skip empty proxy code | Q | A | ------------- | --- | Branch? | 4.1 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes | Fixed tickets | #28852 | License | MIT Fix #28852 @nicolas-grekas I'm not sure which branch this should be applied to, please let me know. Commits ------- baf6f8c Skip empty proxy code
2 parents 6a50405 + baf6f8c commit 060751d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/Symfony/Component/DependencyInjection/Dumper/PhpDumper.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,9 @@ private function addProxyClasses()
233233
$strip = '' === $this->docStar && method_exists('Symfony\Component\HttpKernel\Kernel', 'stripComments');
234234

235235
foreach ($definitions as $definition) {
236-
$proxyCode = "\n".$this->getProxyDumper()->getProxyCode($definition);
236+
if ("\n" === $proxyCode = "\n".$this->getProxyDumper()->getProxyCode($definition)) {
237+
continue;
238+
}
237239
if ($strip) {
238240
$proxyCode = "<?php\n".$proxyCode;
239241
$proxyCode = substr(Kernel::stripComments($proxyCode), 5);

0 commit comments

Comments
 (0)
0