diff --git a/src/SPC/command/BuildPHPCommand.php b/src/SPC/command/BuildPHPCommand.php index e40a7d83a..de6a2b52f 100644 --- a/src/SPC/command/BuildPHPCommand.php +++ b/src/SPC/command/BuildPHPCommand.php @@ -207,6 +207,8 @@ public function handle(): int // add static-php-cli.version to main.c, in order to debug php failure more easily SourcePatcher::patchSPCVersionToPHP($this->getApplication()->getVersion()); + // clean old modules that may conflict with the new php build + FileSystem::removeDir(BUILD_MODULES_PATH); // start to build $builder->buildPHP($rule);