phpstan / phpdoc-parser

Next-gen phpDoc parser with support for intersection types and generics
MIT License
1.31k stars 62 forks source link

InvalidTagValueNode when parsing Doctrine annotations #207

Closed sylfabre closed 1 year ago

sylfabre commented 1 year ago

Hello

This annotation is parsed as InvalidTagValueNode with version 1.23.0 while is worked correctly with version 1.17.1

use ApiPlatform\Core\Annotation\ApiResource;

/**
 * @ApiResource(
 *     itemOperations={
 *         "get"={
 *             "security"="is_granted(
                    constant('REDACTED'),
                    object
                    )",
 *              "normalization_context"={"groups"={"Redacted:read"}}
 *         }
 *     }
 * )
 */
class OrganizationApiDto {}

This is important for us as it makes UnusedUsesSniff report false-positives in a similar way as https://github.com/phpstan/phpdoc-parser/issues/205

sylfabre commented 1 year ago

I found out that v1.22.0 introduced the regression

ondrejmirtes commented 1 year ago

Fixed: https://github.com/phpstan/phpdoc-parser/commit/57457750d3f5c20834c1695e776bc21c909af10f

sylfabre commented 1 year ago

Thanks a lot @ondrejmirtes you rock!

github-actions[bot] commented 1 year ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.