Skip to content

Commit a109ad2

Browse files
authored
Merge pull request #37 from PHPCompatibility/feature/php80-polyfill-allow-for-phptoken-class
PHP 8.0 polyfill: Update the ruleset
2 parents 141e5e5 + 610b50c commit a109ad2

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

PHPCompatibilitySymfonyPolyfillPHP80/ruleset.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
<!-- https://github.com/symfony/polyfill-php80/tree/master/Resources/stubs -->
1717
<exclude name="PHPCompatibility.Interfaces.NewInterfaces.stringableFound"/>
1818
<exclude name="PHPCompatibility.Classes.NewClasses.attributeFound"/>
19+
<exclude name="PHPCompatibility.Classes.NewClasses.phptokenFound"/>
1920
<exclude name="PHPCompatibility.Classes.NewClasses.unhandledmatcherrorFound"/>
2021
<exclude name="PHPCompatibility.Classes.NewClasses.valueerrorFound"/>
2122
</rule>

Test/SymfonyPolyfillPHP80Test.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,5 @@ class Foo implements Stringable {}
3232
}
3333

3434
class MyAttributes extends \Attribute {}
35+
36+
if (is_a($token, PhpToken::class)) {}

0 commit comments

Comments
 (0)