minor #13701 [2.7] [FrameworkBundle] bugfix in configuration for assets (phansys)
This PR was merged into the 2.7 branch.
Discussion
----------
[2.7] [FrameworkBundle] bugfix in configuration for assets
| Q | A
| ------------- | ---
| Bug fix? | yes
| New feature? | no
| BC breaks? | no
| Deprecations? | no
| Tests pass? | yes
| Fixed tickets | n/a
| License | MIT
| Doc PR | n/a
If both of configurations are defined, the exception breaks because it isn't
defined properly (missing backslash in FQCN for ```\LogicException```).
Also, the message was wrong (it's referred to "templating.templating" instead of
"framework.templating").
Commits
-------
3b4c23f
[2.7] [FrameworkBundle] bugfix in configuration for assets
This commit is contained in:
commit
baf13c1e32
@ -65,7 +65,7 @@ class Configuration implements ConfigurationInterface
|
||||
|
||||
// convert the old configuration to the new one
|
||||
if (isset($v['assets'])) {
|
||||
throw new LogicException('You cannot use assets settings under "templating.templating" and "assets" configurations in the same project.');
|
||||
throw new \LogicException('You cannot use assets settings under "framework.templating" and "assets" configurations in the same project.');
|
||||
}
|
||||
|
||||
$v['assets'] = array(
|
||||
|
@ -86,6 +86,25 @@ class ConfigurationTest extends \PHPUnit_Framework_TestCase
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* @expectedException \Symfony\Component\Config\Definition\Exception\InvalidConfigurationException
|
||||
* @expectedExceptionMessage You cannot use assets settings under "framework.templating" and "assets" configurations in the same project.
|
||||
*/
|
||||
public function testInvalidValueAssets()
|
||||
{
|
||||
$processor = new Processor();
|
||||
$configuration = new Configuration(true);
|
||||
$processor->processConfiguration($configuration, array(
|
||||
array(
|
||||
'templating' => array(
|
||||
'engines' => null,
|
||||
'assets_base_urls' => '//example.com',
|
||||
),
|
||||
'assets' => null,
|
||||
),
|
||||
));
|
||||
}
|
||||
|
||||
protected static function getBundleDefaultConfig()
|
||||
{
|
||||
return array(
|
||||
|
Reference in New Issue
Block a user