Using enum throws a Shell::setScopeVariables() type error at exit
spaze opened this issue · 1 comments
spaze commented
Hi,
when I use enums (PHP 8.1 new feature), the shell throws a type error at exit, everything else works fine.
Here's a code throwing the exit error:
Psy Shell v0.11.1 (PHP 8.1.1 — cli) by Justin Hileman
>>> enum A: string { case B = 'b'; case C = 'c'; }
>>> $a = A::B
=> A {#2655
+name: "B",
+value: "b",
}
>>> ^D
Exit: Ctrl+D
Psy\Shell::setScopeVariables(): Argument #1 ($vars) must be of type array, bool given, called in /.../vendor/psy/psysh/src/ExecutionLoop/ProcessForker.php on line 153
Thanks.
bobthecow commented
Thanks for reporting! This has been fixed and will go out with the next stable release.