From 92acdc755f3d021e5848fe4999e29902bbbb50ca Mon Sep 17 00:00:00 2001 From: Joanhey Date: Thu, 30 Nov 2023 17:16:40 +0100 Subject: [PATCH 1/7] Run php 8.3 test in next branch --- .github/workflows/build_development.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build_development.yml b/.github/workflows/build_development.yml index 0574a72f..9ae6cb7a 100644 --- a/.github/workflows/build_development.yml +++ b/.github/workflows/build_development.yml @@ -4,6 +4,7 @@ on: push: branches: - development + - next paths: - "src/**" - "t/**" From fb0dedbc85e300065601fa11c5ecfb7b94c1090d Mon Sep 17 00:00:00 2001 From: Joanhey Date: Thu, 30 Nov 2023 17:21:43 +0100 Subject: [PATCH 2/7] Fix ini_entries --- src/php/impl/php_ngx.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/php/impl/php_ngx.c b/src/php/impl/php_ngx.c index 67586b9e..1784d1da 100644 --- a/src/php/impl/php_ngx.c +++ b/src/php/impl/php_ngx.c @@ -261,7 +261,7 @@ static void php_ngx_register_variables(zval *track_vars_array ) }*/ sapi_module_struct php_ngx_module = { -#if (PHP_MAJOR_VERSION >= 8 && PHP_MINOR_VERSION > 2) +#if (PHP_MAJOR_VERSION >= 8 && PHP_MINOR_VERSION > 2) "ngx-php", #else "cli-server", /* name */ @@ -424,8 +424,12 @@ int php_ngx_module_init() setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */ #endif +#if (PHP_MAJOR_VERSION >= 8 && PHP_MINOR_VERSION > 2) + php_embed_module.ini_entries = HARDCODED_INI; +#else php_ngx_module.ini_entries = malloc(sizeof(HARDCODED_INI)); memcpy(php_ngx_module.ini_entries, HARDCODED_INI, sizeof(HARDCODED_INI)); +#endif php_ngx_module.additional_functions = additional_functions; @@ -466,8 +470,12 @@ void php_ngx_module_shutdown() #ifdef ZTS tsrm_shutdown(); #endif + +#if (PHP_MAJOR_VERSION <= 8 && PHP_MINOR_VERSION <= 2) if (php_ngx_module.ini_entries){ free(php_ngx_module.ini_entries); php_ngx_module.ini_entries = NULL; } +#endif + } From e2b32f034581404a5502af6ab926ab553aed8fed Mon Sep 17 00:00:00 2001 From: Joanhey Date: Thu, 30 Nov 2023 17:26:53 +0100 Subject: [PATCH 3/7] Add php 8.3 to tests --- .github/workflows/build_20.04.yml | 2 +- .github/workflows/build_20.04_dynamic.yml | 2 +- .github/workflows/build_22.04_dynamic.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build_20.04.yml b/.github/workflows/build_20.04.yml index 18349116..e7a986e9 100644 --- a/.github/workflows/build_20.04.yml +++ b/.github/workflows/build_20.04.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - php_version: ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"] + php_version: ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"] ngxinx_version: ["1.20.2", "1.22.1", "1.24.0"] # "1.12.2" fail to compile # Disable fail-fast to allow all failing versions to fail in a # single build, rather than stopping when the first one fails. diff --git a/.github/workflows/build_20.04_dynamic.yml b/.github/workflows/build_20.04_dynamic.yml index a3b56a77..672d3d65 100644 --- a/.github/workflows/build_20.04_dynamic.yml +++ b/.github/workflows/build_20.04_dynamic.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - php_version: ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2"] + php_version: ["7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3"] ngxinx_version: ["1.20.2", "1.22.1", "1.24.0"] # "1.12.2" fail to compile # Disable fail-fast to allow all failing versions to fail in a # single build, rather than stopping when the first one fails. diff --git a/.github/workflows/build_22.04_dynamic.yml b/.github/workflows/build_22.04_dynamic.yml index a5ff9e10..60d1886b 100644 --- a/.github/workflows/build_22.04_dynamic.yml +++ b/.github/workflows/build_22.04_dynamic.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - php_version: ["7.4", "8.0", "8.1", "8.2"] # "7.0", "7.1", "7.2", "7.3", + php_version: ["7.4", "8.0", "8.1", "8.2", "8.3"] # "7.0", "7.1", "7.2", "7.3", ngxinx_version: ["1.20.2", "1.22.1", "1.24.0"] # "1.12.2" fail to compile # Disable fail-fast to allow all failing versions to fail in a # single build, rather than stopping when the first one fails. From 6ce99d84df008a96fe861bc545ab7cdc6d507d0c Mon Sep 17 00:00:00 2001 From: Joanhey Date: Thu, 30 Nov 2023 17:48:01 +0100 Subject: [PATCH 4/7] Fix typo --- src/php/impl/php_ngx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/php/impl/php_ngx.c b/src/php/impl/php_ngx.c index 1784d1da..97bd9e2d 100644 --- a/src/php/impl/php_ngx.c +++ b/src/php/impl/php_ngx.c @@ -425,7 +425,7 @@ int php_ngx_module_init() #endif #if (PHP_MAJOR_VERSION >= 8 && PHP_MINOR_VERSION > 2) - php_embed_module.ini_entries = HARDCODED_INI; + php_ngx_module.ini_entries = HARDCODED_INI; #else php_ngx_module.ini_entries = malloc(sizeof(HARDCODED_INI)); memcpy(php_ngx_module.ini_entries, HARDCODED_INI, sizeof(HARDCODED_INI)); From d68b0df805c591ca6da814cf53855ca5334cffb3 Mon Sep 17 00:00:00 2001 From: Joanhey Date: Thu, 30 Nov 2023 19:30:56 +0100 Subject: [PATCH 5/7] Fix tests --- .github/workflows/build.yml | 6 +- .github/workflows/build_22.04.yml | 68 +++++++++++++++++++ .github/workflows/build_22.04_compile_php.yml | 39 ----------- 3 files changed, 71 insertions(+), 42 deletions(-) create mode 100644 .github/workflows/build_22.04.yml delete mode 100644 .github/workflows/build_22.04_compile_php.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ee00aa03..6b4fddff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -23,8 +23,8 @@ env: jobs: build_php_22-04: name: Compile PHP Ubuntu 22.04 - if: ${{ contains(github.event.head_commit.message, ' Date: Thu, 30 Nov 2023 19:35:35 +0100 Subject: [PATCH 6/7] Add Ubuntu 22.04 in tests --- .github/workflows/build_22.04.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build_22.04.yml b/.github/workflows/build_22.04.yml index 68e4a9f7..48de75d7 100644 --- a/.github/workflows/build_22.04.yml +++ b/.github/workflows/build_22.04.yml @@ -10,7 +10,7 @@ env: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: matrix: From 6480605dccc52aa09e2de356f08311aac3ab9db7 Mon Sep 17 00:00:00 2001 From: Joanhey Date: Thu, 30 Nov 2023 19:49:00 +0100 Subject: [PATCH 7/7] Disable xdebug in tests --- .github/workflows/build_22.04.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/build_22.04.yml b/.github/workflows/build_22.04.yml index 48de75d7..16d96006 100644 --- a/.github/workflows/build_22.04.yml +++ b/.github/workflows/build_22.04.yml @@ -64,5 +64,7 @@ jobs: env: PHP_SRC_VERSION: ${{ matrix.php_version }} run: | + sudo cp .github/ngx-php/php/99-xdebug.ini /etc/php/${PHP_SRC_VERSION}/embed/conf.d/ + sudo cp .github/ngx-php/php/99-xdebug.ini /etc/php/${PHP_SRC_VERSION}/cli/conf.d/ sudo sed -i "s|opcache.jit=off|opcache.jit=tracing|g" /etc/php/${PHP_SRC_VERSION}/embed/conf.d/10-opcache.ini ./.github/ngx-php/test.sh