Skip to content

Commit 60359a6

Browse files
Merge branch '2.8' into 3.2
* 2.8: property constraints can be added in child classes added test for staticClassLoader in LazyLoadingMetadatafactory spelling fixes Readd Symfony version status in the toolbar make sure that null can be the invalid value [VarDumper] Improve dump of AMQP* Object [VarDumper] Fixed dumping of terminated generator bumped Symfony version to 2.8.18 updated VERSION for 2.8.17 updated CHANGELOG for 2.8.17 bumped Symfony version to 2.7.25 updated VERSION for 2.7.24 update CONTRIBUTORS for 2.7.24 updated CHANGELOG for 2.7.24 [FrameworkBundle] Simplify createPackageDefinition fix directory resource considers same timestamp not fresh return false early from directory resource
2 parents 2940b7d + bbc06e3 commit 60359a6

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

DependencyInjection/FrameworkExtension.php

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -764,23 +764,14 @@ private function createPackageDefinition($basePath, array $baseUrls, Reference $
764764
throw new \LogicException('An asset package cannot have base URLs and base paths.');
765765
}
766766

767-
if (!$baseUrls) {
768-
$package = new DefinitionDecorator('assets.path_package');
769-
770-
return $package
771-
->setPublic(false)
772-
->replaceArgument(0, $basePath)
773-
->replaceArgument(1, $version)
774-
;
775-
}
776-
777-
$package = new DefinitionDecorator('assets.url_package');
778-
779-
return $package
767+
$package = new DefinitionDecorator($baseUrls ? 'assets.url_package' : 'assets.path_package');
768+
$package
780769
->setPublic(false)
781-
->replaceArgument(0, $baseUrls)
770+
->replaceArgument(0, $baseUrls ?: $basePath)
782771
->replaceArgument(1, $version)
783772
;
773+
774+
return $package;
784775
}
785776

786777
private function createVersion(ContainerBuilder $container, $version, $format, $name)

0 commit comments

Comments
 (0)