Skip to content

Commit 7a0f0c9

Browse files
Tests: test a function deprecated before 8.4
So that the tests that run on 8.3 pass
1 parent 621dd40 commit 7a0f0c9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Tests/data/ExtraSniffsApplied.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
declare( strict_types = 1 );
33

44
function usesDeprecated() {
5-
lcg_value();
5+
utf8_encode( "foo" );
66
}
77

88
#[FirstAttrib, SecondAttrib]

src/Tests/data/ExtraSniffsApplied.php.fixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
declare( strict_types = 1 );
33

44
function usesDeprecated() {
5-
lcg_value();
5+
utf8_encode( "foo" );
66
}
77

88
#[FirstAttrib]

src/Tests/data/ExtraSniffsApplied.report

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ FILE: {dir}/data/ExtraSniffsApplied.php
22
--------------------------------------------------------------------------------
33
FOUND 2 ERRORS AFFECTING 2 LINES
44
--------------------------------------------------------------------------------
5-
5 | ERROR | [ ] Function lcg_value() has been deprecated
5+
5 | ERROR | [ ] Function utf8_encode() has been deprecated
66
| | (Generic.PHP.DeprecatedFunctions.Deprecated)
77
8 | ERROR | [x] 2 attributes are joined.
88
| | (SlevomatCodingStandard.Attributes.DisallowAttributesJoining.DisallowedAttributesJoining)

0 commit comments

Comments
 (0)