From 2297cbd48d59851bcc10422ddbb1f6e3037ba04a Mon Sep 17 00:00:00 2001 From: Chingis Sandanov Date: Tue, 26 Dec 2023 11:09:16 +0300 Subject: [PATCH] Add newrelic to PHP 8.3 #187 --- 8/Dockerfile | 24 +++++++++++------------- 8/docker-entrypoint.sh | 4 +--- 8/tests/php_modules/8.3 | 1 + README.md | 2 +- 4 files changed, 14 insertions(+), 17 deletions(-) diff --git a/8/Dockerfile b/8/Dockerfile index 7914f07..7b07803 100644 --- a/8/Dockerfile +++ b/8/Dockerfile @@ -267,19 +267,17 @@ RUN set -xe; \ # http://osmanov-dev-notes.blogspot.com/2013/07/fixing-php-start-up-error-unable-to.html mv /usr/local/etc/php/conf.d/docker-php-ext-event.ini /usr/local/etc/php/conf.d/z-docker-php-ext-event.ini; \ \ - if [[ "${PHP_VERSION:0:3}" != "8.3" ]]; then \ - # NewRelic extension and agent. \ - newrelic_url="http://download.newrelic.com/php_agent/release/"; \ - wget -r -nd --no-parent -P /tmp/newrelic -Alinux-musl.tar.gz "${newrelic_url}" >/dev/null 2>&1; \ - tar -xzf /tmp/newrelic/newrelic-php*.tar.gz --strip=1 -C /tmp/newrelic; \ - export NR_INSTALL_SILENT=true; \ - export NR_INSTALL_USE_CP_NOT_LN=true; \ - bash /tmp/newrelic/newrelic-install install; \ - rm -f /usr/local/etc/php/conf.d/newrelic.ini; \ - mkdir -p /var/log/newrelic/; \ - chown -R www-data:www-data /var/log/newrelic/; \ - chmod -R 775 /var/log/newrelic/; \ - fi; \ + # NewRelic extension and agent. \ + newrelic_url="http://download.newrelic.com/php_agent/release/"; \ + wget -r -nd --no-parent -P /tmp/newrelic -Alinux-musl.tar.gz "${newrelic_url}" >/dev/null 2>&1; \ + tar -xzf /tmp/newrelic/newrelic-php*.tar.gz --strip=1 -C /tmp/newrelic; \ + export NR_INSTALL_SILENT=true; \ + export NR_INSTALL_USE_CP_NOT_LN=true; \ + bash /tmp/newrelic/newrelic-install install; \ + rm -f /usr/local/etc/php/conf.d/newrelic.ini; \ + mkdir -p /var/log/newrelic/; \ + chown -R www-data:www-data /var/log/newrelic/; \ + chmod -R 775 /var/log/newrelic/; \ \ # Brotli extension. brotli_ext_ver="0.14.2"; \ diff --git a/8/docker-entrypoint.sh b/8/docker-entrypoint.sh index b5d1264..1810b0c 100755 --- a/8/docker-entrypoint.sh +++ b/8/docker-entrypoint.sh @@ -61,9 +61,7 @@ process_templates() { fi # Extensions that don't work with --enabled-debug - if [[ "${php_ver_minor}" != "8.3" ]]; then - _gotpl "docker-php-ext-newrelic.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php-ext-newrelic.ini" - fi; + _gotpl "docker-php-ext-newrelic.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php-ext-newrelic.ini" _gotpl "docker-php-${php_ver_minor}.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php.ini" _gotpl "docker-php-ext-apcu.ini.tmpl" "${PHP_INI_DIR}/conf.d/docker-php-ext-apcu.ini" diff --git a/8/tests/php_modules/8.3 b/8/tests/php_modules/8.3 index cfe53a4..68494b8 100644 --- a/8/tests/php_modules/8.3 +++ b/8/tests/php_modules/8.3 @@ -34,6 +34,7 @@ memcached mongodb mysqli mysqlnd +newrelic OAuth openssl opentelemetry diff --git a/README.md b/README.md index 09603d1..c0019ea 100644 --- a/README.md +++ b/README.md @@ -237,7 +237,7 @@ e.g. `$PHP_EXTENSIONS_DISABLE=event,ds` | [mongodb] | 1.17.1 | 1.17.1 | 1.17.1 | | mysqli | | | | | mysqlnd | | | | -| [newrelic] | - | latest | latest | +| [newrelic] | latest | latest | latest | | [OAuth] | 2.0.7 | 2.0.7 | 2.0.7 | | openssl | | | | | [opentelemetry] | 1.0.0 | 1.0.0 | 1.0.0 |