Skip to content

Commit

Permalink
minor #22663 [DI] Fix PhpDumper blank lines around namespace (ogizanagi)
Browse files Browse the repository at this point in the history
This PR was merged into the 2.7 branch.

Discussion
----------

[DI] Fix PhpDumper blank lines around namespace

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | N/A
| License       | MIT
| Doc PR        | N/A

219bce9 tries to fix CS in an expected PhpDumper output, which actually shows the PhpDumper does not create proper blank lines around the namespace.
That's why tests are failing on #22660.

Commits
-------

c9f6c16 [DI] Fix PhpDumper blank lines around namespace
  • Loading branch information
fabpot committed May 8, 2017
2 parents 219bce9 + c9f6c16 commit 62cb443
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -827,7 +827,7 @@ private function addNewInstance($id, Definition $definition, $return, $instantia
private function startClass($class, $baseClass, $namespace)
{
$bagClass = $this->container->isFrozen() ? 'use Symfony\Component\DependencyInjection\ParameterBag\FrozenParameterBag;' : 'use Symfony\Component\DependencyInjection\ParameterBag\\ParameterBag;';
$namespaceLine = $namespace ? "namespace $namespace;\n" : '';
$namespaceLine = $namespace ? "\nnamespace $namespace;\n" : '';

return <<<EOF
<?php
Expand Down

0 comments on commit 62cb443

Please sign in to comment.