Consider using a different name than the imported variable $validationRule, or did you forget to import by reference?
It seems like you are assigning to a variable which was imported through a use
statement which was not imported by reference.
For clarity, we suggest to use a different name or import by reference depending
on whether you would like to have the change visibile in outer-scope.
Change not visible in outer-scope
$x=1;$callable=function()use($x){$x=2;// Not visible in outer scope. If you would like this, how// about using a different variable name than $x?};$callable();var_dump($x);// integer(1)
It seems like you are assigning to a variable which was imported through a
use
statement which was not imported by reference.For clarity, we suggest to use a different name or import by reference depending on whether you would like to have the change visibile in outer-scope.
Change not visible in outer-scope
Change visible in outer-scope