diff --git a/tests_env/composer.json b/tests_env/composer.json index 7e0ed8960c..62ee29e4e2 100644 --- a/tests_env/composer.json +++ b/tests_env/composer.json @@ -20,10 +20,12 @@ }, "scripts": { "post-install-cmd": [ - "php ./tasks/fix-php82-codeception.php" + "php ./tasks/fix-php82-codeception.php", + "php ./tasks/fix-php83-codeception.php" ], "post-update-cmd": [ - "php ./tasks/fix-php82-codeception.php" + "php ./tasks/fix-php82-codeception.php", + "php ./tasks/fix-php83-codeception.php" ] } } diff --git a/tests_env/tasks/fix-php83-codeception.php b/tests_env/tasks/fix-php83-codeception.php new file mode 100644 index 0000000000..3477a8c14c --- /dev/null +++ b/tests_env/tasks/fix-php83-codeception.php @@ -0,0 +1,68 @@ + __DIR__ . '/../vendor/codeception/codeception/src/Codeception/Lib/Generator/Actions.php', + 'find' => [ + $codeceptionActionsFind + ], + 'replace' => [ + $codeceptionActionsReplacement, + ], + ], + [ + 'file' => __DIR__ . '/../vendor/codeception/codeception/src/Codeception/Lib/Generator/Actor.php', + 'find' => [ + $codeceptionActorFind + ], + 'replace' => [ + $codeceptionActorReplacement, + ], + ], +]; + +// 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); +}