Add fix for container dump command
[MAILPOET-3239]
This commit is contained in:
committed by
Veljko V
parent
85f56b2a6f
commit
e1efa1e14e
@@ -34,6 +34,7 @@
|
|||||||
"php fix-swiftmailer.php",
|
"php fix-swiftmailer.php",
|
||||||
"php fix-validator.php",
|
"php fix-validator.php",
|
||||||
"php fix-monolog.php",
|
"php fix-monolog.php",
|
||||||
|
"php fix-symfony-di.php",
|
||||||
"php fix-symfony-polyfill.php"
|
"php fix-symfony-polyfill.php"
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
27
prefixer/fix-symfony-di.php
Normal file
27
prefixer/fix-symfony-di.php
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
// throw exception if anything fails
|
||||||
|
set_error_handler(function ($severity, $message, $file, $line) {
|
||||||
|
throw new ErrorException($message, 0, $severity, $file, $line);
|
||||||
|
});
|
||||||
|
|
||||||
|
$replacements = [
|
||||||
|
// Replace usage of regexp from constant to avoid installing additional package symfony/config
|
||||||
|
// The symfony/config causes issues with serialization in integration tests
|
||||||
|
[
|
||||||
|
'file' => '../vendor-prefixed/symfony/dependency-injection/Dumper/PhpDumper.php',
|
||||||
|
'find' => [
|
||||||
|
'\MailPoetVendor\Symfony\Component\DependencyInjection\Loader\FileLoader::ANONYMOUS_ID_REGEXP',
|
||||||
|
],
|
||||||
|
'replace' => [
|
||||||
|
"'/^\\.\\d+_[^~]*+~[._a-zA-Z\\d]{7}$/'",
|
||||||
|
],
|
||||||
|
],
|
||||||
|
];
|
||||||
|
|
||||||
|
// Apply replacements
|
||||||
|
foreach ($replacements as $singleFile) {
|
||||||
|
$data = file_get_contents($singleFile['file']);
|
||||||
|
$data = str_replace($singleFile['find'], $singleFile['replace'], $data);
|
||||||
|
file_put_contents($singleFile['file'], $data);
|
||||||
|
}
|
Reference in New Issue
Block a user