Skip to content

Commit

Permalink
Leverage str_ends_with
Browse files Browse the repository at this point in the history
added the php80 polyfill to requirements when necessary
  • Loading branch information
Tobion committed Jul 21, 2021
1 parent 6dfb6c5 commit 21336db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion DependencyInjection/AddAnnotatedClassesToCachePass.php
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ private function expandClasses(array $patterns, array $classes): array

// Explicit classes declared in the patterns are returned directly
foreach ($patterns as $key => $pattern) {
if ('\\' !== substr($pattern, -1) && false === strpos($pattern, '*')) {
if (!str_ends_with($pattern, '\\') && false === strpos($pattern, '*')) {
unset($patterns[$key]);
$expanded[] = ltrim($pattern, '\\');
}
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"symfony/http-foundation": "^4.4|^5.0",
"symfony/polyfill-ctype": "^1.8",
"symfony/polyfill-php73": "^1.9",
"symfony/polyfill-php80": "^1.15",
"symfony/polyfill-php80": "^1.16",
"psr/log": "^1|^2"
},
"require-dev": {
Expand Down

0 comments on commit 21336db

Please sign in to comment.