Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2606076

Browse files
committed
Use PHP_VERSION_ID
1 parent 48cbd2b commit 2606076

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Symfony/Component/PropertyInfo/Extractor/ReflectionExtractor.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ public function getProperties(string $class, array $context = []): ?array
133133
*/
134134
public function getTypes(string $class, string $property, array $context = []): ?array
135135
{
136-
if (method_exists(\ReflectionProperty::class, 'getType')) {
136+
if (\PHP_VERSION_ID >= 70400) {
137137
try {
138138
$reflectionProperty = new \ReflectionProperty($class, $property);
139139
$type = $reflectionProperty->getType();

0 commit comments

Comments
 (0)