Skip to content
Permalink
Browse files

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.
  • Loading branch information...
weirdan authored and muglug committed Jul 19, 2019
1 parent 8d63d5d commit e0a59ce1179aca6be121a3308fa50f092da4db1d
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/Psalm/Internal/Codebase/Reflection.php
  2. +2 −2 tests/CallableTest.php
@@ -389,7 +389,7 @@ public static function getPsalmTypeFromReflectionType(\ReflectionType $reflectio
$suffix = '|null';
}
return Type::parseString($reflection_type . $suffix);
return Type::parseString($reflection_type->getName() . $suffix);
}
/**
@@ -25,7 +25,7 @@ function run_function(\Closure $fnc) {
* @return void
* @psalm-suppress MixedArgument
*/
function fn() {
function f() {
run_function(
/**
* @return void
@@ -37,7 +37,7 @@ function() use(&$data) {
echo $data;
}
fn();',
f();',
],
'inferredArg' => [
'<?php

0 comments on commit e0a59ce

Please sign in to comment.
You can’t perform that action at this time.