symfony/symfony — pull request #8661 by gnugat (2013-08-03 21:32:13+00:00)
Title: [DependencyInjection] Trim constants

| Q | A
| ------------- | ---
| Bug fix? | **yes**
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | **yes**
| License | MIT

When indenting constant parameters in XML configuration files, an exception is throwed.
This PR simply adds:
* a test for simple constant support in XML configuration files
* a test for indented constant support in XML configuration files (proving the issue)
* a fix by trimming constants

## Example to reproduce the bug

Configuration sample:
```XML

PHP_EOL

PHP_EOL

```

Code sample:
```PHP
load('indented_constant.xml');

$container->getParameterBag()->all();
```

Result:
```
constant(): Couldn't find constant
PHP_EOL

```
Notice the fact that the error message is not:
```
constant(): Couldn't find constant PHP_EOL
```