default extract for pie sources

This commit is contained in:
henderkes
2026-07-21 13:28:02 +07:00
parent 15e2b7bc8a
commit b437b2fad7
17 changed files with 2 additions and 17 deletions

View File

@@ -4,7 +4,6 @@ ext-ev:
source:
type: pie
repo: osmanov/pecl-ev
extract: php-src/ext/ev
metadata:
license-files: [LICENSE]
license: PHP-3.01

View File

@@ -4,7 +4,6 @@ ext-grpc:
source:
type: pie
repo: grpc/grpc-php-ext
extract: php-src/ext/grpc
metadata:
license-files: [LICENSE]
license: Apache-2.0

View File

@@ -4,7 +4,6 @@ ext-imagick:
source:
type: pie
repo: imagick/imagick
extract: php-src/ext/imagick
metadata:
license-files: [LICENSE]
license: PHP-3.01

View File

@@ -4,7 +4,6 @@ ext-inotify:
source:
type: pie
repo: arnaud-lb/inotify
extract: php-src/ext/inotify
metadata:
license-files: [LICENSE]
license: PHP-3.01

View File

@@ -4,7 +4,6 @@ ext-memcached:
source:
type: pie
repo: php-memcached/php-memcached
extract: php-src/ext/memcached
metadata:
license-files: [LICENSE]
license: PHP-3.01

View File

@@ -4,7 +4,6 @@ ext-msgpack:
source:
type: pie
repo: msgpack/msgpack-php
extract: php-src/ext/msgpack
metadata:
license-files: [LICENSE]
license: BSD-3-Clause

View File

@@ -4,7 +4,6 @@ ext-mysqlnd_ed25519:
source:
type: pie
repo: mariadb/mysqlnd_ed25519
extract: php-src/ext/mysqlnd_ed25519
metadata:
license-files: [LICENSE]
license: BSD-3-Clause

View File

@@ -4,7 +4,6 @@ ext-mysqlnd_parsec:
source:
type: pie
repo: mariadb/mysqlnd_parsec
extract: php-src/ext/mysqlnd_parsec
metadata:
license-files: [LICENSE]
license: BSD-3-Clause

View File

@@ -4,7 +4,6 @@ ext-opentelemetry:
source:
type: pie
repo: open-telemetry/ext-opentelemetry
extract: php-src/ext/opentelemetry
metadata:
license-files: [LICENSE]
license: Apache-2.0

View File

@@ -4,7 +4,6 @@ ext-parallel:
source:
type: pie
repo: pecl/parallel
extract: php-src/ext/parallel
metadata:
license-files: [LICENSE]
license: PHP-3.01

View File

@@ -4,7 +4,6 @@ ext-pcov:
source:
type: pie
repo: pecl/pcov
extract: php-src/ext/pcov
metadata:
license-files: [LICENSE]
license: PHP-3.01

View File

@@ -4,7 +4,6 @@ ext-redis:
source:
type: pie
repo: phpredis/phpredis
extract: php-src/ext/redis
metadata:
license-files: [LICENSE]
license: PHP-3.01

View File

@@ -4,7 +4,6 @@ ext-spx:
source:
type: pie
repo: noisebynorthwest/php-spx
extract: php-src/ext/spx
metadata:
license-files: [LICENSE]
license: GPL-3.0-or-later

View File

@@ -4,7 +4,6 @@ ext-uuid:
source:
type: pie
repo: pecl/uuid
extract: php-src/ext/uuid
metadata:
license-files: [LICENSE]
license: LGPL-2.1-only

View File

@@ -4,7 +4,6 @@ ext-xlswriter:
source:
type: pie
repo: viest/xlswriter
extract: php-src/ext/xlswriter
metadata:
license-files: [LICENSE]
license: BSD-2-Clause

View File

@@ -4,7 +4,6 @@ ext-zip:
source:
type: pie
repo: pecl/zip
extract: php-src/ext/zip
metadata:
license-files: [LICENSE]
license: PHP-3.01

View File

@@ -22,12 +22,13 @@ class PIE implements DownloadTypeInterface, CheckUpdateInterface
if (!$dist_url || !$dist_type) {
throw new DownloaderException("failed to find {$name} dist info from packagist");
}
$extract = $config['extract'] ?? ('php-src/ext/' . strtolower(preg_replace('/^ext-/i', '', $name)));
$name = str_replace('/', '_', $config['repo']);
$version = $first['version'] ?? 'unknown';
$filename = "{$name}-{$version}." . ($dist_type === 'zip' ? 'zip' : 'tar.gz');
$path = DOWNLOAD_PATH . DIRECTORY_SEPARATOR . $filename;
default_shell()->executeCurlDownload($dist_url, $path, retries: $downloader->getRetry());
return DownloadResult::archive($filename, $config, $config['extract'] ?? null, version: $version, downloader: static::class);
return DownloadResult::archive($filename, $config, $extract, version: $version, downloader: static::class);
}
public function checkUpdate(string $name, array $config, ?string $old_version, ArtifactDownloader $downloader): CheckUpdateResult