Skip to content

Commit 513568a

Browse files
authored
Fix the Symfony trigger_deprecation usage (#681)
1 parent 5199dd6 commit 513568a

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

scoper.inc.php

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,17 @@
6868
),
6969
);
7070

71+
$symfonyDeprecationContracts = array_map(
72+
static fn (SplFileInfo $fileInfo) => $fileInfo->getPathname(),
73+
iterator_to_array(
74+
Finder::create()
75+
->files()
76+
->in(__DIR__ . '/vendor/symfony/deprecation-contracts')
77+
->name('*.php'),
78+
false,
79+
),
80+
);
81+
7182
return [
7283
'whitelist' => [
7384
Finder::class,
@@ -79,10 +90,14 @@
7990
// Symfony global constants
8091
'/^SYMFONY\_[\p{L}_]+$/',
8192
],
93+
'exclude-functions' => [
94+
'trigger_deprecation',
95+
],
8296
'exclude-files' => [
8397
...$jetBrainStubs,
8498
...$polyfillsBootstraps,
8599
...$polyfillsStubs,
100+
...$symfonyDeprecationContracts,
86101
],
87102
'patchers' => [
88103
//

0 commit comments

Comments
 (0)