Skip to content

Commit af5b3a4

Browse files
author
Diederik Noordhuis
authored
Update for PHP 7.4 support
Removes deprecation notice. https://www.php.net/manual/en/reflectiontype.tostring.php
1 parent 0f4ec9a commit af5b3a4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/Phpfastcache/Config/ConfigurationOption.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ public function __construct(...$args)
134134
$typeHintGot = \is_object($value) ? \get_class($value) : \gettype($value);
135135
$reflectionMethod = new ReflectionMethod($this, $method);
136136
$parameter = $reflectionMethod->getParameters()[0] ?? null;
137-
$typeHintExpected = ($parameter instanceof ReflectionParameter ? ($parameter->getType() === 'object' ? $parameter->getClass() : $parameter->getType(
138-
)) : 'Unknown type');
137+
$typeHintExpected = ($parameter instanceof ReflectionParameter ? ($parameter->getType()->getName() === 'object' ? $parameter->getClass() : $parameter->getType(
138+
)->getName()) : 'Unknown type');
139139

140140
throw new PhpfastcacheInvalidConfigurationException(
141141
\sprintf(

0 commit comments

Comments
 (0)