Skip to content

Commit

Permalink
Merge pull request #32 from asgrim/php84-support
Browse files Browse the repository at this point in the history
PHP 8.4 support
  • Loading branch information
asgrim authored Oct 9, 2024
2 parents bbb9b6b + 1dd4e7e commit 51f0d50
Show file tree
Hide file tree
Showing 10 changed files with 60 additions and 44 deletions.
10 changes: 10 additions & 0 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- '8.1'
- '8.2'
- '8.3'
- '8.4'
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -25,6 +26,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
# temporarily remove Psalm until ready for PHP 8.4
- name: remove psalm
if: matrix.php-versions == '8.4'
run: composer remove --dev --no-install vimeo/psalm psalm/plugin-phpunit php-standard-library/psalm-plugin
- uses: ramsey/composer-install@v3
- name: Run PHPUnit on Windows
if: matrix.operating-system == 'windows-latest'
Expand All @@ -44,6 +49,7 @@ jobs:
- '8.1'
- '8.2'
- '8.3'
- '8.4'
steps:
- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -53,6 +59,10 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
# temporarily remove Psalm until ready for PHP 8.4
- name: remove psalm
if: matrix.php-versions == '8.4'
run: composer remove --dev --no-install vimeo/psalm psalm/plugin-phpunit php-standard-library/psalm-plugin
- uses: ramsey/composer-install@v3
- name: Run Behat on Windows
if: matrix.operating-system == 'windows-latest'
Expand Down
2 changes: 1 addition & 1 deletion 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.*",
"php": "8.1.*||8.2.*||8.3.*||8.4.*",
"ext-zip": "*",
"composer/composer": "dev-main@dev",
"guzzlehttp/guzzle": "^7.8",
Expand Down
68 changes: 34 additions & 34 deletions composer.lock

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

4 changes: 2 additions & 2 deletions features/install-extensions.feature
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ Feature: Extensions can be installed with Behat

Examples:
| constraint | version |
| 2.0.0 | 2.0.0 |
| ^2.0 | 2.0.0 |
| 2.0.2 | 2.0.2 |
| ^2.0 | 2.0.2 |

@non-windows
Example: An in-development version can be downloaded on non-Windows systems
Expand Down
3 changes: 3 additions & 0 deletions src/Platform/TargetPlatform.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,9 @@ public static function fromPhpBinaryPath(PhpBinaryPath $phpBinaryPath): self
case 'VS16':
$windowsCompiler = WindowsCompiler::VS16;
break;
case 'VS17':
$windowsCompiler = WindowsCompiler::VS17;
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 @@ -14,4 +14,5 @@ enum WindowsCompiler
case VC14;
case VC15;
case VS16;
case VS17;
}
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
8 changes: 4 additions & 4 deletions test/integration/Command/DownloadCommandTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ public function setUp(): void
public static function validVersionsList(): array
{
$versionsAndExpected = [
[self::TEST_PACKAGE, self::TEST_PACKAGE . ':2.0.0'],
[self::TEST_PACKAGE . ':*', self::TEST_PACKAGE . ':2.0.0'],
[self::TEST_PACKAGE . ':^2.0', self::TEST_PACKAGE . ':2.0.0'],
[self::TEST_PACKAGE, self::TEST_PACKAGE . ':2.0.2'],
[self::TEST_PACKAGE . ':*', self::TEST_PACKAGE . ':2.0.2'],
[self::TEST_PACKAGE . ':^2.0', self::TEST_PACKAGE . ':2.0.2'],
];

if (PHP_VERSION_ID >= 80300 && PHP_VERSION_ID <= 80400) {
if (PHP_VERSION_ID >= 80300 && PHP_VERSION_ID < 80400) {
$versionsAndExpected[] = [self::TEST_PACKAGE . ':^1.0', self::TEST_PACKAGE . ':1.0.1'];
$versionsAndExpected[] = [self::TEST_PACKAGE . ':1.0.1-alpha.3@alpha', self::TEST_PACKAGE . ':1.0.1-alpha.3'];
$versionsAndExpected[] = [self::TEST_PACKAGE . ':~1.0.0@alpha', self::TEST_PACKAGE . ':1.0.1'];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ final class ResolveDependencyWithComposerTest extends TestCase
public static function validVersionsList(): array
{
$versionsAndExpected = [
[null, '2.0.0', self::DOWNLOAD_URL_ANY],
['*', '2.0.0', self::DOWNLOAD_URL_ANY],
[null, '2.0.2', self::DOWNLOAD_URL_ANY],
['*', '2.0.2', self::DOWNLOAD_URL_ANY],
['dev-main', 'dev-main', self::DOWNLOAD_URL_ANY],
['dev-main#769f906413d6d1e12152f6d34134cbcd347ca253', 'dev-main', self::DOWNLOAD_URL_1_0_1],
];

if (PHP_VERSION_ID >= 80300 && PHP_VERSION_ID <= 80400) {
if (PHP_VERSION_ID >= 80300 && PHP_VERSION_ID <= 80300) {
$versionsAndExpected[] = ['1.0.1-alpha.3@alpha', '1.0.1-alpha.3', self::DOWNLOAD_URL_1_0_1_ALPHA_3];
$versionsAndExpected[] = ['^1.0', '1.0.1', self::DOWNLOAD_URL_1_0_1];
$versionsAndExpected[] = ['^1.1.0@alpha', '1.1.0-beta.1', self::DOWNLOAD_URL_1_1_0_BETA_1];
Expand Down

0 comments on commit 51f0d50

Please sign in to comment.