8000 [DependencyInjection] Trim constants by gnugat · Pull Request #8661 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[DependencyInjection] Trim constants #8661

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
[DIC] Added test on untrimmed constants (XML)
Added a fixture with an indented constant. This currently throws an
exception:

"""constant(): Couldn't find constant
        PHP_EOL
"""

This might be caused because the parameter value is not trimmed.
  • Loading branch information
Loïc Chardonnet committed Aug 3, 2013
commit 03823d3d889988588aaebbe9b6a0905f60e7e8d1
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
xsi:schemaLocation="http://symfony.com/schema/dic/services http://symfony.com/schema/dic/services/services-1.0.xsd">
<parameters>
<parameter key="simple_constant" type="constant">PHP_EOL</parameter>
<parameter key="indented_constant" type="constant">
PHP_EOL
</parameter>
</parameters>
</container>
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,7 @@ public function testConstants()
$actual = $container->getParameterBag()->all();
$expected = array(
'simple_constant' => PHP_EOL,
'indented_constant' => PHP_EOL,
);

$this->assertEquals($expected, $actual, '->load() parses PHP constants');
Expand Down
0