Skip to content

Commit d612255

Browse files
authored
Merge pull request #346 from asgrim/dep-updates
Dep updates and bump composer versions
2 parents 67409da + c92b9c2 commit d612255

File tree

5 files changed

+30
-20
lines changed

5 files changed

+30
-20
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ jobs:
5454
php-versions:
5555
- '8.1.33'
5656
- '8.2.29'
57-
- '8.3.23'
58-
- '8.4.10'
59-
- '8.5.0alpha2'
57+
- '8.3.25'
58+
- '8.4.12'
59+
- '8.5.0beta2'
6060
steps:
6161
- name: "Purge built-in PHP version"
6262
run: |
@@ -97,7 +97,7 @@ jobs:
9797
run: echo "php_src_download_url=https://www.php.net/distributions/php-${{ matrix.php-versions }}.tar.gz" >> $GITHUB_ENV
9898
- name: "Set php-src download URL (8.5 pre-release)"
9999
if: ${{ startsWith(matrix.php-versions, '8.5.') }}
100-
run: echo "php_src_download_url=https://downloads.php.net/~edorian/php-${{ matrix.php-versions }}.tar.gz" >> $GITHUB_ENV
100+
run: echo "php_src_download_url=https://downloads.php.net/~daniels/php-${{ matrix.php-versions }}.tar.gz" >> $GITHUB_ENV
101101
- name: "Install PHP ${{ matrix.php-versions }}"
102102
run: |
103103
mkdir -p /tmp/php

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,15 @@
2828
],
2929
"require": {
3030
"php": "8.1.*||8.2.*||8.3.*||8.4.*||8.5.*",
31-
"composer/composer": "^2.8.10",
31+
"composer/composer": "^2.8.11",
3232
"composer/pcre": "^3.3.2",
33-
"composer/semver": "^3.4.3",
34-
"fidry/cpu-core-counter": "^1.2",
33+
"composer/semver": "^3.4.4",
34+
"fidry/cpu-core-counter": "^1.3.0",
3535
"illuminate/container": "^10.48.28",
3636
"psr/container": "^2.0.2",
37-
"symfony/console": "^6.4.24",
37+
"symfony/console": "^6.4.25",
3838
"symfony/event-dispatcher": "^6.4.24",
39-
"symfony/process": "^6.4.24",
39+
"symfony/process": "^6.4.25",
4040
"webmozart/assert": "^1.11"
4141
},
4242
"require-dev": {
@@ -45,7 +45,7 @@
4545
"doctrine/coding-standard": "^13.0.1",
4646
"phpunit/phpunit": "^10.5.48",
4747
"psalm/plugin-phpunit": "^0.19.5",
48-
"vimeo/psalm": "^6.13.0"
48+
"vimeo/psalm": "^6.13.1"
4949
},
5050
"replace": {
5151
"symfony/polyfill-php81": "*",

composer.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ComposerIntegration/BundledPhpExtensionsRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ class BundledPhpExtensionsRepository extends ArrayRepository
9696
[
9797
'name' => 'opcache',
9898
'type' => ExtensionType::ZendExtension,
99-
'require' => ['php' => '>= 5.5.0'],
99+
'require' => ['php' => '>= 5.5.0, < 8.5.0'],
100100
],
101101
// ['name' => 'openssl'], // Not building in CI
102102
['name' => 'pcntl'],

test/install-bundled-php-exts.php

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
declare(strict_types=1);
44

55
use Composer\Package\PackageInterface;
6+
use Composer\Package\Version\VersionParser;
67
use Php\Pie\ComposerIntegration\BundledPhpExtensionsRepository;
78
use Php\Pie\Platform\TargetPhp\PhpBinaryPath;
89
use Php\Pie\Platform\TargetPlatform;
@@ -17,17 +18,26 @@
1718
exit(1);
1819
}
1920

20-
$phpBinaryPath = PhpBinaryPath::fromPhpConfigExecutable($phpConfigPath);
21+
$phpBinaryPath = PhpBinaryPath::fromPhpConfigExecutable($phpConfigPath);
22+
$phpVersionConstraint = (new VersionParser())->parseConstraints($phpBinaryPath->version());
2123

2224
$packageNames = array_map(
2325
static fn (PackageInterface $package): string => $package->getName(),
24-
BundledPhpExtensionsRepository::forTargetPlatform(
25-
TargetPlatform::fromPhpBinaryPath(
26-
$phpBinaryPath,
27-
null,
28-
),
29-
)
30-
->getPackages(),
26+
array_filter(
27+
BundledPhpExtensionsRepository::forTargetPlatform(
28+
TargetPlatform::fromPhpBinaryPath(
29+
$phpBinaryPath,
30+
null,
31+
),
32+
)
33+
->getPackages(),
34+
static function (PackageInterface $package) use ($phpVersionConstraint): bool {
35+
$requires = $package->getRequires();
36+
37+
return ! array_key_exists('php', $requires)
38+
|| $requires['php']->getConstraint()->matches($phpVersionConstraint);
39+
},
40+
),
3141
);
3242

3343
$anyFailures = false;

0 commit comments

Comments
 (0)