Skip to content

Commit dcbdc31

Browse files
committed
Leverage str_ends_with
added the php80 polyfill to requirements when necessary
1 parent f638807 commit dcbdc31

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Gitignore.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,6 @@ private static function lineToRegex(string $gitignoreLine): string
7878

7979
return ($isAbsolute ? '' : '(?:[^/]+/)*')
8080
.$regex
81-
.('/' !== substr($gitignoreLine, -1) ? '(?:$|/)' : '');
81+
.(!str_ends_with($gitignoreLine, '/') ? '(?:$|/)' : '');
8282
}
8383
}

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@
1616
}
1717
],
1818
"require": {
19-
"php": ">=7.1.3"
19+
"php": ">=7.1.3",
20+
"symfony/polyfill-php80": "^1.16"
2021
},
2122
"autoload": {
2223
"psr-4": { "Symfony\\Component\\Finder\\": "" },

0 commit comments

Comments
 (0)