Skip to content

Commit 6a54e63

Browse files
Merge branch '5.4' into 6.0
* 5.4: (21 commits) Add missing license header [Workflow] Catch error when trying to get an uninitialized marking Add missing license header Allow usage of Provider domains if possible Use reference date in reverse transform Fixes #40997 Fix env resolution in lock configuration Fix Symfony not working on SMB share #45990 [Messenger] DoctrineTransportFactory works with notify and decorated PostgreSQL driver [Cache] make LockRegistry use static properties instead of static variables fix: return-path has higher priority for envelope address than from address (fixes #41322) [HttpClient] Fix sending content-length when streaming the body [Console] Header with column max width is now well wrap with separator Fix use_cookies framework session configuration [FrameworkBundle] [Command] Fix `debug:router --no-interaction` error … [Intl] Update the ICU data to 71.1 - 5.4 [Intl] Update the ICU data to 71.1 - 4.4 Add tests to messenger connection get for OraclePlatform [RateLimiter] Adding default empty value [DependencyInjection] Add TaggedIteratorArgument unit tests [Process] Fix Process::getEnv() when setEnv() hasn't been called before ...
2 parents 6ca70e9 + 2545368 commit 6a54e63

21 files changed

+209
-4
lines changed

Command/RouterDebugCommand.php

Lines changed: 27 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,21 @@ protected function execute(InputInterface $input, OutputInterface $output): int
9191
}
9292

9393
if ($name) {
94-
if (!($route = $routes->get($name)) && $matchingRoutes = $this->findRouteNameContaining($name, $routes)) {
94+
$route = $routes->get($name);
95+
$matchingRoutes = $this->findRouteNameContaining($name, $routes);
96+
97+
if (!$input->isInteractive() && !$route && \count($matchingRoutes) > 1) {
98+
$helper->describe($io, $this->findRouteContaining($name, $routes), [
99+
'format' => $input->getOption('format'),
100+
'raw_text' => $input->getOption('raw'),
101+
'show_controllers' => $input->getOption('show-controllers'),
102+
'output' => $io,
103+
]);
104+
105+
return 0;
106+
}
107+
108+
if (!$route && $matchingRoutes) {
95109
$default = 1 === \count($matchingRoutes) ? $matchingRoutes[0] : null;
96110
$name = $io->choice('Select one of the matching routes', $matchingRoutes, $default);
97111
$route = $routes->get($name);
@@ -146,4 +160,16 @@ public function complete(CompletionInput $input, CompletionSuggestions $suggesti
146160
$suggestions->suggestValues($helper->getFormats());
147161
}
148162
}
163+
164+
private function findRouteContaining(string $name, RouteCollection $routes): RouteCollection
165+
{
166+
$foundRoutes = new RouteCollection();
167+
foreach ($routes as $routeName => $route) {
168+
if (false !== stripos($routeName, $name)) {
169+
$foundRoutes->add($routeName, $route);
170+
}
171+
}
172+
173+
return $foundRoutes;
174+
}
149175
}

DependencyInjection/FrameworkExtension.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,11 +1826,11 @@ private function registerLockConfiguration(array $config, ContainerBuilder $cont
18261826

18271827
// Generate stores
18281828
$storeDefinitions = [];
1829-
foreach ($resourceStores as $storeDsn) {
1830-
$storeDsn = $container->resolveEnvPlaceholders($storeDsn, null, $usedEnvs);
1829+
foreach ($resourceStores as $resourceStore) {
1830+
$storeDsn = $container->resolveEnvPlaceholders($resourceStore, null, $usedEnvs);
18311831
$storeDefinition = new Definition(PersistingStoreInterface::class);
18321832
$storeDefinition->setFactory([StoreFactory::class, 'createStore']);
1833-
$storeDefinition->setArguments([$storeDsn]);
1833+
$storeDefinition->setArguments([$resourceStore]);
18341834

18351835
$container->setDefinition($storeDefinitionId = '.lock.'.$resourceName.'.store.'.$container->hash($storeDsn), $storeDefinition);
18361836

Tests/CacheWarmer/AnnotationsCacheWarmerTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\FrameworkBundle\Tests\CacheWarmer;
413

514
use Doctrine\Common\Annotations\AnnotationReader;

Tests/Command/SecretsRemoveCommandTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
413

514
use PHPUnit\Framework\TestCase;

Tests/Command/SecretsSetCommandTest.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\FrameworkBundle\Tests\Command;
413

514
use PHPUnit\Framework\TestCase;

Tests/Functional/Bundle/DefaultConfigTestBundle/DefaultConfigTestBundle.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\DefaultConfigTestBundle;
413

514
use Symfony\Component\HttpKernel\Bundle\Bundle;

Tests/Functional/Bundle/DefaultConfigTestBundle/DependencyInjection/Configuration.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\DefaultConfigTestBundle\DependencyInjection;
413

514
use Symfony\Component\Config\Definition\Builder\TreeBuilder;

Tests/Functional/Bundle/DefaultConfigTestBundle/DependencyInjection/DefaultConfigTestExtension.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\DefaultConfigTestBundle\DependencyInjection;
413

514
use Symfony\Component\DependencyInjection\ContainerBuilder;

Tests/Functional/Bundle/ExtensionWithoutConfigTestBundle/DependencyInjection/ExtensionWithoutConfigTestExtension.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\ExtensionWithoutConfigTestBundle\DependencyInjection;
413

514
use Symfony\Component\DependencyInjection\ContainerBuilder;

Tests/Functional/Bundle/ExtensionWithoutConfigTestBundle/ExtensionWithoutConfigTestBundle.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
11
<?php
22

3+
/*
4+
* This file is part of the Symfony package.
5+
*
6+
* (c) Fabien Potencier <fabien@symfony.com>
7+
*
8+
* For the full copyright and license information, please view the LICENSE
9+
* file that was distributed with this source code.
10+
*/
11+
312
namespace Symfony\Bundle\FrameworkBundle\Tests\Functional\Bundle\ExtensionWithoutConfigTestBundle;
413

514
use Symfony\Component\HttpKernel\Bundle\Bundle;

0 commit comments

Comments
 (0)