Skip to content

Conversation

@oojacoboo
Copy link
Contributor

@oojacoboo oojacoboo commented Dec 18, 2021

I've added a single file/test sql_statement.php.inc. This was added to the 8.1 fixtures for the Php80 dir. However, I believe these tests should all be in Php81. The organization seems a bit sloppy.

When running the tests, I get the following error:

Rector\Tests\Php80\Rector\Class_\AnnotationToAttributeRector\Php81NestedAttributesRectorTest::test with data set #0 (Symplify\SmartFileSystem\SmartFileInfo Object (...))
PHPStan\PhpDocParser\Parser\ParserException: Unexpected token "\"", expected ')' at offset 144

Honestly, the PHPUnit stack-trace isn't helpful. I have no idea where that error actually originates. That's due to the way the tests are designed with these include files. Nonetheless, I think this test is sufficient to setup and illustrate the syntax parsing issue.

Closes rectorphp/rector#6859

@samsonasik
Copy link
Member

@oojacoboo I cherry-picked your commit at PR #1516

TomasVotruba pushed a commit that referenced this pull request Dec 18, 2021
…AttributeRector (#1516)

* Add test with SQL in nested annotation argument

* update fixture namespace

* Closes #1515 Fixes rectorphp/rector#6859

* [ci-review] Rector Rectify

* clean up

* clean up

Co-authored-by: Jacob Thomason <jacob@thomason.xxx>
Co-authored-by: GitHub Action <action@github.com>
@oojacoboo oojacoboo deleted the annotation-parsing branch December 18, 2021 15:54
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

Successfully merging this pull request may close these issues.

Annotation parsing issue

2 participants