Skip to content

Commit 721e0bf

Browse files
Merge branch '5.2' into 5.3
* 5.2: Leverage str_contains/str_starts_with Leverage str_ends_with
2 parents 9be4694 + bcee325 commit 721e0bf

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

DependencyInjection/MainConfiguration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
322322
continue;
323323
}
324324

325-
if (false !== strpos($firewall[$k]['check_path'], '/') && !preg_match('#'.$firewall['pattern'].'#', $firewall[$k]['check_path'])) {
325+
if (str_contains($firewall[$k]['check_path'], '/') && !preg_match('#'.$firewall['pattern'].'#', $firewall[$k]['check_path'])) {
326326
throw new \LogicException(sprintf('The check_path "%s" for login method "%s" is not matched by the firewall pattern "%s".', $firewall[$k]['check_path'], $k, $firewall['pattern']));
327327
}
328328
}

Tests/DependencyInjection/CompleteConfigurationTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public function testUserProviders()
8787
{
8888
$container = $this->getContainer('container1');
8989

90-
$providers = array_values(array_filter($container->getServiceIds(), function ($key) { return 0 === strpos($key, 'security.user.provider.concrete'); }));
90+
$providers = array_values(array_filter($container->getServiceIds(), function ($key) { return str_starts_with($key, 'security.user.provider.concrete'); }));
9191

9292
$expectedProviders = [
9393
'security.user.provider.concrete.default',

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
"symfony/http-kernel": "^5.3",
2626
"symfony/http-foundation": "^5.3",
2727
"symfony/password-hasher": "^5.3",
28-
"symfony/polyfill-php80": "^1.15",
28+
"symfony/polyfill-php80": "^1.16",
2929
"symfony/security-core": "^5.3",
3030
"symfony/security-csrf": "^4.4|^5.0",
3131
"symfony/security-guard": "^5.3",

0 commit comments

Comments
 (0)