Skip to content

Commit c803dc9

Browse files
committed
Leverage str_ends_with
added the php80 polyfill to requirements when necessary
1 parent 59735ed commit c803dc9

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

AbstractUriElement.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ protected function canonicalizePath($path)
142142
return $path;
143143
}
144144

145-
if ('.' === substr($path, -1)) {
145+
if (str_ends_with($path, '.')) {
146146
$path .= '/';
147147
}
148148

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@
1818
"require": {
1919
"php": ">=7.1.3",
2020
"symfony/polyfill-ctype": "~1.8",
21-
"symfony/polyfill-mbstring": "~1.0"
21+
"symfony/polyfill-mbstring": "~1.0",
22+
"symfony/polyfill-php80": "^1.16"
2223
},
2324
"require-dev": {
2425
"symfony/css-selector": "^3.4|^4.0|^5.0",

0 commit comments

Comments
 (0)