isStatic()) { $php_src = $installer->getBuildPackage('php')->getSourceDir(); SourcePatcher::patchFile('musl_static_readline.patch', $php_src); } } #[AfterStage('php', [php::class, 'makeCliForUnix'], 'ext-readline')] public function afterMakeLinuxCli(PackageInstaller $installer, ToolchainInterface $toolchain): void { if ($toolchain->isStatic()) { $php_src = $installer->getBuildPackage('php')->getSourceDir(); SourcePatcher::patchFile('musl_static_readline.patch', $php_src, true); } } }