PHPantom version
phpantom_lsp 0.8.0-86-gefdc9ae4
Installation method
Pre-built binary from GitHub Releases
Operating system
macOS aarch64 (Apple Silicon)
Editor
VS Code
Bug description
The following cases should report at least some sort of error, because they aren't valid php.
Steps to reproduce
Invalid enum declaration will raise a fatal php error, missing scalar type in declaration.
enum MyType {
case Any = 0;
case Array = 2;
}
Invalid enum declaration will raise a fatal php error, missing backed value for enum case.
enum MyType: int {
case Any = 0;
case Array;
}
Invalid enum declaration will raise a fatal php error, backed value type can only be string or int.
enum TypeDescriptor: bool {
case Any = false;
case Array = true;
}
Invalid enum declaration will raise a fatal php error when it is first used (runtime error, the others are compile errors), duplicate values are invalid, not only for values but also for the keys.
enum Test: string {
case FOO = 'baz';
case BAR = 'baz';
}
echo Test::FOO->value;
Error output or panic trace
.phpantom.toml
Additional context
No response
PHPantom version
phpantom_lsp 0.8.0-86-gefdc9ae4
Installation method
Pre-built binary from GitHub Releases
Operating system
macOS aarch64 (Apple Silicon)
Editor
VS Code
Bug description
The following cases should report at least some sort of error, because they aren't valid php.
Steps to reproduce
Invalid enum declaration will raise a fatal php error, missing scalar type in declaration.
Invalid enum declaration will raise a fatal php error, missing backed value for enum case.
Invalid enum declaration will raise a fatal php error, backed value type can only be string or int.
Invalid enum declaration will raise a fatal php error when it is first used (runtime error, the others are compile errors), duplicate values are invalid, not only for values but also for the keys.
Error output or panic trace
.phpantom.toml
Additional context
No response