Skip to content

Commit

Permalink
bug #28861 [DependencyInjection] Skip empty proxy code (olvlvl)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nicolas-grekas committed Oct 20, 2018
2 parents 6a50405 + baf6f8c commit 060751d
Showing 1 changed file with 3 additions and 1 deletion.
Expand Up @@ -233,7 +233,9 @@ private function addProxyClasses()
$strip = '' === $this->docStar && method_exists('Symfony\Component\HttpKernel\Kernel', 'stripComments');

foreach ($definitions as $definition) {
$proxyCode = "\n".$this->getProxyDumper()->getProxyCode($definition);
if ("\n" === $proxyCode = "\n".$this->getProxyDumper()->getProxyCode($definition)) {
continue;
}
if ($strip) {
$proxyCode = "<?php\n".$proxyCode;
$proxyCode = substr(Kernel::stripComments($proxyCode), 5);
Expand Down

0 comments on commit 060751d

Please sign in to comment.