add patch point for shared ext build

This commit is contained in:
henderkes 2026-01-04 02:31:41 +01:00
parent 3a17cec521
commit 34910d18e9

View File

@ -401,10 +401,12 @@ class Extension
if (Config::getExt($this->getName(), 'type') === 'addon') { if (Config::getExt($this->getName(), 'type') === 'addon') {
return; return;
} }
$this->builder->emitPatchPoint('before-shared-ext[' . $this->getName() . ']-build');
match (PHP_OS_FAMILY) { match (PHP_OS_FAMILY) {
'Darwin', 'Linux' => $this->buildUnixShared(), 'Darwin', 'Linux' => $this->buildUnixShared(),
default => throw new WrongUsageException(PHP_OS_FAMILY . ' build shared extensions is not supported yet'), default => throw new WrongUsageException(PHP_OS_FAMILY . ' build shared extensions is not supported yet'),
}; };
$this->builder->emitPatchPoint('after-shared-ext[' . $this->getName() . ']-build');
} catch (SPCException $e) { } catch (SPCException $e) {
$e->bindExtensionInfo(['extension_name' => $this->getName()]); $e->bindExtensionInfo(['extension_name' => $this->getName()]);
throw $e; throw $e;