Skip to content

Commit

Permalink
Merge branch '5.4' into 6.0
Browse files Browse the repository at this point in the history
* 5.4:
  Fix CS
  Fix CS
  • Loading branch information
fabpot committed Jul 20, 2022
2 parents d234ce5 + 3e01ccd commit 434b64f
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Loader/XmlFileLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ protected function parseImport(RouteCollection $collection, \DOMElement $node, s
$this->setCurrentDir(\dirname($path));

/** @var RouteCollection[] $imported */
$imported = $this->import($resource, ('' !== $type ? $type : null), false, $file, $exclude) ?: [];
$imported = $this->import($resource, '' !== $type ? $type : null, false, $file, $exclude) ?: [];

if (!\is_array($imported)) {
$imported = [$imported];
Expand Down
2 changes: 1 addition & 1 deletion Tests/Generator/Dumper/CompiledUrlGeneratorDumperTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public function testDumpWithRoutes()

public function testDumpWithSimpleLocalizedRoutes()
{
$this->routeCollection->add('test', (new Route('/foo')));
$this->routeCollection->add('test', new Route('/foo'));
$this->routeCollection->add('test.en', (new Route('/testing/is/fun'))->setDefault('_locale', 'en')->setDefault('_canonical_route', 'test')->setRequirement('_locale', 'en'));
$this->routeCollection->add('test.nl', (new Route('/testen/is/leuk'))->setDefault('_locale', 'nl')->setDefault('_canonical_route', 'test')->setRequirement('_locale', 'nl'));

Expand Down
2 changes: 1 addition & 1 deletion Tests/RouteTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ public function testLocaleRequirementWithLocalizedRoutes(Route $route)
public function provideNonLocalizedRoutes()
{
return [
[(new Route('/foo'))],
[new Route('/foo')],
[(new Route('/foo'))->setDefault('_locale', 'en')],
[(new Route('/foo'))->setDefault('_locale', 'en')->setDefault('_canonical_route', 'foo')],
[(new Route('/foo'))->setDefault('_locale', 'en')->setDefault('_canonical_route', 'foo')->setRequirement('_locale', 'foobar')],
Expand Down

0 comments on commit 434b64f

Please sign in to comment.