Skip to content

Commit 3bb6ba7

Browse files
Improve php 8 support
1 parent 244b670 commit 3bb6ba7

File tree

2 files changed

+11
-2
lines changed

2 files changed

+11
-2
lines changed

SymfonyCustom/Sniffs/Namespaces/UnusedUseSniff.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,16 @@ private function determineType(File $phpcsFile, int $beforePtr, int $ptr): ?stri
415415
if (
416416
in_array(
417417
$beforeCode,
418-
[T_NS_SEPARATOR, T_OBJECT_OPERATOR, T_DOUBLE_COLON, T_FUNCTION, T_CONST, T_AS, T_INSTEADOF],
418+
[
419+
T_NS_SEPARATOR,
420+
T_NULLSAFE_OBJECT_OPERATOR,
421+
T_OBJECT_OPERATOR,
422+
T_DOUBLE_COLON,
423+
T_FUNCTION,
424+
T_CONST,
425+
T_AS,
426+
T_INSTEADOF,
427+
],
419428
true
420429
)
421430
) {

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"require": {
2020
"php": ">=7.2",
2121
"ext-mbstring": "*",
22-
"squizlabs/php_codesniffer": "^3.5",
22+
"squizlabs/php_codesniffer": "^3.5.8",
2323
"symfony/console": "^4.4 || ^5.0",
2424
"symfony/twig-bridge": "^4.4 || ^5.0",
2525
"twig/twig": "^2.12 || ^3.0"

0 commit comments

Comments
 (0)