diff --git a/.github/pie-behaviour-tests/Dockerfile b/.github/pie-behaviour-tests/Dockerfile index 04d47aef..274aaffd 100644 --- a/.github/pie-behaviour-tests/Dockerfile +++ b/.github/pie-behaviour-tests/Dockerfile @@ -29,8 +29,13 @@ RUN export DEBIAN_FRONTEND="noninteractive"; \ ARG PHP_VERSION=8.4 RUN mkdir -p /usr/local/src/php; \ cd /usr/local/src/php; \ - FULL_LATEST_VERSION=`curl -fsSL "https://www.php.net/releases/index.php?json&max=1&version=$PHP_VERSION" | jq -r '.[].source[]|select(.filename|endswith(".gz")).filename'`; \ - wget -O php.tgz "https://www.php.net/distributions/$FULL_LATEST_VERSION" ; \ + if [ "${PHP_VERSION%-dev}" != "$PHP_VERSION" ]; then \ + PHP_SRC_DOWNLOAD_URL=`curl -fsSL "https://www.php.net/pre-release-builds.php?format=json" | jq -r --arg v "${PHP_VERSION%-dev}" 'to_entries[] | select(.key | startswith($v)) | .value.release.files.gz.path'` ; \ + else \ + FULL_LATEST_VERSION=`curl -fsSL "https://www.php.net/releases/index.php?json&max=1&version=$PHP_VERSION" | jq -r '.[].source[]|select(.filename|endswith(".gz")).filename'`; \ + PHP_SRC_DOWNLOAD_URL="https://www.php.net/distributions/$FULL_LATEST_VERSION" ; \ + fi; \ + wget -O php.tgz "$PHP_SRC_DOWNLOAD_URL" ; \ tar zxf php.tgz ; \ rm php.tgz ; \ ls -l ; \ @@ -44,7 +49,7 @@ RUN mkdir -p /usr/local/src/php; \ RUN touch /usr/local/lib/php.ini COPY --from=ghcr.io/php/pie:bin /pie /usr/local/bin/pie -RUN pie install xdebug/xdebug +RUN BOX_REQUIREMENT_CHECKER=0 pie install xdebug/xdebug COPY --from=clone_ext_repo /example-pie-extension /example-pie-extension diff --git a/.github/workflows/continuous-integration.yml b/.github/workflows/continuous-integration.yml index aab8204b..4c9f357d 100644 --- a/.github/workflows/continuous-integration.yml +++ b/.github/workflows/continuous-integration.yml @@ -21,6 +21,7 @@ jobs: - '8.3' - '8.4' - '8.5' + - '8.6' steps: - name: Setup PHP uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 #2.37.2 @@ -121,6 +122,7 @@ jobs: - '8.3' - '8.4' - '8.5' + #- '8.6' # @todo bundled repo doesn't support non-stable PHP versions steps: - name: "Purge built-in PHP version" run: | @@ -160,8 +162,15 @@ jobs: libzip-dev - name: "Set php-src download URL" run: | - DIST_URL=`curl -fsSL "https://www.php.net/releases/index.php?json&max=1&version=${{ matrix.php-versions }}" | jq -r '.[].source[]|select(.filename|endswith(".gz")).filename'` - echo "php_src_download_url=https://www.php.net/distributions/$DIST_URL" >> $GITHUB_ENV + if [[ "${{ matrix.php-versions }}" == *-dev ]]; then + VERSION="${{ matrix.php-versions }}" + VERSION="${VERSION%-dev}" + DIST_URL=`curl -fsSL "https://www.php.net/pre-release-builds.php?format=json" | jq -r --arg v "$VERSION" 'to_entries[] | select(.key | startswith($v)) | .value.release.files.gz.path'` + echo "php_src_download_url=$DIST_URL" >> $GITHUB_ENV + else + DIST_URL=`curl -fsSL "https://www.php.net/releases/index.php?json&max=1&version=${{ matrix.php-versions }}" | jq -r '.[].source[]|select(.filename|endswith(".gz")).filename'` + echo "php_src_download_url=https://www.php.net/distributions/$DIST_URL" >> $GITHUB_ENV + fi - name: "Install PHP ${{ matrix.php-versions }}" env: php_src_download_url: ${{ env.php_src_download_url }} @@ -220,6 +229,7 @@ jobs: - '8.3' - '8.4' - '8.5' + #- '8.6' @todo behaviour tests depend on stable releases currently steps: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 #v7.0.0 with: diff --git a/composer.json b/composer.json index 60e421bc..49ae9ef2 100644 --- a/composer.json +++ b/composer.json @@ -27,7 +27,7 @@ } ], "require": { - "php": "8.1.*||8.2.*||8.3.*||8.4.*||8.5.*", + "php": "8.1.*||8.2.*||8.3.*||8.4.*||8.5.*||8.6.*", "composer/composer": "^2.10.2", "composer/pcre": "^3.4.0", "composer/semver": "^3.4.4", @@ -50,7 +50,7 @@ "phpstan/phpstan": "^2.2.5", "phpstan/phpstan-phpunit": "^2.0.18", "phpstan/phpstan-webmozart-assert": "^2.0", - "phpunit/phpunit": "^10.5.63", + "phpunit/phpunit": "^10.5.64", "thecodingmachine/phpstan-safe-rule": "^1.4.7" }, "replace": { diff --git a/composer.lock b/composer.lock index 41699ff6..dcba1dc4 100644 --- a/composer.lock +++ b/composer.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bf0db46220d4520b9171cad1c0d8831b", + "content-hash": "e30e1029c380285b85834cebc3cf04c1", "packages": [ { "name": "composer/ca-bundle", - "version": "1.5.12", + "version": "1.5.13", "source": { "type": "git", "url": "https://github.com/composer/ca-bundle.git", - "reference": "00a2f4201641d5c53f7fc0195e6c8d9fcc321a78" + "reference": "c008272789979f709f7fcb32c2ecf1d2db5e84e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/composer/ca-bundle/zipball/00a2f4201641d5c53f7fc0195e6c8d9fcc321a78", - "reference": "00a2f4201641d5c53f7fc0195e6c8d9fcc321a78", + "url": "https://api.github.com/repos/composer/ca-bundle/zipball/c008272789979f709f7fcb32c2ecf1d2db5e84e5", + "reference": "c008272789979f709f7fcb32c2ecf1d2db5e84e5", "shasum": "" }, "require": { @@ -64,7 +64,7 @@ "support": { "irc": "irc://irc.freenode.org/composer", "issues": "https://github.com/composer/ca-bundle/issues", - "source": "https://github.com/composer/ca-bundle/tree/1.5.12" + "source": "https://github.com/composer/ca-bundle/tree/1.5.13" }, "funding": [ { @@ -76,7 +76,7 @@ "type": "github" } ], - "time": "2026-05-19T11:26:22+00:00" + "time": "2026-07-18T12:35:13+00:00" }, { "name": "composer/class-map-generator", @@ -3836,16 +3836,16 @@ }, { "name": "phpstan/phpdoc-parser", - "version": "2.3.2", + "version": "2.3.3", "source": { "type": "git", "url": "https://github.com/phpstan/phpdoc-parser.git", - "reference": "a004701b11273a26cd7955a61d67a7f1e525a45a" + "reference": "fb19eedd2bb67ff8cf7a5502ad329e701d6398a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/a004701b11273a26cd7955a61d67a7f1e525a45a", - "reference": "a004701b11273a26cd7955a61d67a7f1e525a45a", + "url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fb19eedd2bb67ff8cf7a5502ad329e701d6398a3", + "reference": "fb19eedd2bb67ff8cf7a5502ad329e701d6398a3", "shasum": "" }, "require": { @@ -3877,9 +3877,9 @@ "description": "PHPDoc parser with support for nullable, intersection and generic types", "support": { "issues": "https://github.com/phpstan/phpdoc-parser/issues", - "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.2" + "source": "https://github.com/phpstan/phpdoc-parser/tree/2.3.3" }, - "time": "2026-01-25T14:56:51+00:00" + "time": "2026-07-08T07:01:06+00:00" }, { "name": "phpstan/phpstan", @@ -4377,24 +4377,24 @@ }, { "name": "phpunit/phpunit", - "version": "10.5.63", + "version": "10.5.64", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "33198268dad71e926626b618f3ec3966661e4d90" + "reference": "0e8c1d19cea35ad97d4887f363d07c78e30fbf06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/33198268dad71e926626b618f3ec3966661e4d90", - "reference": "33198268dad71e926626b618f3ec3966661e4d90", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/0e8c1d19cea35ad97d4887f363d07c78e30fbf06", + "reference": "0e8c1d19cea35ad97d4887f363d07c78e30fbf06", "shasum": "" }, "require": { "ext-dom": "*", + "ext-filter": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", - "ext-xml": "*", "ext-xmlwriter": "*", "myclabs/deep-copy": "^1.13.4", "phar-io/manifest": "^2.0.4", @@ -4458,31 +4458,15 @@ "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", "security": "https://github.com/sebastianbergmann/phpunit/security/policy", - "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.63" + "source": "https://github.com/sebastianbergmann/phpunit/tree/10.5.64" }, "funding": [ { - "url": "https://phpunit.de/sponsors.html", - "type": "custom" - }, - { - "url": "https://github.com/sebastianbergmann", - "type": "github" - }, - { - "url": "https://liberapay.com/sebastianbergmann", - "type": "liberapay" - }, - { - "url": "https://thanks.dev/u/gh/sebastianbergmann", - "type": "thanks_dev" - }, - { - "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", - "type": "tidelift" + "url": "https://phpunit.de/sponsoring.html", + "type": "other" } ], - "time": "2026-01-27T05:48:37+00:00" + "time": "2026-07-06T14:50:35+00:00" }, { "name": "sebastian/cli-parser", @@ -5439,31 +5423,31 @@ }, { "name": "slevomat/coding-standard", - "version": "8.30.1", + "version": "8.31.0", "source": { "type": "git", "url": "https://github.com/slevomat/coding-standard.git", - "reference": "70a3b2150600122f87c59cae1c1b5902ba73798b" + "reference": "ae5e938b49986fa48b494557445e22ee1ca795b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/70a3b2150600122f87c59cae1c1b5902ba73798b", - "reference": "70a3b2150600122f87c59cae1c1b5902ba73798b", + "url": "https://api.github.com/repos/slevomat/coding-standard/zipball/ae5e938b49986fa48b494557445e22ee1ca795b7", + "reference": "ae5e938b49986fa48b494557445e22ee1ca795b7", "shasum": "" }, "require": { "dealerdirect/phpcodesniffer-composer-installer": "^0.7 || ^1.2.1", "php": "^7.4 || ^8.0", - "phpstan/phpdoc-parser": "^2.3.2", + "phpstan/phpdoc-parser": "^2.3.3", "squizlabs/php_codesniffer": "^4.0.1" }, "require-dev": { "phing/phing": "3.0.1|3.1.2", "php-parallel-lint/php-parallel-lint": "1.4.0", - "phpstan/phpstan": "2.2.2", + "phpstan/phpstan": "2.2.5", "phpstan/phpstan-deprecation-rules": "2.0.4", - "phpstan/phpstan-phpunit": "2.0.16", - "phpstan/phpstan-strict-rules": "2.0.11", + "phpstan/phpstan-phpunit": "2.0.18", + "phpstan/phpstan-strict-rules": "2.0.12", "phpunit/phpunit": "9.6.34|10.5.63|11.4.4|11.5.55|12.5.30" }, "type": "phpcodesniffer-standard", @@ -5488,7 +5472,7 @@ ], "support": { "issues": "https://github.com/slevomat/coding-standard/issues", - "source": "https://github.com/slevomat/coding-standard/tree/8.30.1" + "source": "https://github.com/slevomat/coding-standard/tree/8.31.0" }, "funding": [ { @@ -5500,7 +5484,7 @@ "type": "tidelift" } ], - "time": "2026-06-27T11:26:35+00:00" + "time": "2026-07-21T16:20:20+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -6198,7 +6182,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "8.1.*||8.2.*||8.3.*||8.4.*||8.5.*" + "php": "8.1.*||8.2.*||8.3.*||8.4.*||8.5.*||8.6.*" }, "platform-dev": { "ext-openssl": "*" diff --git a/features/download-extensions.feature b/features/download-extensions.feature index 7d7e7a0b..d3ad1a30 100644 --- a/features/download-extensions.feature +++ b/features/download-extensions.feature @@ -13,7 +13,7 @@ Feature: Extensions can be downloaded with PIE Examples: | constraint | version | | 2.0.5 | 2.0.5 | - | ^2.0 | 2.0.9 | + | ^2.0 | 2.0.10 | # pie download :dev-main @non-windows diff --git a/src/Platform/TargetPlatform.php b/src/Platform/TargetPlatform.php index 1b8d25ef..f661abac 100644 --- a/src/Platform/TargetPlatform.php +++ b/src/Platform/TargetPlatform.php @@ -97,6 +97,9 @@ public static function fromPhpBinaryPath(PhpBinaryPath $phpBinaryPath, int|null case 'VS17': $windowsCompiler = WindowsCompiler::VS17; break; + case 'VS18': + $windowsCompiler = WindowsCompiler::VS18; + break; } } } diff --git a/src/Platform/WindowsCompiler.php b/src/Platform/WindowsCompiler.php index 7b5bc372..93466e57 100644 --- a/src/Platform/WindowsCompiler.php +++ b/src/Platform/WindowsCompiler.php @@ -15,4 +15,5 @@ enum WindowsCompiler case VC15; case VS16; case VS17; + case VS18; } diff --git a/test/assets/pie-install-from-lock/pie.json b/test/assets/pie-install-from-lock/pie.json index 92317f4a..b03aa54d 100644 --- a/test/assets/pie-install-from-lock/pie.json +++ b/test/assets/pie-install-from-lock/pie.json @@ -1,6 +1,6 @@ { "require": { "xdebug/xdebug": "3.5.2", - "asgrim/example-pie-extension": "2.0.9" + "asgrim/example-pie-extension": "2.0.10" } } diff --git a/test/assets/pie-install-from-lock/pie.lock b/test/assets/pie-install-from-lock/pie.lock index eca995b6..fd12fa36 100644 --- a/test/assets/pie-install-from-lock/pie.lock +++ b/test/assets/pie-install-from-lock/pie.lock @@ -4,20 +4,20 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bbeb326cf52bdf49183176118718973c", + "content-hash": "b4a3c510277909695617f37c71009a20", "packages": [ { "name": "asgrim/example-pie-extension", - "version": "2.0.9", + "version": "2.0.10", "source": { "type": "git", "url": "https://github.com/asgrim/example-pie-extension.git", - "reference": "963c8d70c57c23fa2098e499a0ebffabb64748b3" + "reference": "f4aa08c72cffd395e8ddbcb55622f33165da8660" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/asgrim/example-pie-extension/zipball/963c8d70c57c23fa2098e499a0ebffabb64748b3", - "reference": "963c8d70c57c23fa2098e499a0ebffabb64748b3", + "url": "https://api.github.com/repos/asgrim/example-pie-extension/zipball/f4aa08c72cffd395e8ddbcb55622f33165da8660", + "reference": "f4aa08c72cffd395e8ddbcb55622f33165da8660", "shasum": "" }, "require": { @@ -53,9 +53,9 @@ "description": "Example PIE extension", "support": { "issues": "https://github.com/asgrim/example-pie-extension/issues", - "source": "https://github.com/asgrim/example-pie-extension/tree/2.0.9" + "source": "https://github.com/asgrim/example-pie-extension/tree/2.0.10" }, - "time": "2026-02-04T17:27:25+00:00" + "time": "2026-08-04T20:36:11+00:00" }, { "name": "xdebug/xdebug", diff --git a/test/assets/pie_test_ext_win/php_pie_test_ext-1.2.3-8.6-ts-vs16-x86_64.dll b/test/assets/pie_test_ext_win/php_pie_test_ext-1.2.3-8.6-ts-vs16-x86_64.dll new file mode 100644 index 00000000..c78b62b1 --- /dev/null +++ b/test/assets/pie_test_ext_win/php_pie_test_ext-1.2.3-8.6-ts-vs16-x86_64.dll @@ -0,0 +1 @@ +only a test file diff --git a/test/assets/pie_test_ext_win/php_pie_test_ext-1.2.3-8.6-ts-vs16-x86_64.pdb b/test/assets/pie_test_ext_win/php_pie_test_ext-1.2.3-8.6-ts-vs16-x86_64.pdb new file mode 100644 index 00000000..c78b62b1 --- /dev/null +++ b/test/assets/pie_test_ext_win/php_pie_test_ext-1.2.3-8.6-ts-vs16-x86_64.pdb @@ -0,0 +1 @@ +only a test file diff --git a/test/behaviour/CliContext.php b/test/behaviour/CliContext.php index 8cd18056..8bf22c11 100644 --- a/test/behaviour/CliContext.php +++ b/test/behaviour/CliContext.php @@ -11,6 +11,7 @@ use Behat\Step\When; use Composer\Semver\VersionParser; use Composer\Util\Platform; +use Php\PieIntegrationTest\ExamplePieExtensionFixture; use RuntimeException; use Safe\Exceptions\PcreException; use Symfony\Component\Process\Process; @@ -674,9 +675,9 @@ public function theExtensionsShouldHaveBeenUpdatedToTheLock(): void Assert::contains($pieInstallOutput, 'Removed extension derickr/quickhash:'); self::assertPackageNotInstalledInPieShowOutput($pieShowOutput, 'derickr/quickhash'); - // `example_pie_extension` 2.0.9 should have been installed (was not previously installed) - Assert::contains($pieInstallOutput, 'Extension asgrim/example-pie-extension:2.0.9 is enabled and loaded'); - self::assertPackageVersionInstalledInPieShowOutput($pieShowOutput, 'asgrim/example-pie-extension', '2.0.9'); + // `example_pie_extension` should have been installed (was not previously installed) + Assert::contains($pieInstallOutput, 'Extension asgrim/example-pie-extension:' . ExamplePieExtensionFixture::LATEST_VERSION . ' is enabled and loaded'); + self::assertPackageVersionInstalledInPieShowOutput($pieShowOutput, 'asgrim/example-pie-extension', ExamplePieExtensionFixture::LATEST_VERSION); $this->restorePieJsonAndLock(); } diff --git a/test/integration/Command/DownloadCommandTest.php b/test/integration/Command/DownloadCommandTest.php index 62e29360..81295c7a 100644 --- a/test/integration/Command/DownloadCommandTest.php +++ b/test/integration/Command/DownloadCommandTest.php @@ -7,6 +7,7 @@ use Composer\Util\Platform; use Php\Pie\Command\DownloadCommand; use Php\Pie\Container; +use Php\PieIntegrationTest\ExamplePieExtensionFixture; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\Attributes\RequiresOperatingSystemFamily; @@ -22,7 +23,7 @@ #[CoversClass(DownloadCommand::class)] class DownloadCommandTest extends IsolatedWorkingDirectoryTestCase { - private const TEST_PACKAGE_LATEST = '2.0.9'; + private const TEST_PACKAGE_LATEST = ExamplePieExtensionFixture::LATEST_VERSION; private const TEST_PACKAGE = 'asgrim/example-pie-extension'; private CommandTester $commandTester; diff --git a/test/integration/ComposerIntegration/ComposerIntegrationHandlerTest.php b/test/integration/ComposerIntegration/ComposerIntegrationHandlerTest.php index 862045d7..05601a34 100644 --- a/test/integration/ComposerIntegration/ComposerIntegrationHandlerTest.php +++ b/test/integration/ComposerIntegration/ComposerIntegrationHandlerTest.php @@ -24,6 +24,7 @@ use Php\Pie\Platform\TargetPhp\PhpBinaryPath; use Php\Pie\Platform\TargetPlatform; use Php\PieIntegrationTest\Command\IsolatedWorkingDirectoryTestCase; +use Php\PieIntegrationTest\ExamplePieExtensionFixture; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\RequiresOperatingSystemFamily; use Symfony\Component\Console\Output\BufferedOutput; @@ -44,7 +45,7 @@ final class ComposerIntegrationHandlerTest extends IsolatedWorkingDirectoryTestC { private const PACKAGE_NAME = 'asgrim/example-pie-extension'; private const EXTENSION_NAME = 'example_pie_extension'; - private const VERSION_CURRENT = '2.0.9'; + private const VERSION_CURRENT = ExamplePieExtensionFixture::LATEST_VERSION; private const VERSION_OTHER = '2.0.2'; private TargetPlatform $targetPlatform; @@ -216,7 +217,7 @@ private function extensionBinaryPath(): string /** @param non-empty-string $version */ private function makeComposerPackage(string $version): CompletePackage { - $sha = '963c8d70c57c23fa2098e499a0ebffabb64748b3'; + $sha = ExamplePieExtensionFixture::LATEST_VERSION_REFERENCE; $extensionBinaryPath = $this->extensionBinaryPath(); $package = new CompletePackage(self::PACKAGE_NAME, $version . '.0', $version); diff --git a/test/integration/DependencyResolver/ResolveDependencyWithComposerTest.php b/test/integration/DependencyResolver/ResolveDependencyWithComposerTest.php index 0cd2aed7..5f0ba9d8 100644 --- a/test/integration/DependencyResolver/ResolveDependencyWithComposerTest.php +++ b/test/integration/DependencyResolver/ResolveDependencyWithComposerTest.php @@ -14,6 +14,7 @@ use Php\Pie\DependencyResolver\ResolveDependencyWithComposer; use Php\Pie\Platform\TargetPhp\PhpBinaryPath; use Php\Pie\Platform\TargetPlatform; +use Php\PieIntegrationTest\ExamplePieExtensionFixture; use PHPUnit\Framework\Attributes\CoversClass; use PHPUnit\Framework\Attributes\DataProvider; use PHPUnit\Framework\TestCase; @@ -26,7 +27,7 @@ #[CoversClass(ResolveDependencyWithComposer::class)] final class ResolveDependencyWithComposerTest extends TestCase { - private const TEST_PACKAGE_LATEST = '2.0.9'; + private const TEST_PACKAGE_LATEST = ExamplePieExtensionFixture::LATEST_VERSION; private const DOWNLOAD_URL_ANY = 'https://api.github.com/repos/asgrim/example-pie-extension/zipball/%s'; private const DOWNLOAD_URL_1_0_1_ALPHA_3 = 'https://api.github.com/repos/asgrim/example-pie-extension/zipball/115f8f8e01ee098a18ec2f47af4852be51ebece7'; private const DOWNLOAD_URL_1_0_1 = 'https://api.github.com/repos/asgrim/example-pie-extension/zipball/769f906413d6d1e12152f6d34134cbcd347ca253'; diff --git a/test/integration/ExamplePieExtensionFixture.php b/test/integration/ExamplePieExtensionFixture.php new file mode 100644 index 00000000..6c4481ad --- /dev/null +++ b/test/integration/ExamplePieExtensionFixture.php @@ -0,0 +1,11 @@ +