1
0
mirror of https://github.com/danog/psalm.git synced 2024-11-30 04:39:00 +01:00

Fixed PHP 7.4 related issues (#1957)

- s/fn/f/g (fn is a reserved keyword in 7.4)
- ReflectionType::__toString() warning (this method is deprecated in 7.4)

Note that some issues are caused by `phpspec/propecy` code and will be
fixed when phpspec/propecy#432 lands. Most were caused by
`ReflectionType::__toString()` usage in
`Psalm\Internal\Codebase\Reflection` though.
This commit is contained in:
Bruce Weirdan 2019-07-19 06:36:39 +03:00 committed by Matthew Brown
parent 8d63d5dc4e
commit e0a59ce117
2 changed files with 3 additions and 3 deletions

View File

@ -389,7 +389,7 @@ class Reflection
$suffix = '|null';
}
return Type::parseString($reflection_type . $suffix);
return Type::parseString($reflection_type->getName() . $suffix);
}
/**

View File

@ -25,7 +25,7 @@ class CallableTest extends TestCase
* @return void
* @psalm-suppress MixedArgument
*/
function fn() {
function f() {
run_function(
/**
* @return void
@ -37,7 +37,7 @@ class CallableTest extends TestCase
echo $data;
}
fn();',
f();',
],
'inferredArg' => [
'<?php