Skip to content

Commit

Permalink
undo prefixing for more files
Browse files Browse the repository at this point in the history
  • Loading branch information
diosmosis committed Feb 5, 2024
1 parent ab9425b commit e69b638
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions resources/core-scoper.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,13 +140,15 @@ static function (string $filePath, string $prefix, string $content) use ($isRena
return $content;
},

// patchers for php-di
// patcher to remove prefixing from template files
static function (string $filePath, string $prefix, string $content) use ($isRenamingReferences): string {
if ($isRenamingReferences) {
return $content;
}

if (preg_match('%src/Compiler/Template\\.php$%', $filePath)) {
if (preg_match('%php-di/php-di/src/Compiler/Template\\.php$%', $filePath)
|| preg_match('%symfony/error-handler/Resources/.*\\.php$%', $filePath)
) {
$content = preg_replace('%namespace Matomo\\\\Dependencies;\s+%', '', $content);
}

Expand Down

0 comments on commit e69b638

Please sign in to comment.