Merge branch '4.3' into 4.4
* 4.3: [HttpKernel] fix wrong removal of the just generated container dir bug #34024 [Routing] fix route loading with wildcard, but dir or file is empty (gseidel) [Routing] fix route loading with wildcard, but dir or file is empty
This commit is contained in:
commit
c50d0b6d1c
@ -807,7 +807,7 @@ abstract class Kernel implements KernelInterface, RebootableInterface, Terminabl
|
||||
$fs->dumpFile($dir.$file, $code);
|
||||
@chmod($dir.$file, 0666 & ~umask());
|
||||
}
|
||||
$legacyFile = \dirname($dir.$file).'.legacy';
|
||||
$legacyFile = \dirname($dir.key($content)).'.legacy';
|
||||
if (file_exists($legacyFile)) {
|
||||
@unlink($legacyFile);
|
||||
}
|
||||
|
@ -36,7 +36,8 @@ class RoutingConfigurator
|
||||
final public function import($resource, string $type = null, bool $ignoreErrors = false): ImportConfigurator
|
||||
{
|
||||
$this->loader->setCurrentDir(\dirname($this->path));
|
||||
$imported = $this->loader->import($resource, $type, $ignoreErrors, $this->file);
|
||||
$imported = $this->loader->import($resource, $type, $ignoreErrors, $this->file) ?: [];
|
||||
|
||||
if (!\is_array($imported)) {
|
||||
return new ImportConfigurator($this->collection, $imported);
|
||||
}
|
||||
|
@ -166,7 +166,7 @@ class XmlFileLoader extends FileLoader
|
||||
$this->setCurrentDir(\dirname($path));
|
||||
|
||||
/** @var RouteCollection[] $imported */
|
||||
$imported = $this->import($resource, ('' !== $type ? $type : null), false, $file);
|
||||
$imported = $this->import($resource, ('' !== $type ? $type : null), false, $file) ?: [];
|
||||
|
||||
if (!\is_array($imported)) {
|
||||
$imported = [$imported];
|
||||
|
@ -185,7 +185,7 @@ class YamlFileLoader extends FileLoader
|
||||
|
||||
$this->setCurrentDir(\dirname($path));
|
||||
|
||||
$imported = $this->import($config['resource'], $type, false, $file);
|
||||
$imported = $this->import($config['resource'], $type, false, $file) ?: [];
|
||||
|
||||
if (!\is_array($imported)) {
|
||||
$imported = [$imported];
|
||||
|
0
src/Symfony/Component/Routing/Tests/Fixtures/controller/empty_wildcard/.gitignore
vendored
Normal file
0
src/Symfony/Component/Routing/Tests/Fixtures/controller/empty_wildcard/.gitignore
vendored
Normal file
@ -5,3 +5,7 @@ api:
|
||||
resource: ../controller/routing.yml
|
||||
name_prefix: api_
|
||||
prefix: /api
|
||||
|
||||
empty_wildcard:
|
||||
resource: ../controller/empty_wildcard/*
|
||||
prefix: /empty_wildcard
|
||||
|
Reference in New Issue
Block a user