Argument $x and use of $x within $x * $y yield undefined variable $x problems. However auto-complete does work. Adding a type-hint to argument $x will suggest completions when I type $x-> within the arrow function expression. No problems are being generated for variable $y and it will be suggested by auto-complete if I write $ and hit CTRL+Space within the arrow function expression (variable $x is absent from the list of suggested variables).
Configuration setting Undefined variable within preferences "PHP" / "Validation" / "Errors/Warnings" needs to be set to any option except for Ignore for this to show up.
I first observed this behavior on Windows 10 using PDT version 7.2.0. The problem is still present after upgrading to PDT 8.0.0 nightly build today.
Arrow function arguments are being reported as undefined variables. Here is a simple reproducer:
Argument
$x
and use of$x
within$x * $y
yield undefined variable$x
problems. However auto-complete does work. Adding a type-hint to argument$x
will suggest completions when I type$x->
within the arrow function expression. No problems are being generated for variable$y
and it will be suggested by auto-complete if I write$
and hitCTRL+Space
within the arrow function expression (variable$x
is absent from the list of suggested variables).Configuration setting
Undefined variable
within preferences"PHP" / "Validation" / "Errors/Warnings"
needs to be set to any option except forIgnore
for this to show up.I first observed this behavior on Windows 10 using PDT version 7.2.0. The problem is still present after upgrading to PDT 8.0.0 nightly build today.