Skip to content

Commit 29fc616

Browse files
committed
build(polyfill): Remove Symfony polyfill PHP82 and update analyzer and phpstan config
- Remove symfony/polyfill-php82 from composer.json dependencies. - In composer-dependency-analyser.php, use SensitiveParameter::class in ignoreUnknownClasses and drop the DEV_DEPENDENCY_IN_PROD ignore for the polyfill file. - In benchmarks/SoarBench.php, switch $soar from nullable to non-nullable and initialize it in setUp. - Update phpstan.neon.dist to remove ignore rules for logicalAnd.resultUnused and symplify.noDynamicName. Signed-off-by: guanguans <ityaozm@gmail.com>
1 parent 90bbdf3 commit 29fc616

File tree

5 files changed

+4
-12
lines changed

5 files changed

+4
-12
lines changed

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
fail-fast: false
1313
matrix:
1414
os: [ windows-latest, macos-latest, ubuntu-latest ]
15-
# php: [ 8.1, 8.5 ]
16-
php: [ 8.1 ]
15+
php: [ 8.1, 8.5 ]
16+
# php: [ 8.1 ]
1717
dependency-version: [ prefer-stable ]
1818

1919
name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}

benchmarks/SoarBench.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#[Revs(10)]
2525
final class SoarBench
2626
{
27-
private ?Soar $soar = null;
27+
private Soar $soar;
2828

2929
public function setUp(): void
3030
{

composer-dependency-analyser.php

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
__DIR__.'/tests/',
2828
])
2929
->ignoreUnknownClasses([
30-
// '\SensitiveParameter',
30+
SensitiveParameter::class,
3131
])
3232
/** @see \ShipMonk\ComposerDependencyAnalyser\Analyser::CORE_EXTENSIONS */
3333
->ignoreErrorsOnExtensions(
@@ -42,11 +42,6 @@
4242
__DIR__.'/src/Support/helpers.php',
4343
[ErrorType::SHADOW_DEPENDENCY]
4444
)
45-
->ignoreErrorsOnPackageAndPath(
46-
'symfony/polyfill-php82',
47-
__DIR__.'/src/Concerns/HasSudoPassword.php',
48-
[ErrorType::DEV_DEPENDENCY_IN_PROD]
49-
)
5045
->ignoreErrorsOnPackageAndPath(
5146
'symfony/var-dumper',
5247
__DIR__.'/src/Concerns/WithDumpable.php',

composer.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@
7878
"spatie/pest-plugin-snapshots": "^2.2",
7979
"spaze/phpstan-disallowed-calls": "^4.7",
8080
"staabm/phpstan-todo-by": "^0.3",
81-
"symfony/polyfill-php82": "^1.33",
8281
"symfony/thanks": "^1.4",
8382
"symfony/var-dumper": "^6.4 || ^7.0 || ^8.0",
8483
"symplify/phpstan-rules": "^14.9",

phpstan.neon.dist

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@ parameters:
7979
ignoreErrors:
8080
# - identifier: cast.string
8181
# - identifier: encapsedStringPart.nonString
82-
# - identifier: logicalAnd.resultUnused
8382
# - identifier: return.void
84-
# - identifier: symplify.noDynamicName
8583
# - identifier: typePerfect.noMixedMethodCaller
8684
- identifier: argument.templateType
8785
- identifier: argument.type

0 commit comments

Comments
 (0)