-
Notifications
You must be signed in to change notification settings - Fork 660
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Syntax error on enum #8877
Comments
I found these snippets: https://psalm.dev/r/b10ef1cbd6<?php
declare(strict_types=1);
namespace Doctrine\Tests\Common\Lexer;
enum TokenType
{
case INT;
case OPERATOR;
case STRING;
}
|
Make sure nikic/php-parser was also updated to the latest version |
$ composer outdated
Info from https://repo.packagist.org: #StandWithUkraine
Color legend:
- patch or minor release available - update recommended
- major release available - update possible
Direct dependencies required in composer.json:
Everything up to date
Transitive dependencies not required in composer.json:
phpstan/phpdoc-parser 1.13.1 1.15.0 PHPDoc parser with support for nullable, intersection and generic types Almost everything seems up to date. I'm still using PHP 8.1 though. |
Maybe this is the cause? EDIT: changing that indeed makes the issue disappear 🤔 |
Closing, I think that's expected, I should be using |
And to reproduce it on psalm.dev you could add |
I found these snippets: https://psalm.dev/r/b10ef1cbd6<?php
declare(strict_types=1);
namespace Doctrine\Tests\Common\Lexer;
enum TokenType
{
case INT;
case OPERATOR;
case STRING;
}
|
Good to know! Thanks! |
Weird issue that I cannot reproduce on https://psalm.dev/r/b10ef1cbd6 : https://github.com/doctrine/lexer/actions/runs/3664018448/jobs/6194159893#step:6:54
Why is Psalm having an issue with enums? I'm using version 5.1.0
The text was updated successfully, but these errors were encountered: