Skip to content

Commit 4fd31dd

Browse files
committed
Leverage str_ends_with
added the php80 polyfill to requirements when necessary
1 parent b7ac47d commit 4fd31dd

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Command/DebugCommand.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ private function getFqcnTypeClass(InputInterface $input, SymfonyStyle $io, strin
167167
$classes[] = $fqcn;
168168
} elseif (class_exists($fqcn = $namespace.'\\'.ucfirst($shortClassName).'Type')) {
169169
$classes[] = $fqcn;
170-
} elseif ('type' === substr($shortClassName, -4) && class_exists($fqcn = $namespace.'\\'.ucfirst(substr($shortClassName, 0, -4).'Type'))) {
170+
} elseif (str_ends_with($shortClassName, 'type') && class_exists($fqcn = $namespace.'\\'.ucfirst(substr($shortClassName, 0, -4).'Type'))) {
171171
$classes[] = $fqcn;
172172
}
173173
}

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
"symfony/options-resolver": "~4.3|^5.0",
2323
"symfony/polyfill-ctype": "~1.8",
2424
"symfony/polyfill-mbstring": "~1.0",
25+
"symfony/polyfill-php80": "^1.16",
2526
"symfony/property-access": "^3.4.40|^4.4.8|^5.0.8",
2627
"symfony/service-contracts": "^1.1|^2"
2728
},

0 commit comments

Comments
 (0)