8000 [FrameworkBundle] Enable assets by default. · symfony/symfony@e32e464 · GitHub
[go: up one dir, main page]

Skip to content

Commit e32e464

Browse files
committed
[FrameworkBundle] Enable assets by default.
1 parent eb4c3da commit e32e464

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

src/Symfony/Bundle/FrameworkBundle/DependencyInjection/Configuration.php

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ public function getConfigTreeBuilder()
6565

6666
// convert the old configuration to the new one
6767
if (isset($v['assets'])) {
68-
8000 throw new LogicException('You cannot use assets settings under "templating.templating" and "assets" configurations in the same project.');
68+
throw new \LogicException('You cannot use assets settings under "templating.templating" and "assets" configurations in the same project.');
6969
}
7070

7171
$v['assets'] = array(
@@ -84,6 +84,14 @@ public function getConfigTreeBuilder()
8484
'base_urls' => array_values(array_unique(array_merge($config['base_urls']['http'], $config['base_urls']['ssl']))),
8585
);
8686
}
87+
} else {
88+
$v['assets'] = array(
89+
'version' => null,
90+
'version_format' => '%%s?%%s',
91+
'base_path' => '',
92+
'base_urls' => array(),
93+
'packages' => array(),
94+
);
8795
}
8896

8997
unset($v['templating']['assets_version'], $v['templating']['assets_version_format'], $v['templating']['assets_base_urls'], $v['templating']['packages']);

src/Symfony/Bundle/FrameworkBundle/Tests/DependencyInjection/ConfigurationTest.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,13 @@ protected static function getBundleDefaultConfig()
145145
'magic_call' => false,
146146
'throw_exception_on_invalid_index' => false,
147147
),
148+
'assets' => array(
149+
'version' => null,
150+
'version_format' => '%%s?%%s',
151+
'base_path' => '',
152+
'base_urls' => array(),
153+
'packages' => array(),
154+
),
148155
);
149156
}
150157
}

src/Symfony/Bundle/FrameworkBundle/composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
],
1818
"require": {
1919
"php": ">=5.3.9",
20+
"symfony/asset": "~2.7|~3.0.0",
2021
"symfony/dependency-injection" : "~2.6,>=2.6.2",
2122
"symfony/config" : "~2.4",
2223
"symfony/event-dispatcher": "~2.5|~3.0.0",
@@ -48,7 +49,6 @@
4849
"symfony/yaml": "~2.0,>=2.0.5|~3.0.0"
4950
},
5051
"suggest": {
51-
"symfony/asset": "",
5252
"symfony/console": "For using the console commands",
5353
"symfony/finder": "For using the translation loader and cache warmer",
5454
"symfony/form": "For using forms",

0 commit comments

Comments
 (0)
0