Skip to content

Commit e64d0c0

Browse files
authored
Merge pull request #75 from PHPCompatibility/feature/ruleset-prevent-ignoring-too-much
Polyfills 8.4/8.5: remove overzealous exclusion
2 parents b833854 + e2421b7 commit e64d0c0

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

PHPCompatibilitySymfonyPolyfillPHP84/ruleset.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,7 @@
2424
<!--
2525
Detection for the Deprecated attribute is incomplete in PHPCompatibility 10.0.0-alpha1.
2626
Handling for this should be added once the detection implementation is known.
27-
The following exclude is a temporary placeholder, which should be removed as soon as
28-
possible as it will ignore too much.
2927
-->
30-
<exclude name="PHPCompatibility.Attributes.NewAttributes.PHPStormAttributeFound"/>
3128

3229
<exclude name="PHPCompatibility.Classes.NewClasses.reflectionconstantFound"/>
3330
</rule>

PHPCompatibilitySymfonyPolyfillPHP85/ruleset.xml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,7 @@
1414
<!--
1515
Detection for the DelayedTargetValidation and NoDiscard attributes is incomplete in PHPCompatibility 10.0.0-alpha1.
1616
This section should be filled out once the detection implementation is known.
17-
The following exclude is a temporary placeholder, which should be removed as soon as
18-
possible as it will ignore too much.
1917
-->
20-
<exclude name="PHPCompatibility.Attributes.NewAttributes.Found"/>
2118
</rule>
2219

2320
<!-- Prevent false positives being thrown when run over the code of polyfill-php84 itself. -->

Test/SymfonyPolyfillPHP84Test.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,9 @@
2424

2525
$r = new ReflectionConstant(ClassName::CONSTANT_NAME);
2626

27+
/*
28+
// This test will not help at this time as we can't just ignore the use of the Deprecated attribute
29+
// with the current attribute handling in PHPCompatibility 10.0.
2730
#[Deprecated]
2831
function foo() {}
32+
*/

Test/SymfonyPolyfillPHP85Test.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
array_first($array);
99
array_last($array);
1010

11+
/*
12+
// This test will not help at this time as we can't just ignore the use of the DelayedTargetValidation/NoDiscard attribute
13+
// with the current attribute handling in PHPCompatibility 10.0.
1114
#[DelayedTargetValidation]
1215
#[NoDiscard]
1316
function dummy() {}
17+
*/

0 commit comments

Comments
 (0)