Skip to content

Commit e58f390

Browse files
committed
fix symfony deprecation reports
1 parent 68a3490 commit e58f390

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

scoper.php

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,16 @@
7373
$content
7474
),
7575

76+
// fix symfony deprecation reports, @see https://github.com/rectorphp/rector/issues/7434
77+
static function (string $filePath, string $prefix, string $content): string {
78+
if (! \str_ends_with($filePath, 'vendor/symfony/contracts/Deprecation/function.php')) {
79+
return $content;
80+
}
81+
82+
// comment out
83+
return str_replace('\trigger_error', '\\ \trigger_error', $content);
84+
},
85+
7686
static function (string $filePath, string $prefix, string $content): string {
7787
if (! \str_ends_with($filePath, 'src/Application/VersionResolver.php')) {
7888
return $content;

0 commit comments

Comments
 (0)