Skip to content
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

0.18.3 - Defining attribute classes with bitmask definition fails with Bad terminal sequence "|" at line 8 #1943

Closed
AndreasA opened this issue Mar 9, 2022 · 1 comment

Comments

@AndreasA
Copy link
Contributor

AndreasA commented Mar 9, 2022

Prettier 2.5.1

PHP Plugin 0.18.3

Input:

<?php declare(strict_types=1);

namespace App;

#[\Attribute(Attribute::TARGET_PROPERTY | Attribute::TARGET_METHOD | Attribute::IS_REPEATABLE)]
class Test
{
}

Output:

src/Test.php: Error: Bad terminal sequence "|" at line 3 (offset 73)

Expected behavior:
No error.

Though I think the issue is actually related to the php parser:
https://github.com/glayzzle/php-parser
glayzzle/php-parser#486
glayzzle/php-parser#654

@czosel
Copy link
Collaborator

czosel commented May 23, 2022

Fixed in v0.18.5 🎉

@czosel czosel closed this as completed May 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants