My Code:
namespace App\Enum;
enum HomeStatus: string
{
case RENT = 'rent';
case MOVE_IN = 'move_in';
case SOLD = 'sold';
case COMING_SOON = 'coming_soon';
}
The code above is executing and working but the editor has the following error:
Unexpected 'Name'. Expected ';'.intelephense(1001)
I am using Intelephense v1.8.0
which I believe is the latest.
In the Change Log it says:
PHP 8.1 is now the default version.
I'm thinking that either that's not the case or PHP 8.1 does not yet have support for enums.
Is there a way to resolve this or is this something that is not yet supported?
EDIT As requested here's a screenshot of the error.
Name
showing in your code. Can you show the code giving that error? – Johannclass Foo {
, the error reads Unexpected 'EndOfFile'. – Tetchy