Skip to content

Commit bbc06e3

Browse files
Merge branch '2.7' into 2.8
* 2.7: property constraints can be added in child classes added test for staticClassLoader in LazyLoadingMetadatafactory spelling fixes make sure that null can be the invalid value 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 1c6bf2f + 034d7d5 commit bbc06e3

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
@@ -623,23 +623,14 @@ private function createPackageDefinition($basePath, array $baseUrls, Reference $
623623
throw new \LogicException('An asset package cannot have base URLs and base paths.');
624624
}
625625

626-
if (!$baseUrls) {
627-
$package = new DefinitionDecorator('assets.path_package');
628-
629-
return $package
630-
->setPublic(false)
631-
->replaceArgument(0, $basePath)
632-
->replaceArgument(1, $version)
633-
;
634-
}
635-
636-
$package = new DefinitionDecorator('assets.url_package');
637-
638-
return $package
626+
$package = new DefinitionDecorator($baseUrls ? 'assets.url_package' : 'assets.path_package');
627+
$package
639628
->setPublic(false)
640-
->replaceArgument(0, $baseUrls)
629+
->replaceArgument(0, $baseUrls ?: $basePath)
641630
->replaceArgument(1, $version)
642631
;
632+
633+
return $package;
643634
}
644635

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

0 commit comments

Comments
 (0)