Skip to content

Commit

Permalink
include testing against nightly PHP 8.3
Browse files Browse the repository at this point in the history
  • Loading branch information
TheTechsTech committed Feb 23, 2023
1 parent 0c75333 commit b131667
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 5 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/zend-ffi.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "7.4 to 8.2 "
name: "7.4 to 8.3 "

on:
push:
Expand All @@ -15,7 +15,7 @@ jobs:
fail-fast: false
matrix:
operating-system: [ubuntu-latest, windows-latest, macos-latest]
php-versions: ['7.4', '8.0', '8.1', '8.2']
php-versions: ['7.4', '8.0', '8.1', '8.2', '8.3']
include:
- php-versions: '7.4'
php-coverage: xdebug
Expand All @@ -25,6 +25,8 @@ jobs:
php-coverage: none
- php-versions: '8.2'
php-coverage: none
- php-versions: '8.3'
php-coverage: none
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
15 changes: 12 additions & 3 deletions preload.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,11 @@
\define('SYS_PIPE', \IS_WINDOWS ? '\\\\.\\pipe\\' : \getcwd() . '/');
}

if (!\defined('IS_PHP83'))
\define('IS_PHP83', ((float) \phpversion() >= 8.3));

if (!\defined('IS_PHP82'))
\define('IS_PHP82', ((float) \phpversion() >= 8.2));
\define('IS_PHP82', ((float) \phpversion() >= 8.2) && !\IS_PHP83);

if (!\defined('IS_PHP81'))
\define('IS_PHP81', ((float) \phpversion() >= 8.1) && !\IS_PHP82);
Expand All @@ -103,7 +106,9 @@
\IS_PHP80 ? 20200930
: (\IS_PHP81 ? 20210902
: (\IS_PHP82 ? 20220829
: 20190902
: (\IS_PHP83 ? 20220830
: 20190902
)
)
)
);
Expand Down Expand Up @@ -640,7 +645,11 @@ function setup_ffi_loader(string $tag, string $cdef_file): void

function zend_preloader(): void
{
$minor = \IS_PHP81 ? '1' : (\IS_PHP82 ? '2' : '');
$minor = \IS_PHP81 ? '1'
: (\IS_PHP82 ? '2'
: (\IS_PHP83 ? '3'
: '')
);
$os = __DIR__ . \DS . (\PHP_OS_FAMILY === 'Windows' ? 'headers\zeWin' : 'headers/ze');
$php = $os . \PHP_MAJOR_VERSION . $minor . (\PHP_ZTS ? 'ts' : '') . '.h';
\setup_ffi_loader('ze', $php);
Expand Down

0 comments on commit b131667

Please sign in to comment.