Skip to content

Commit 21336db

Browse files
committed
Leverage str_ends_with
added the php80 polyfill to requirements when necessary
1 parent 6dfb6c5 commit 21336db

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

DependencyInjection/AddAnnotatedClassesToCachePass.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ private function expandClasses(array $patterns, array $classes): array
6262

6363
// Explicit classes declared in the patterns are returned directly
6464
foreach ($patterns as $key => $pattern) {
65-
if ('\\' !== substr($pattern, -1) && false === strpos($pattern, '*')) {
65+
if (!str_ends_with($pattern, '\\') && false === strpos($pattern, '*')) {
6666
unset($patterns[$key]);
6767
$expanded[] = ltrim($pattern, '\\');
6868
}

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"symfony/http-foundation": "^4.4|^5.0",
2424
"symfony/polyfill-ctype": "^1.8",
2525
"symfony/polyfill-php73": "^1.9",
26-
"symfony/polyfill-php80": "^1.15",
26+
"symfony/polyfill-php80": "^1.16",
2727
"psr/log": "^1|^2"
2828
},
2929
"require-dev": {

0 commit comments

Comments
 (0)