Open marcioAlmada opened 5 years ago
1) Yay\ParserOptimizationTest::testExpressionParserWithGoodExpressions with data set
"Expression 446" ('3 << 3 >> 2 . 2', true)
The behavior of unparenthesized expressions containing both '.' and '>>'/'<<'
will change in PHP 8: '<<'/'>>' will take a higher precedence
There are still some precedence changes on some operators though, these last failures will require some thought. The ExpressionParser will have to be conditionally different regarding the PHP version.
BTW we should be thankfull these warnings were added, this is something nobody would notice without the engine warnings/notices.
1) Yay\ParserOptimizationTest::testExpressionParserWithGoodExpressions with data set "Expression 446" ('3 << 3 >> 2 . 2', true)
The behavior of unparenthesized expressions containing both '.' and '>>'/'<<' will change in PHP 8: '<<'/'>>' will take a higher precedence
There are still some precedence changes on some operators though, these last failures will require some thought. The ExpressionParser will have to be conditionally different regarding the PHP version.
BTW we should be thankfull these warnings were added, this is something nobody would notice without the engine warnings/notices.
IMO you should not fix these in your tests. Even though these are rightful warnings from PHP that the code generated might be not what you want. Nevertheless, it's still 100% valid PHP syntax. The tool did exactly what it was told to. So I don't see a problem.
Follow up to #64