diff --git a/config/ext.json b/config/ext.json index dc69bf36..b9fc28a5 100644 --- a/config/ext.json +++ b/config/ext.json @@ -96,7 +96,7 @@ "type": "external", "source": "ev", "arg-type-windows": "with", - "shared-ext-depends": [ + "ext-depends": [ "sockets" ] }, @@ -371,9 +371,6 @@ "zlib", "session" ], - "shared-ext-depends": [ - "session" - ], "build-with-php": true }, "memcached": { @@ -392,9 +389,6 @@ "ext-depends": [ "session", "zlib" - ], - "shared-ext-depends": [ - "session" ] }, "mongodb": { @@ -420,7 +414,7 @@ "source": "msgpack", "arg-type-unix": "with", "arg-type-win": "enable", - "shared-ext-depends": [ + "ext-depends": [ "session" ] }, @@ -429,9 +423,6 @@ "arg-type": "with", "ext-depends": [ "mysqlnd" - ], - "shared-ext-depends": [ - "mysqlnd" ] }, "mysqlnd": { @@ -792,10 +783,7 @@ "lib-depends": [ "libssh2" ], - "shared-ext-depends": [ - "openssl" - ], - "ext-depends-windows": [ + "ext-depends": [ "openssl", "zlib" ] diff --git a/src/SPC/builder/Extension.php b/src/SPC/builder/Extension.php index f25b82a7..6fd8b52f 100644 --- a/src/SPC/builder/Extension.php +++ b/src/SPC/builder/Extension.php @@ -121,9 +121,6 @@ class Extension foreach (Config::getExt($this->name, 'ext-suggests', []) as $name) { $this->addExtensionDependency($name, true); } - foreach (Config::getExt($this->name, 'shared-ext-depends', []) as $name) { - $this->addExtensionDependency($name); - } return $this; } @@ -319,14 +316,13 @@ class Extension logger()->info('extension ' . $this->getName() . ' already built, skipping'); return; } - foreach (Config::getExt($this->name, 'shared-ext-depends', []) as $name) { - $dependencyExt = $this->builder->getExt($name); - if ($dependencyExt === null) { - throw new RuntimeException("extension {$this->name} requires shared extension {$name}"); + foreach ($this->dependencies as $dependency) { + if (!$dependency instanceof Extension) { + continue; } - if ($dependencyExt->isBuildShared()) { - logger()->info('extension ' . $this->getName() . ' requires shared extension ' . $name); - $dependencyExt->buildShared(); + if (!$dependency->isBuildStatic()) { + logger()->info('extension ' . $this->getName() . ' requires extension ' . $dependency->getName()); + $dependency->buildShared(); } } match (PHP_OS_FAMILY) {