Skip to content

Commit 610b50c

Browse files
committed
PHP 8.0 polyfill: Update the ruleset
A polyfill for the `PhpToken` class was added in v 1.25.0 of the `polyfill-php80` package. Ref: * symfony/polyfill-php80@752f73d
1 parent 141e5e5 commit 610b50c

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)