Skip to content

Commit 414faf8

Browse files
committed
Fix default stability and update test web server
1 parent 93d76e0 commit 414faf8

File tree

4 files changed

+13
-20
lines changed

4 files changed

+13
-20
lines changed

src/Package/PHP/Convey/Command/Pecl.php

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -76,20 +76,14 @@ protected function prepare()
7676
$this->name = $matches['package'];
7777
$this->url = WebsiteFactory::getWebsite()->getBaseUrl() . '/get/' . $matches['package'];
7878

79-
if (isset($matches['stability']) && $matches['stability'] !== '') {
80-
$this->stability = $matches['stability'];
81-
$this->url .= '-' . $matches['stability'];
82-
} else {
83-
$this->stability = 'stable';
84-
}
79+
$this->stability = isset($matches['stability']) && $matches['stability'] !== '' ? $matches['stability'] : 'stable';
80+
$this->version = isset($matches['version']) && $matches['version'] !== '' ? $matches['version'] : 'latest';
81+
$this->prettyVersion = $this->version === 'latest' ? 'latest-' . $this->stability : $this->version;
8582

86-
if (isset($matches['version']) && $matches['version'] !== '') {
87-
$this->url .= '/' . $matches['version'];
88-
$this->prettyVersion = $matches['version'];
89-
$this->version = $matches['version'];
83+
if ($this->version === 'latest') {
84+
$this->url .= '-' . $this->stability;
9085
} else {
91-
$this->version = 'latest';
92-
$this->prettyVersion = 'latest-' . $this->stability;
86+
$this->url .= '/' . $this->version;
9387
}
9488
}
9589

189 KB
Binary file not shown.
-185 KB
Binary file not shown.

tests/pecl-website/web/index.php

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -53,23 +53,22 @@ static function ($errno, $errstr, $errfile, $errline): void {
5353
}
5454
$filesMap = [
5555
'/get/amqp/1.4.0' => "{$assetsDir}/amqp-1.4.0.tgz",
56-
'/get/apc' => "{$assetsDir}/APC-3.1.13.tgz",
5756
'/get/apc-stable' => "{$assetsDir}/APC-3.1.9.tgz",
5857
'/get/apc/3.1.13' => "{$assetsDir}/APC-3.1.13.tgz",
59-
'/get/apcu' => "{$assetsDir}/apcu-5.1.19.tgz",
58+
'/get/apcu-stable' => "{$assetsDir}/apcu-5.1.19.tgz",
6059
'/get/apcu-beta' => "{$assetsDir}/apcu-5.1.0.tgz",
6160
'/get/apcu/4.0.6' => "{$assetsDir}/apcu-4.0.6.tgz",
6261
'/get/memcache-beta' => "{$assetsDir}/memcache-3.0.8.tgz",
6362
'/get/memcache/3.0.8' => "{$assetsDir}/memcache-3.0.8.tgz",
6463
'/get/memcache/8.0' => "{$assetsDir}/memcache-8.0.tgz",
65-
'/get/mongo' => "{$assetsDir}/mongo-1.6.16.tgz",
64+
'/get/mongo-stable' => "{$assetsDir}/mongo-1.6.16.tgz",
6665
'/get/mongo/1.5.4' => "{$assetsDir}/mongo-1.5.4.tgz",
6766
'/get/oci8/2.0.8' => "{$assetsDir}/oci8-2.0.8.tgz",
68-
'/get/sqlsrv' => "{$assetsDir}/sqlsrv-5.9.0beta2.tgz",
69-
'/get/swoole' => "{$assetsDir}/swoole-4.6.2.tgz",
70-
'/get/tensor' => "{$assetsDir}/tensor-2.1.4.tgz",
71-
'/get/yaml' => "{$assetsDir}/yaml-2.2.1.tgz",
72-
'/get/zstd' => "{$assetsDir}/zstd-0.10.0.tgz",
67+
'/get/sqlsrv-stable' => "{$assetsDir}/sqlsrv-5.10.1.tgz",
68+
'/get/swoole-stable' => "{$assetsDir}/swoole-4.6.2.tgz",
69+
'/get/tensor-stable' => "{$assetsDir}/tensor-2.1.4.tgz",
70+
'/get/yaml-stable' => "{$assetsDir}/yaml-2.2.1.tgz",
71+
'/get/zstd-stable' => "{$assetsDir}/zstd-0.10.0.tgz",
7372
];
7473
$tgzToTarMap = [
7574
'/get/amqp/1.4.0?uncompress=1' => "{$assetsDir}/amqp-1.4.0.tgz",

0 commit comments

Comments
 (0)