Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/pie-behaviour-tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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 ; \
Expand All @@ -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

Expand Down
14 changes: 12 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ jobs:
- '8.3'
- '8.4'
- '8.5'
- '8.6'
Comment thread
asgrim marked this conversation as resolved.
steps:
- name: Setup PHP
uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 #2.37.2
Expand Down Expand Up @@ -121,6 +122,7 @@ jobs:
- '8.3'
- '8.4'
- '8.5'
#- '8.6' # @todo bundled repo doesn't support non-stable PHP versions
Comment thread
asgrim marked this conversation as resolved.
steps:
- name: "Purge built-in PHP version"
run: |
Expand Down Expand Up @@ -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 }}
Expand Down Expand Up @@ -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:
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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": {
Expand Down
82 changes: 33 additions & 49 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion features/download-extensions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 <ext>:dev-main
@non-windows
Expand Down
3 changes: 3 additions & 0 deletions src/Platform/TargetPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ public static function fromPhpBinaryPath(PhpBinaryPath $phpBinaryPath, int|null
case 'VS17':
$windowsCompiler = WindowsCompiler::VS17;
break;
case 'VS18':
$windowsCompiler = WindowsCompiler::VS18;
break;
}
}
}
Expand Down
1 change: 1 addition & 0 deletions src/Platform/WindowsCompiler.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ enum WindowsCompiler
case VC15;
case VS16;
case VS17;
case VS18;
}
2 changes: 1 addition & 1 deletion test/assets/pie-install-from-lock/pie.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"require": {
"xdebug/xdebug": "3.5.2",
"asgrim/example-pie-extension": "2.0.9"
"asgrim/example-pie-extension": "2.0.10"
}
}
14 changes: 7 additions & 7 deletions test/assets/pie-install-from-lock/pie.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down Expand Up @@ -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",
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
only a test file
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
only a test file
7 changes: 4 additions & 3 deletions test/behaviour/CliContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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();
}
Expand Down
Loading
Loading