Closed fitztrev closed 5 years ago
It seems the issue is only on PHP 7.2. Just tried on 7.3 and the warning is not there.
Had to do with PHP zend.assertions
config. See rectorphp/rector#1157 for more details.
It still should pass even with assertions on. I'll try to investigate, what is causing this.
Probably some attribute copying
Re-opening because I was able to generate some steps to reproduce and a failing test here: https://github.com/rectorphp/rector/pull/1284
I'll leave it to this project's maintainers to determine how/if they would like to handle. Thanks
Can repro. I think that the end attributes on the nop statement are completely missing in this case, which is why we get a -1 token end pos.
I just attempted a fix in #601. This was my first dive into this code so it could definitely use a review. Could either of you take a look and let me know? @nikic @TomasVotruba
I'm using
rectorphp/rector
and when I run the following command, I get a warning message when it found a PHP file where the contents were only comments.Contents of
app/Test.php
:Output: