Skip to content

Commit 7ecf5e9

Browse files
garakfabpot
authored andcommitted
Dynamic bundle assets
1 parent f1194af commit 7ecf5e9

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Command/AssetsInstallCommand.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,13 @@ protected function execute(InputInterface $input, OutputInterface $output)
137137
$validAssetDirs = [];
138138
/** @var BundleInterface $bundle */
139139
foreach ($kernel->getBundles() as $bundle) {
140-
if (!is_dir($originDir = $bundle->getPath().'/Resources/public')) {
140+
if (!method_exists($bundle, 'getPublicPath')) {
141+
@trigger_error('Not defining "getPublicPath()" method is deprecated since Symfony 4.4 and will not be supported in 5.0.', E_USER_DEPRECATED);
142+
$publicPath = 'Resources/public';
143+
} else {
144+
$publicPath = $bundle->getPublicPath();
145+
}
146+
if (!is_dir($originDir = $bundle->getPath().\DIRECTORY_SEPARATOR.$publicPath)) {
141147
continue;
142148
}
143149

0 commit comments

Comments
 (0)