Skip to content

Commit bcee325

Browse files
Merge branch '4.4' into 5.2
* 4.4: Leverage str_contains/str_starts_with Leverage str_ends_with
2 parents 4be8ec8 + 73c7de5 commit bcee325

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
@@ -279,7 +279,7 @@ private function addFirewallsSection(ArrayNodeDefinition $rootNode, array $facto
279279
continue;
280280
}
281281

282-
if (false !== strpos($firewall[$k]['check_path'], '/') && !preg_match('#'.$firewall['pattern'].'#', $firewall[$k]['check_path'])) {
282+
if (str_contains($firewall[$k]['check_path'], '/') && !preg_match('#'.$firewall['pattern'].'#', $firewall[$k]['check_path'])) {
283283
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']));
284284
}
285285
}

Tests/DependencyInjection/CompleteConfigurationTest.php

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

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

8080
$expectedProviders = [
8181
'security.user.provider.concrete.default',

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"symfony/deprecation-contracts": "^2.1",
2424
"symfony/event-dispatcher": "^5.1",
2525
"symfony/http-kernel": "^5.0",
26-
"symfony/polyfill-php80": "^1.15",
26+
"symfony/polyfill-php80": "^1.16",
2727
"symfony/security-core": "^5.2",
2828
"symfony/security-csrf": "^4.4|^5.0",
2929
"symfony/security-guard": "^5.2",

0 commit comments

Comments
 (0)