@@ -54,13 +54,16 @@ static function (string $filePath, string $prefix, string $content): string {
5454 if (!str_contains ($ filePath , 'mpdf/mpdf ' )) {
5555 return $ content ;
5656 }
57+ $ content = str_replace ("\\\\Mpdf \\\\" , "\\\\" . $ prefix . '\\\\Mpdf \\\\' , $ content );
58+ $ content = str_replace ("' \\\\Mpdf \\\\" , "' \\\\" . $ prefix . '\\\\Mpdf \\\\' , $ content );
59+ $ content = str_replace ("@var \\\\Mpdf \\\\" , "@var \\\\" . $ prefix . '\\\\Mpdf \\\\' , $ content );
60+ $ content = str_replace ("use Mpdf \\\\" , "use " . $ prefix . '\\\\Mpdf \\\\' , $ content );
61+ $ content = str_replace ("namespace Mpdf \\\\" , "namespace " . $ prefix . '\\\\Mpdf \\\\' , $ content );
5762
5863 $ file = basename ($ filePath );
5964
6065 return match ($ file ) {
61- 'Tag.php ' => str_replace ("'Mpdf \\\\Tag \\\\' " , "' $ prefix \\\\Mpdf \\\\Tag \\\\' " , $ content ),
6266 'FpdiTrait.php ' => str_replace ('use \\setasign \\' , "use \\$ prefix \\setasign \\" , $ content ),
63- 'Svg.php ' => preg_replace ("/ $ prefix \\\\(<svg[^>]*>)/ " , '$1 ' , $ content ),
6467 'Mpdf.php ' => str_replace (["$ prefix \\\\r \\\\n " , "$ prefix \\\\</t " ], ['\\r \\n ' , '</t ' ], $ content ),
6568 'functions.php ' => str_replace ("namespace $ prefix; " , '' , $ content ),
6669 'LoggerAwareInterface.php ' ,
0 commit comments