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:
parent
8d63d5dc4e
commit
e0a59ce117
@ -389,7 +389,7 @@ class Reflection
|
||||
$suffix = '|null';
|
||||
}
|
||||
|
||||
return Type::parseString($reflection_type . $suffix);
|
||||
return Type::parseString($reflection_type->getName() . $suffix);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user