From 9a463f12cb44d95183c7c39cbdc54dd54e5262a7 Mon Sep 17 00:00:00 2001 From: Brian Duranleau Date: Wed, 6 Dec 2023 13:27:55 -0600 Subject: [PATCH 1/6] feat(agent): initial commit of 8.3 support --- .github/workflows/make-agent.yml | 2 +- .github/workflows/make-integration-tests.yml | 2 +- .github/workflows/test-agent.yml | 4 ++-- agent/newrelic-install.sh | 13 +++++++++++-- files/Dockerfile | 2 +- 5 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.github/workflows/make-agent.yml b/.github/workflows/make-agent.yml index b10a2a45d..9d2d76dd5 100644 --- a/.github/workflows/make-agent.yml +++ b/.github/workflows/make-agent.yml @@ -32,7 +32,7 @@ jobs: strategy: matrix: platform: [gnu, musl] - php: ['8.0', '8.1', '8.2'] + php: ['8.0', '8.1', '8.2', '8.3'] steps: - name: Checkout Repo uses: actions/checkout@v3 diff --git a/.github/workflows/make-integration-tests.yml b/.github/workflows/make-integration-tests.yml index 8128e98cf..ab90a136b 100644 --- a/.github/workflows/make-integration-tests.yml +++ b/.github/workflows/make-integration-tests.yml @@ -34,7 +34,7 @@ jobs: fail-fast: true matrix: platform: [gnu, musl] - php: ['8.0', '8.1', '8.2'] + php: ['8.0', '8.1', '8.2', '8.3'] steps: - name: Checkout integration tests uses: actions/checkout@v3 diff --git a/.github/workflows/test-agent.yml b/.github/workflows/test-agent.yml index 1d78f05d8..2736d2cc1 100644 --- a/.github/workflows/test-agent.yml +++ b/.github/workflows/test-agent.yml @@ -72,7 +72,7 @@ jobs: matrix: platform: [gnu, musl] arch: [amd64, arm64] - php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] exclude: - arch: arm64 php: '7.0' @@ -183,7 +183,7 @@ jobs: matrix: platform: [gnu, musl] arch: [amd64, arm64] - php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] exclude: - arch: arm64 php: '7.0' diff --git a/agent/newrelic-install.sh b/agent/newrelic-install.sh index 27edb843b..d538bb260 100755 --- a/agent/newrelic-install.sh +++ b/agent/newrelic-install.sh @@ -335,10 +335,10 @@ for pmv in "20151012" "20160303" "20170718" "20180731" "20190902"; do done fi # Currently supported versions: -# (8.0, 8.1, 8.2) +# (8.0, 8.1, 8.2, 8.3) # for x64 and aarch64 if [ ${arch} = x64 ] || [ ${arch} = aarch64 ]; then - for pmv in "20200930" "20210902" "20220829"; do + for pmv in "20200930" "20210902" "20220829" "20230831"; do check_file "${ilibdir}/agent/${arch}/newrelic-${pmv}.so" done fi @@ -543,6 +543,7 @@ add_to_path /usr/local/php-7.4/bin add_to_path /usr/local/php-8.0/bin add_to_path /usr/local/php-8.1/bin add_to_path /usr/local/php-8.2/bin +add_to_path /usr/local/php-8.3/bin add_to_path /opt/local/bin add_to_path /usr/php/bin @@ -555,6 +556,7 @@ add_to_path /usr/php-7.4/bin add_to_path /usr/php-8.0/bin add_to_path /usr/php-8.1/bin add_to_path /usr/php-8.2/bin +add_to_path /usr/php-8.3/bin add_to_path /usr/php/7.0/bin add_to_path /usr/php/7.1/bin @@ -564,6 +566,7 @@ add_to_path /usr/php/7.4/bin add_to_path /usr/php/8.0/bin add_to_path /usr/php/8.1/bin add_to_path /usr/php/8.2/bin +add_to_path /usr/php/8.3/bin add_to_path /opt/php/bin add_to_path /opt/zend/bin @@ -576,6 +579,7 @@ add_to_path /opt/php-7.4/bin add_to_path /opt/php-8.0/bin add_to_path /opt/php-8.1/bin add_to_path /opt/php-8.2/bin +add_to_path /opt/php-8.3/bin if [ -n "${NR_INSTALL_PATH}" ]; then oIFS="${IFS}" @@ -1060,6 +1064,10 @@ for this copy of PHP. We apologize for the inconvenience. pi_php8="yes" ;; + 8.3.*) + pi_php8="yes" + ;; + *) error "unsupported version '${pi_ver}' of PHP found at: ${pdir} @@ -1239,6 +1247,7 @@ does not exist. This particular instance of PHP will be skipped. 8.0.*) pi_modver="20200930" ;; 8.1.*) pi_modver="20210902" ;; 8.2.*) pi_modver="20220829" ;; + 8.3.*) pi_modver="20230831" ;; esac log "${pdir}: pi_modver=${pi_modver}" diff --git a/files/Dockerfile b/files/Dockerfile index b0bec8bdd..f13cd367b 100644 --- a/files/Dockerfile +++ b/files/Dockerfile @@ -9,7 +9,7 @@ ARG PHP_VER -FROM php:${PHP_VER:-8.2} +FROM php:${PHP_VER:-8.3} RUN docker-php-source extract From d27700ab871d8beae6f7d5229051d145c1f1f8ce Mon Sep 17 00:00:00 2001 From: Brian Duranleau Date: Wed, 6 Dec 2023 15:49:09 -0600 Subject: [PATCH 2/6] chore: set image version to v2 for 8.3 testing --- .github/workflows/test-agent.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-agent.yml b/.github/workflows/test-agent.yml index 2736d2cc1..5ac675751 100644 --- a/.github/workflows/test-agent.yml +++ b/.github/workflows/test-agent.yml @@ -67,7 +67,7 @@ jobs: env: IMAGE_NAME: newrelic/nr-php-agent-builder IMAGE_TAG: make-php - IMAGE_VERSION: ${{vars.MAKE_PHP_VERSION}} + IMAGE_VERSION: v2 strategy: matrix: platform: [gnu, musl] From 82ce63aec380d50da899842db252c6ddd31404a0 Mon Sep 17 00:00:00 2001 From: Brian Duranleau Date: Thu, 7 Dec 2023 13:13:49 -0600 Subject: [PATCH 3/6] chore: make PR runner pull v2 for 8.3 --- .github/workflows/test-agent.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-agent.yml b/.github/workflows/test-agent.yml index 5ac675751..359c7c24f 100644 --- a/.github/workflows/test-agent.yml +++ b/.github/workflows/test-agent.yml @@ -248,7 +248,7 @@ jobs: LIBC: ${{matrix.platform}} PLATFORM: linux/${{matrix.arch}} AGENT_CODE: ${{github.workspace}}/php-agent - IMAGE_VERSION: ${{vars.MAKE_PHP_VERSION}} + IMAGE_VERSION: v2 working-directory: ./php-agent run: | make test-services-start From c56f4a4c74173f63df12a3237981eea16f0325d6 Mon Sep 17 00:00:00 2001 From: Brian Duranleau Date: Thu, 7 Dec 2023 14:15:55 -0600 Subject: [PATCH 4/6] fix: add 8.3 to release eval --- agent/php_includes.h | 1 + make/release.mk | 1 + 2 files changed, 2 insertions(+) diff --git a/agent/php_includes.h b/agent/php_includes.h index 2a350b9c1..8952fab0b 100644 --- a/agent/php_includes.h +++ b/agent/php_includes.h @@ -53,6 +53,7 @@ #define ZEND_8_0_X_API_NO 20200930 #define ZEND_8_1_X_API_NO 20210902 #define ZEND_8_2_X_API_NO 20220829 +#define ZEND_8_3_X_API_NO 20230831 #if ZEND_MODULE_API_NO >= ZEND_5_6_X_API_NO #include "Zend/zend_virtual_cwd.h" diff --git a/make/release.mk b/make/release.mk index 0f3ce7e0a..6bb9eba61 100644 --- a/make/release.mk +++ b/make/release.mk @@ -163,6 +163,7 @@ release-$1-zts: Makefile agent | releases/$$(RELEASE_OS)/agent/$$(RELEASE_ARCH)/ endef +$(eval $(call RELEASE_AGENT_TARGET,8.3,20230831)) $(eval $(call RELEASE_AGENT_TARGET,8.2,20220829)) $(eval $(call RELEASE_AGENT_TARGET,8.1,20210902)) $(eval $(call RELEASE_AGENT_TARGET,8.0,20200930)) From a3741c7464fa82878dd0ab2519656fded9fcc241 Mon Sep 17 00:00:00 2001 From: Brian Duranleau Date: Fri, 15 Dec 2023 11:08:32 -0600 Subject: [PATCH 5/6] fix(make): add 8.3 to the PHP_VERSION_LIST --- make/php_versions.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make/php_versions.mk b/make/php_versions.mk index c3477bac9..0629bfabd 100644 --- a/make/php_versions.mk +++ b/make/php_versions.mk @@ -3,4 +3,4 @@ # SPDX-License-Identifier: Apache-2.0 # -PHP_VERSION_LIST=$${PHPS:-8.2 8.1 8.0 7.4 7.3 7.2 7.1 7.0} +PHP_VERSION_LIST=$${PHPS:-8.3 8.2 8.1 8.0 7.4 7.3 7.2 7.1 7.0} From 382a370ef3d39655dc1a5e7ce6d2de43cb4d6d7b Mon Sep 17 00:00:00 2001 From: Michael Fulbright Date: Fri, 15 Dec 2023 12:43:01 -0500 Subject: [PATCH 6/6] chore: Changes for PHP 8.3 --- .github/workflows/code-coverage-baseline.yml | 4 ++-- docs/development.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/code-coverage-baseline.yml b/.github/workflows/code-coverage-baseline.yml index 952ab8459..d5a700c28 100644 --- a/.github/workflows/code-coverage-baseline.yml +++ b/.github/workflows/code-coverage-baseline.yml @@ -69,7 +69,7 @@ jobs: matrix: platform: [gnu, musl] arch: [amd64] - php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] include: - codecov: 0 - platform: gnu @@ -147,7 +147,7 @@ jobs: matrix: platform: [gnu, musl] arch: [amd64] - php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2'] + php: ['7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3'] include: - codecov: 0 - platform: gnu diff --git a/docs/development.md b/docs/development.md index 64157900b..c85755903 100644 --- a/docs/development.md +++ b/docs/development.md @@ -58,7 +58,7 @@ _(most operating systems package these with `-dev` or `-devel` suffixes)_ ### PHP -The PHP agent supports PHP versions `7.0`, `7.1`, `7.2`, `7.3`, `7.4`,`8.0`, `8.1`, and `8.2`. +The PHP agent supports PHP versions `7.0`, `7.1`, `7.2`, `7.3`, `7.4`,`8.0`, `8.1`, '8.2', and `8.3`. ## Build the PHP Agent