From 3770ac24ffbe7c02f171381b7791f25a3ebe8588 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 1 Jan 2023 13:04:35 +0100 Subject: [PATCH 1/2] Add xhprof --- .ansible/DOCKERFILES/Dockerfile-mods.j2 | 4 +++- .ansible/DOCKERFILES/Dockerfile-slim.j2 | 3 +++ .ansible/DOCKERFILES/Dockerfile-work.j2 | 6 ++++++ .ansible/group_vars/all/mods.yml | 17 +++++++++++++++++ CHANGELOG.md | 6 ++++++ Dockerfiles/mods/Dockerfile-5.2 | 4 +++- Dockerfiles/mods/Dockerfile-5.3 | 17 ++++++++++++++++- Dockerfiles/mods/Dockerfile-5.4 | 17 ++++++++++++++++- Dockerfiles/mods/Dockerfile-5.5 | 17 ++++++++++++++++- Dockerfiles/mods/Dockerfile-5.6 | 17 ++++++++++++++++- Dockerfiles/mods/Dockerfile-7.0 | 17 ++++++++++++++++- Dockerfiles/mods/Dockerfile-7.1 | 17 ++++++++++++++++- Dockerfiles/mods/Dockerfile-7.2 | 17 ++++++++++++++++- Dockerfiles/mods/Dockerfile-7.3 | 17 ++++++++++++++++- Dockerfiles/mods/Dockerfile-7.4 | 17 ++++++++++++++++- Dockerfiles/mods/Dockerfile-8.0 | 17 ++++++++++++++++- Dockerfiles/mods/Dockerfile-8.1 | 17 ++++++++++++++++- Dockerfiles/mods/Dockerfile-8.2 | 17 ++++++++++++++++- Dockerfiles/slim/Dockerfile-5.2 | 3 +++ Dockerfiles/slim/Dockerfile-5.3 | 3 +++ Dockerfiles/slim/Dockerfile-5.4 | 3 +++ Dockerfiles/slim/Dockerfile-5.5 | 3 +++ Dockerfiles/slim/Dockerfile-5.6 | 3 +++ Dockerfiles/slim/Dockerfile-7.0 | 3 +++ Dockerfiles/slim/Dockerfile-7.1 | 3 +++ Dockerfiles/slim/Dockerfile-7.2 | 3 +++ Dockerfiles/slim/Dockerfile-7.3 | 3 +++ Dockerfiles/slim/Dockerfile-7.4 | 3 +++ Dockerfiles/slim/Dockerfile-8.0 | 3 +++ Dockerfiles/slim/Dockerfile-8.1 | 3 +++ Dockerfiles/slim/Dockerfile-8.2 | 3 +++ Dockerfiles/work/Dockerfile-5.2 | 6 ++++++ Dockerfiles/work/Dockerfile-5.3 | 6 ++++++ Dockerfiles/work/Dockerfile-5.4 | 6 ++++++ Dockerfiles/work/Dockerfile-5.5 | 6 ++++++ Dockerfiles/work/Dockerfile-5.6 | 6 ++++++ Dockerfiles/work/Dockerfile-7.0 | 6 ++++++ Dockerfiles/work/Dockerfile-7.1 | 6 ++++++ Dockerfiles/work/Dockerfile-7.2 | 6 ++++++ Dockerfiles/work/Dockerfile-7.3 | 6 ++++++ Dockerfiles/work/Dockerfile-7.4 | 6 ++++++ Dockerfiles/work/Dockerfile-8.0 | 6 ++++++ Dockerfiles/work/Dockerfile-8.1 | 6 ++++++ Dockerfiles/work/Dockerfile-8.2 | 6 ++++++ README.md | 1 + bin/gen-docs-php-modules.sh | 4 ++++ doc/php-modules.md | 16 ++++++++++++++++ php_modules/xhprof/README.md | 8 ++++++++ php_modules/xhprof/install.yml | 25 +++++++++++++++++++++++++ php_modules/xhprof/options.yml | 24 ++++++++++++++++++++++++ 50 files changed, 425 insertions(+), 14 deletions(-) create mode 100644 php_modules/xhprof/README.md create mode 100644 php_modules/xhprof/install.yml create mode 100644 php_modules/xhprof/options.yml diff --git a/.ansible/DOCKERFILES/Dockerfile-mods.j2 b/.ansible/DOCKERFILES/Dockerfile-mods.j2 index 3ad6f328..2660e16f 100644 --- a/.ansible/DOCKERFILES/Dockerfile-mods.j2 +++ b/.ansible/DOCKERFILES/Dockerfile-mods.j2 @@ -456,11 +456,13 @@ RUN set -eux \ {% endif %} -# Deactive PSR and Phalcon: +# Deactivate PSR and Phalcon: # https://github.com/devilbox/docker-php-fpm/issues/201 +# Deactivate xhprof (might collide with Xdebug) RUN set -eux \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \ + && rm -f /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini || true \ ### diff --git a/.ansible/DOCKERFILES/Dockerfile-slim.j2 b/.ansible/DOCKERFILES/Dockerfile-slim.j2 index 1901fdde..00fb7fa0 100644 --- a/.ansible/DOCKERFILES/Dockerfile-slim.j2 +++ b/.ansible/DOCKERFILES/Dockerfile-slim.j2 @@ -454,6 +454,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/.ansible/DOCKERFILES/Dockerfile-work.j2 b/.ansible/DOCKERFILES/Dockerfile-work.j2 index 008259fe..6f5bbeb1 100644 --- a/.ansible/DOCKERFILES/Dockerfile-work.j2 +++ b/.ansible/DOCKERFILES/Dockerfile-work.j2 @@ -213,6 +213,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### @@ -497,6 +500,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/.ansible/group_vars/all/mods.yml b/.ansible/group_vars/all/mods.yml index 074eef94..0a7e1db1 100644 --- a/.ansible/group_vars/all/mods.yml +++ b/.ansible/group_vars/all/mods.yml @@ -105,6 +105,7 @@ extensions_enabled: - vips - wddx - xdebug + - xhprof - xlswriter - xmlreader - xmlrpc @@ -1547,6 +1548,22 @@ extensions_available: 5.2: type: pecl version: 2.2.7 + xhprof: + disabled: [5.2] + all: + type: pecl + 5.6: + type: pecl + version: 0.9.4 + 5.5: + type: pecl + version: 0.9.4 + 5.4: + type: pecl + version: 0.9.4 + 5.3: + type: pecl + version: 0.9.4 xlswriter: disabled: [5.2, 5.3, 5.4, 5.5, 5.6] all: diff --git a/CHANGELOG.md b/CHANGELOG.md index 025f61f2..4840ab85 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ ## Unreleased +## Release 0.150 + +### Added +- Added `xhprof` PHP extension + + ## Release 0.149 ### Added diff --git a/Dockerfiles/mods/Dockerfile-5.2 b/Dockerfiles/mods/Dockerfile-5.2 index 10747eb8..77f36c07 100644 --- a/Dockerfiles/mods/Dockerfile-5.2 +++ b/Dockerfiles/mods/Dockerfile-5.2 @@ -810,11 +810,13 @@ RUN set -eux \ && true -# Deactive PSR and Phalcon: +# Deactivate PSR and Phalcon: # https://github.com/devilbox/docker-php-fpm/issues/201 +# Deactivate xhprof (might collide with Xdebug) RUN set -eux \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \ + && rm -f /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini || true \ ### diff --git a/Dockerfiles/mods/Dockerfile-5.3 b/Dockerfiles/mods/Dockerfile-5.3 index 7fb69b8d..3d5c0cc7 100644 --- a/Dockerfiles/mods/Dockerfile-5.3 +++ b/Dockerfiles/mods/Dockerfile-5.3 @@ -640,6 +640,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: xhprof -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install xhprof-0.9.4 \ + # Enabling + && docker-php-ext-enable xhprof \ + && true + + # -------------------- Installing PHP Extension: xmlrpc -------------------- RUN set -eux \ # Installation: Generic @@ -968,6 +979,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \ + && php -m | grep -oiE '^xhprof$' \ + && php-fpm -m | grep -oiE '^xhprof$' \ && php -m | grep -oiE '^xmlreader$' \ && php-fpm -m | grep -oiE '^xmlreader$' \ && php -m | grep -oiE '^xmlrpc$' \ @@ -983,11 +996,13 @@ RUN set -eux \ && true -# Deactive PSR and Phalcon: +# Deactivate PSR and Phalcon: # https://github.com/devilbox/docker-php-fpm/issues/201 +# Deactivate xhprof (might collide with Xdebug) RUN set -eux \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \ + && rm -f /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini || true \ ### diff --git a/Dockerfiles/mods/Dockerfile-5.4 b/Dockerfiles/mods/Dockerfile-5.4 index 17570383..6a7115ed 100644 --- a/Dockerfiles/mods/Dockerfile-5.4 +++ b/Dockerfiles/mods/Dockerfile-5.4 @@ -651,6 +651,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: xhprof -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install xhprof-0.9.4 \ + # Enabling + && docker-php-ext-enable xhprof \ + && true + + # -------------------- Installing PHP Extension: xmlrpc -------------------- RUN set -eux \ # Installation: Generic @@ -979,6 +990,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \ + && php -m | grep -oiE '^xhprof$' \ + && php-fpm -m | grep -oiE '^xhprof$' \ && php -m | grep -oiE '^xmlreader$' \ && php-fpm -m | grep -oiE '^xmlreader$' \ && php -m | grep -oiE '^xmlrpc$' \ @@ -994,11 +1007,13 @@ RUN set -eux \ && true -# Deactive PSR and Phalcon: +# Deactivate PSR and Phalcon: # https://github.com/devilbox/docker-php-fpm/issues/201 +# Deactivate xhprof (might collide with Xdebug) RUN set -eux \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \ + && rm -f /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini || true \ ### diff --git a/Dockerfiles/mods/Dockerfile-5.5 b/Dockerfiles/mods/Dockerfile-5.5 index e1ad5277..7bf9951f 100644 --- a/Dockerfiles/mods/Dockerfile-5.5 +++ b/Dockerfiles/mods/Dockerfile-5.5 @@ -689,6 +689,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: xhprof -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install xhprof-0.9.4 \ + # Enabling + && docker-php-ext-enable xhprof \ + && true + + # -------------------- Installing PHP Extension: xmlrpc -------------------- RUN set -eux \ # Installation: Generic @@ -1032,6 +1043,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \ + && php -m | grep -oiE '^xhprof$' \ + && php-fpm -m | grep -oiE '^xhprof$' \ && php -m | grep -oiE '^xmlreader$' \ && php-fpm -m | grep -oiE '^xmlreader$' \ && php -m | grep -oiE '^xmlrpc$' \ @@ -1047,11 +1060,13 @@ RUN set -eux \ && true -# Deactive PSR and Phalcon: +# Deactivate PSR and Phalcon: # https://github.com/devilbox/docker-php-fpm/issues/201 +# Deactivate xhprof (might collide with Xdebug) RUN set -eux \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \ + && rm -f /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini || true \ ### diff --git a/Dockerfiles/mods/Dockerfile-5.6 b/Dockerfiles/mods/Dockerfile-5.6 index aef6c86d..27ba6baa 100644 --- a/Dockerfiles/mods/Dockerfile-5.6 +++ b/Dockerfiles/mods/Dockerfile-5.6 @@ -708,6 +708,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: xhprof -------------------- +RUN set -eux \ + # Installation: Version specific + # Type: PECL extension + # Default: Pecl command + && pecl install xhprof-0.9.4 \ + # Enabling + && docker-php-ext-enable xhprof \ + && true + + # -------------------- Installing PHP Extension: xmlrpc -------------------- RUN set -eux \ # Installation: Generic @@ -1050,6 +1061,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \ + && php -m | grep -oiE '^xhprof$' \ + && php-fpm -m | grep -oiE '^xhprof$' \ && php -m | grep -oiE '^xmlreader$' \ && php-fpm -m | grep -oiE '^xmlreader$' \ && php -m | grep -oiE '^xmlrpc$' \ @@ -1065,11 +1078,13 @@ RUN set -eux \ && true -# Deactive PSR and Phalcon: +# Deactivate PSR and Phalcon: # https://github.com/devilbox/docker-php-fpm/issues/201 +# Deactivate xhprof (might collide with Xdebug) RUN set -eux \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \ + && rm -f /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini || true \ ### diff --git a/Dockerfiles/mods/Dockerfile-7.0 b/Dockerfiles/mods/Dockerfile-7.0 index 402b5290..87a19b8a 100644 --- a/Dockerfiles/mods/Dockerfile-7.0 +++ b/Dockerfiles/mods/Dockerfile-7.0 @@ -833,6 +833,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: xhprof -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install xhprof \ + # Enabling + && docker-php-ext-enable xhprof \ + && true + + # -------------------- Installing PHP Extension: xlswriter -------------------- RUN set -eux \ # Installation: Generic @@ -1197,6 +1208,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \ + && php -m | grep -oiE '^xhprof$' \ + && php-fpm -m | grep -oiE '^xhprof$' \ && php -m | grep -oiE '^xlswriter$' \ && php-fpm -m | grep -oiE '^xlswriter$' \ && php -m | grep -oiE '^xmlreader$' \ @@ -1214,11 +1227,13 @@ RUN set -eux \ && true -# Deactive PSR and Phalcon: +# Deactivate PSR and Phalcon: # https://github.com/devilbox/docker-php-fpm/issues/201 +# Deactivate xhprof (might collide with Xdebug) RUN set -eux \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \ + && rm -f /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini || true \ ### diff --git a/Dockerfiles/mods/Dockerfile-7.1 b/Dockerfiles/mods/Dockerfile-7.1 index 14e6122c..cd13194c 100644 --- a/Dockerfiles/mods/Dockerfile-7.1 +++ b/Dockerfiles/mods/Dockerfile-7.1 @@ -851,6 +851,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: xhprof -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install xhprof \ + # Enabling + && docker-php-ext-enable xhprof \ + && true + + # -------------------- Installing PHP Extension: xlswriter -------------------- RUN set -eux \ # Installation: Generic @@ -1217,6 +1228,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \ + && php -m | grep -oiE '^xhprof$' \ + && php-fpm -m | grep -oiE '^xhprof$' \ && php -m | grep -oiE '^xlswriter$' \ && php-fpm -m | grep -oiE '^xlswriter$' \ && php -m | grep -oiE '^xmlreader$' \ @@ -1234,11 +1247,13 @@ RUN set -eux \ && true -# Deactive PSR and Phalcon: +# Deactivate PSR and Phalcon: # https://github.com/devilbox/docker-php-fpm/issues/201 +# Deactivate xhprof (might collide with Xdebug) RUN set -eux \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \ + && rm -f /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini || true \ ### diff --git a/Dockerfiles/mods/Dockerfile-7.2 b/Dockerfiles/mods/Dockerfile-7.2 index aecfc46d..9af8cf12 100644 --- a/Dockerfiles/mods/Dockerfile-7.2 +++ b/Dockerfiles/mods/Dockerfile-7.2 @@ -854,6 +854,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: xhprof -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install xhprof \ + # Enabling + && docker-php-ext-enable xhprof \ + && true + + # -------------------- Installing PHP Extension: xlswriter -------------------- RUN set -eux \ # Installation: Generic @@ -1222,6 +1233,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \ + && php -m | grep -oiE '^xhprof$' \ + && php-fpm -m | grep -oiE '^xhprof$' \ && php -m | grep -oiE '^xlswriter$' \ && php-fpm -m | grep -oiE '^xlswriter$' \ && php -m | grep -oiE '^xmlreader$' \ @@ -1239,11 +1252,13 @@ RUN set -eux \ && true -# Deactive PSR and Phalcon: +# Deactivate PSR and Phalcon: # https://github.com/devilbox/docker-php-fpm/issues/201 +# Deactivate xhprof (might collide with Xdebug) RUN set -eux \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \ + && rm -f /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini || true \ ### diff --git a/Dockerfiles/mods/Dockerfile-7.3 b/Dockerfiles/mods/Dockerfile-7.3 index d9c8f389..d27bdf28 100644 --- a/Dockerfiles/mods/Dockerfile-7.3 +++ b/Dockerfiles/mods/Dockerfile-7.3 @@ -848,6 +848,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: xhprof -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install xhprof \ + # Enabling + && docker-php-ext-enable xhprof \ + && true + + # -------------------- Installing PHP Extension: xlswriter -------------------- RUN set -eux \ # Installation: Generic @@ -1214,6 +1225,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \ + && php -m | grep -oiE '^xhprof$' \ + && php-fpm -m | grep -oiE '^xhprof$' \ && php -m | grep -oiE '^xlswriter$' \ && php-fpm -m | grep -oiE '^xlswriter$' \ && php -m | grep -oiE '^xmlreader$' \ @@ -1231,11 +1244,13 @@ RUN set -eux \ && true -# Deactive PSR and Phalcon: +# Deactivate PSR and Phalcon: # https://github.com/devilbox/docker-php-fpm/issues/201 +# Deactivate xhprof (might collide with Xdebug) RUN set -eux \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \ + && rm -f /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini || true \ ### diff --git a/Dockerfiles/mods/Dockerfile-7.4 b/Dockerfiles/mods/Dockerfile-7.4 index 109b6b7f..a079e508 100644 --- a/Dockerfiles/mods/Dockerfile-7.4 +++ b/Dockerfiles/mods/Dockerfile-7.4 @@ -835,6 +835,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: xhprof -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install xhprof \ + # Enabling + && docker-php-ext-enable xhprof \ + && true + + # -------------------- Installing PHP Extension: xlswriter -------------------- RUN set -eux \ # Installation: Generic @@ -1197,6 +1208,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^vips$' \ && php -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \ + && php -m | grep -oiE '^xhprof$' \ + && php-fpm -m | grep -oiE '^xhprof$' \ && php -m | grep -oiE '^xlswriter$' \ && php-fpm -m | grep -oiE '^xlswriter$' \ && php -m | grep -oiE '^xmlreader$' \ @@ -1214,11 +1227,13 @@ RUN set -eux \ && true -# Deactive PSR and Phalcon: +# Deactivate PSR and Phalcon: # https://github.com/devilbox/docker-php-fpm/issues/201 +# Deactivate xhprof (might collide with Xdebug) RUN set -eux \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \ + && rm -f /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini || true \ ### diff --git a/Dockerfiles/mods/Dockerfile-8.0 b/Dockerfiles/mods/Dockerfile-8.0 index f23781d5..05198d96 100644 --- a/Dockerfiles/mods/Dockerfile-8.0 +++ b/Dockerfiles/mods/Dockerfile-8.0 @@ -819,6 +819,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: xhprof -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install xhprof \ + # Enabling + && docker-php-ext-enable xhprof \ + && true + + # -------------------- Installing PHP Extension: xlswriter -------------------- RUN set -eux \ # Installation: Generic @@ -1170,6 +1181,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^vips$' \ && php -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \ + && php -m | grep -oiE '^xhprof$' \ + && php-fpm -m | grep -oiE '^xhprof$' \ && php -m | grep -oiE '^xlswriter$' \ && php-fpm -m | grep -oiE '^xlswriter$' \ && php -m | grep -oiE '^xmlreader$' \ @@ -1185,11 +1198,13 @@ RUN set -eux \ && true -# Deactive PSR and Phalcon: +# Deactivate PSR and Phalcon: # https://github.com/devilbox/docker-php-fpm/issues/201 +# Deactivate xhprof (might collide with Xdebug) RUN set -eux \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \ + && rm -f /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini || true \ ### diff --git a/Dockerfiles/mods/Dockerfile-8.1 b/Dockerfiles/mods/Dockerfile-8.1 index 8eafece1..48d2ce10 100644 --- a/Dockerfiles/mods/Dockerfile-8.1 +++ b/Dockerfiles/mods/Dockerfile-8.1 @@ -797,6 +797,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: xhprof -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install xhprof \ + # Enabling + && docker-php-ext-enable xhprof \ + && true + + # -------------------- Installing PHP Extension: xlswriter -------------------- RUN set -eux \ # Installation: Generic @@ -1146,6 +1157,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^vips$' \ && php -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \ + && php -m | grep -oiE '^xhprof$' \ + && php-fpm -m | grep -oiE '^xhprof$' \ && php -m | grep -oiE '^xlswriter$' \ && php-fpm -m | grep -oiE '^xlswriter$' \ && php -m | grep -oiE '^xmlreader$' \ @@ -1161,11 +1174,13 @@ RUN set -eux \ && true -# Deactive PSR and Phalcon: +# Deactivate PSR and Phalcon: # https://github.com/devilbox/docker-php-fpm/issues/201 +# Deactivate xhprof (might collide with Xdebug) RUN set -eux \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \ + && rm -f /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini || true \ ### diff --git a/Dockerfiles/mods/Dockerfile-8.2 b/Dockerfiles/mods/Dockerfile-8.2 index 8e9f8794..effab633 100644 --- a/Dockerfiles/mods/Dockerfile-8.2 +++ b/Dockerfiles/mods/Dockerfile-8.2 @@ -749,6 +749,17 @@ RUN set -eux \ && true +# -------------------- Installing PHP Extension: xhprof -------------------- +RUN set -eux \ + # Installation: Generic + # Type: PECL extension + # Default: Pecl command + && pecl install xhprof \ + # Enabling + && docker-php-ext-enable xhprof \ + && true + + # -------------------- Installing PHP Extension: xlswriter -------------------- RUN set -eux \ # Installation: Generic @@ -1087,6 +1098,8 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^uuid$' \ && php -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \ + && php -m | grep -oiE '^xhprof$' \ + && php-fpm -m | grep -oiE '^xhprof$' \ && php -m | grep -oiE '^xlswriter$' \ && php-fpm -m | grep -oiE '^xlswriter$' \ && php -m | grep -oiE '^xmlreader$' \ @@ -1102,11 +1115,13 @@ RUN set -eux \ && true -# Deactive PSR and Phalcon: +# Deactivate PSR and Phalcon: # https://github.com/devilbox/docker-php-fpm/issues/201 +# Deactivate xhprof (might collide with Xdebug) RUN set -eux \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-phalcon.ini || true \ && rm -f /usr/local/etc/php/conf.d/docker-php-ext-psr.ini || true \ + && rm -f /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini || true \ ### diff --git a/Dockerfiles/slim/Dockerfile-5.2 b/Dockerfiles/slim/Dockerfile-5.2 index 887c3ed9..a3e5ab8c 100644 --- a/Dockerfiles/slim/Dockerfile-5.2 +++ b/Dockerfiles/slim/Dockerfile-5.2 @@ -543,6 +543,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/slim/Dockerfile-5.3 b/Dockerfiles/slim/Dockerfile-5.3 index e9df782d..a3477037 100644 --- a/Dockerfiles/slim/Dockerfile-5.3 +++ b/Dockerfiles/slim/Dockerfile-5.3 @@ -543,6 +543,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/slim/Dockerfile-5.4 b/Dockerfiles/slim/Dockerfile-5.4 index 89130194..a912cc91 100644 --- a/Dockerfiles/slim/Dockerfile-5.4 +++ b/Dockerfiles/slim/Dockerfile-5.4 @@ -543,6 +543,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/slim/Dockerfile-5.5 b/Dockerfiles/slim/Dockerfile-5.5 index 8e14e528..bdfbb0e5 100644 --- a/Dockerfiles/slim/Dockerfile-5.5 +++ b/Dockerfiles/slim/Dockerfile-5.5 @@ -543,6 +543,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/slim/Dockerfile-5.6 b/Dockerfiles/slim/Dockerfile-5.6 index aae0f5d7..e4a0f623 100644 --- a/Dockerfiles/slim/Dockerfile-5.6 +++ b/Dockerfiles/slim/Dockerfile-5.6 @@ -547,6 +547,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/slim/Dockerfile-7.0 b/Dockerfiles/slim/Dockerfile-7.0 index 456ebfb3..fb66d2be 100644 --- a/Dockerfiles/slim/Dockerfile-7.0 +++ b/Dockerfiles/slim/Dockerfile-7.0 @@ -547,6 +547,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/slim/Dockerfile-7.1 b/Dockerfiles/slim/Dockerfile-7.1 index bc7817b5..e1902676 100644 --- a/Dockerfiles/slim/Dockerfile-7.1 +++ b/Dockerfiles/slim/Dockerfile-7.1 @@ -541,6 +541,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/slim/Dockerfile-7.2 b/Dockerfiles/slim/Dockerfile-7.2 index f5e4ed55..670f01fc 100644 --- a/Dockerfiles/slim/Dockerfile-7.2 +++ b/Dockerfiles/slim/Dockerfile-7.2 @@ -541,6 +541,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/slim/Dockerfile-7.3 b/Dockerfiles/slim/Dockerfile-7.3 index 1e0155f7..fa2cf8ed 100644 --- a/Dockerfiles/slim/Dockerfile-7.3 +++ b/Dockerfiles/slim/Dockerfile-7.3 @@ -541,6 +541,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/slim/Dockerfile-7.4 b/Dockerfiles/slim/Dockerfile-7.4 index 40cb9c25..a9835ee3 100644 --- a/Dockerfiles/slim/Dockerfile-7.4 +++ b/Dockerfiles/slim/Dockerfile-7.4 @@ -541,6 +541,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/slim/Dockerfile-8.0 b/Dockerfiles/slim/Dockerfile-8.0 index 0d927ced..496cce82 100644 --- a/Dockerfiles/slim/Dockerfile-8.0 +++ b/Dockerfiles/slim/Dockerfile-8.0 @@ -541,6 +541,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/slim/Dockerfile-8.1 b/Dockerfiles/slim/Dockerfile-8.1 index ff8738bf..aebd4a3b 100644 --- a/Dockerfiles/slim/Dockerfile-8.1 +++ b/Dockerfiles/slim/Dockerfile-8.1 @@ -541,6 +541,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/slim/Dockerfile-8.2 b/Dockerfiles/slim/Dockerfile-8.2 index fd71d005..5fa916c7 100644 --- a/Dockerfiles/slim/Dockerfile-8.2 +++ b/Dockerfiles/slim/Dockerfile-8.2 @@ -541,6 +541,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/work/Dockerfile-5.2 b/Dockerfiles/work/Dockerfile-5.2 index 978d3786..b24b280c 100644 --- a/Dockerfiles/work/Dockerfile-5.2 +++ b/Dockerfiles/work/Dockerfile-5.2 @@ -189,6 +189,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### @@ -772,6 +775,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/work/Dockerfile-5.3 b/Dockerfiles/work/Dockerfile-5.3 index 8f16a1cf..fc09e94b 100644 --- a/Dockerfiles/work/Dockerfile-5.3 +++ b/Dockerfiles/work/Dockerfile-5.3 @@ -223,6 +223,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### @@ -865,6 +868,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/work/Dockerfile-5.4 b/Dockerfiles/work/Dockerfile-5.4 index 6cac5c14..4c83e856 100644 --- a/Dockerfiles/work/Dockerfile-5.4 +++ b/Dockerfiles/work/Dockerfile-5.4 @@ -223,6 +223,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### @@ -903,6 +906,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/work/Dockerfile-5.5 b/Dockerfiles/work/Dockerfile-5.5 index 08c24e61..8b919f94 100644 --- a/Dockerfiles/work/Dockerfile-5.5 +++ b/Dockerfiles/work/Dockerfile-5.5 @@ -223,6 +223,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### @@ -990,6 +993,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/work/Dockerfile-5.6 b/Dockerfiles/work/Dockerfile-5.6 index 408c2cea..3cee7f8e 100644 --- a/Dockerfiles/work/Dockerfile-5.6 +++ b/Dockerfiles/work/Dockerfile-5.6 @@ -223,6 +223,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### @@ -1028,6 +1031,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/work/Dockerfile-7.0 b/Dockerfiles/work/Dockerfile-7.0 index 68c43aed..64f24b73 100644 --- a/Dockerfiles/work/Dockerfile-7.0 +++ b/Dockerfiles/work/Dockerfile-7.0 @@ -223,6 +223,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### @@ -1028,6 +1031,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/work/Dockerfile-7.1 b/Dockerfiles/work/Dockerfile-7.1 index 52ade592..93a63574 100644 --- a/Dockerfiles/work/Dockerfile-7.1 +++ b/Dockerfiles/work/Dockerfile-7.1 @@ -223,6 +223,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### @@ -1028,6 +1031,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/work/Dockerfile-7.2 b/Dockerfiles/work/Dockerfile-7.2 index 2a3f9846..d1bcdea4 100644 --- a/Dockerfiles/work/Dockerfile-7.2 +++ b/Dockerfiles/work/Dockerfile-7.2 @@ -223,6 +223,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### @@ -1028,6 +1031,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/work/Dockerfile-7.3 b/Dockerfiles/work/Dockerfile-7.3 index cc93a7e4..ef03db4b 100644 --- a/Dockerfiles/work/Dockerfile-7.3 +++ b/Dockerfiles/work/Dockerfile-7.3 @@ -225,6 +225,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### @@ -1028,6 +1031,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/work/Dockerfile-7.4 b/Dockerfiles/work/Dockerfile-7.4 index 5486f8d9..1571541e 100644 --- a/Dockerfiles/work/Dockerfile-7.4 +++ b/Dockerfiles/work/Dockerfile-7.4 @@ -225,6 +225,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### @@ -1028,6 +1031,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/work/Dockerfile-8.0 b/Dockerfiles/work/Dockerfile-8.0 index 4c7e5ef9..d6df22cc 100644 --- a/Dockerfiles/work/Dockerfile-8.0 +++ b/Dockerfiles/work/Dockerfile-8.0 @@ -225,6 +225,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### @@ -1028,6 +1031,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/work/Dockerfile-8.1 b/Dockerfiles/work/Dockerfile-8.1 index bdc45e05..16182f12 100644 --- a/Dockerfiles/work/Dockerfile-8.1 +++ b/Dockerfiles/work/Dockerfile-8.1 @@ -225,6 +225,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### @@ -1028,6 +1031,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/Dockerfiles/work/Dockerfile-8.2 b/Dockerfiles/work/Dockerfile-8.2 index 16fc8a52..c3a829f9 100644 --- a/Dockerfiles/work/Dockerfile-8.2 +++ b/Dockerfiles/work/Dockerfile-8.2 @@ -225,6 +225,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### @@ -954,6 +957,9 @@ RUN set -eux \ fi \ && if find /usr/local/lib/php/extensions/ -name psr.so | grep psr; then \ echo "extension=psr.so" > /usr/local/etc/php/conf.d/docker-php-ext-psr.ini; \ + fi \ + && if find /usr/local/lib/php/extensions/ -name xhprof.so | grep xhprof; then \ + echo "extension=xhprof.so" > /usr/local/etc/php/conf.d/docker-php-ext-xhprof.ini; \ fi ### diff --git a/README.md b/README.md index 4211bcec..5490403b 100644 --- a/README.md +++ b/README.md @@ -199,6 +199,7 @@ The provided Docker images heavily rely on inheritance to guarantee smallest pos [`vips`](php_modules/vips/) [`wddx`](php_modules/wddx/) [`Xdebug`](php_modules/xdebug/) +[`xhprof`](php_modules/xhprof/) [`xlswriter`](php_modules/xlswriter/) [`xml`](php_modules/xml/) [`xmlreader`](php_modules/xmlreader/) diff --git a/bin/gen-docs-php-modules.sh b/bin/gen-docs-php-modules.sh index a302ce28..1b061ae0 100755 --- a/bin/gen-docs-php-modules.sh +++ b/bin/gen-docs-php-modules.sh @@ -97,6 +97,10 @@ get_modules_from_image() { modules="$( printf "%s\n%s\n" "${modules}" "phalcon" )"; fi + if docker run --rm --platform "${ARCH}" --entrypoint=find "${IMAGE}:${img_tag}" /usr/local/lib/php/extensions -name 'xhprof.so' | grep -q xhprof.so; then + modules="$( printf "%s\n%s\n" "${modules}" "xhprof" )"; + fi + # Sort alphabetically modules="$( echo "${modules}" | sort -fu )" diff --git a/doc/php-modules.md b/doc/php-modules.md index 34e7e29e..609a844d 100644 --- a/doc/php-modules.md +++ b/doc/php-modules.md @@ -2196,6 +2196,22 @@ The following PHP modules are available on the `mods`, `prod`, `slim` and `work` ✓ ✓ + + xhprof + + ✓ + ✓ + ✓ + ✓ + ✓ + ✓ + ✓ + ✓ + ✓ + ✓ + ✓ + ✓ + xlswriter diff --git a/php_modules/xhprof/README.md b/php_modules/xhprof/README.md new file mode 100644 index 00000000..9f716163 --- /dev/null +++ b/php_modules/xhprof/README.md @@ -0,0 +1,8 @@ +# xhprof + +XHProf is a function-level hierarchical profiler for PHP and has a simple HTML based navigational interface. The raw data collection component is implemented in C (as a PHP extension). + +| Platform | Url | +|----------|------------------------------------------------------------------| +| GitHub | https://github.com/longxinH/xhprof | +| Pecl | https://pecl.php.net/package/xhprof | diff --git a/php_modules/xhprof/install.yml b/php_modules/xhprof/install.yml new file mode 100644 index 00000000..5431071e --- /dev/null +++ b/php_modules/xhprof/install.yml @@ -0,0 +1,25 @@ +--- + +# Available Jinja2 variables: +# --------------------------- +# * {{ php_all_versions }}: Array of all PHP versions + + +all: + type: pecl + +5.6: + type: pecl + version: 0.9.4 + +5.5: + type: pecl + version: 0.9.4 + +5.4: + type: pecl + version: 0.9.4 + +5.3: + type: pecl + version: 0.9.4 diff --git a/php_modules/xhprof/options.yml b/php_modules/xhprof/options.yml new file mode 100644 index 00000000..5debbe89 --- /dev/null +++ b/php_modules/xhprof/options.yml @@ -0,0 +1,24 @@ +--- + +# The name of the module +name: xhprof + +# Exclude module build/installation for the following PHP versions +exclude: [5.2] + +# In order for this module to built correctly against all dependencies, +# the following modules must have been built first. +depends_build: [] + +# In order for this module to function correctly, +# the following modules must be loaded before. +depends_load: [] + +# If the following PHP modules are loaded, this module will not behave as expected. +conflicts_load: [] + +# Enable this module by default via php.ini for PHP cli command? +enabled_php_cli: true + +# Enable this module by default via php.ini for PHP-FPM? +enabled_php_fpm: true From c0ee7a7e136d64e1f783d90a01e1539574e84220 Mon Sep 17 00:00:00 2001 From: cytopia Date: Sun, 1 Jan 2023 17:12:21 +0100 Subject: [PATCH 2/2] Remove legacy xhprof --- .ansible/group_vars/all/mods.yml | 14 +------------- Dockerfiles/mods/Dockerfile-5.3 | 13 ------------- Dockerfiles/mods/Dockerfile-5.4 | 13 ------------- Dockerfiles/mods/Dockerfile-5.5 | 13 ------------- Dockerfiles/mods/Dockerfile-5.6 | 13 ------------- doc/php-modules.md | 8 ++++---- php_modules/xhprof/install.yml | 16 ---------------- php_modules/xhprof/options.yml | 2 +- 8 files changed, 6 insertions(+), 86 deletions(-) diff --git a/.ansible/group_vars/all/mods.yml b/.ansible/group_vars/all/mods.yml index 0a7e1db1..4057a3d6 100644 --- a/.ansible/group_vars/all/mods.yml +++ b/.ansible/group_vars/all/mods.yml @@ -1549,21 +1549,9 @@ extensions_available: type: pecl version: 2.2.7 xhprof: - disabled: [5.2] + disabled: [5.2, 5.3, 5.4, 5.5, 5.6] all: type: pecl - 5.6: - type: pecl - version: 0.9.4 - 5.5: - type: pecl - version: 0.9.4 - 5.4: - type: pecl - version: 0.9.4 - 5.3: - type: pecl - version: 0.9.4 xlswriter: disabled: [5.2, 5.3, 5.4, 5.5, 5.6] all: diff --git a/Dockerfiles/mods/Dockerfile-5.3 b/Dockerfiles/mods/Dockerfile-5.3 index 3d5c0cc7..9d1c226e 100644 --- a/Dockerfiles/mods/Dockerfile-5.3 +++ b/Dockerfiles/mods/Dockerfile-5.3 @@ -640,17 +640,6 @@ RUN set -eux \ && true -# -------------------- Installing PHP Extension: xhprof -------------------- -RUN set -eux \ - # Installation: Version specific - # Type: PECL extension - # Default: Pecl command - && pecl install xhprof-0.9.4 \ - # Enabling - && docker-php-ext-enable xhprof \ - && true - - # -------------------- Installing PHP Extension: xmlrpc -------------------- RUN set -eux \ # Installation: Generic @@ -979,8 +968,6 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \ - && php -m | grep -oiE '^xhprof$' \ - && php-fpm -m | grep -oiE '^xhprof$' \ && php -m | grep -oiE '^xmlreader$' \ && php-fpm -m | grep -oiE '^xmlreader$' \ && php -m | grep -oiE '^xmlrpc$' \ diff --git a/Dockerfiles/mods/Dockerfile-5.4 b/Dockerfiles/mods/Dockerfile-5.4 index 6a7115ed..f736d150 100644 --- a/Dockerfiles/mods/Dockerfile-5.4 +++ b/Dockerfiles/mods/Dockerfile-5.4 @@ -651,17 +651,6 @@ RUN set -eux \ && true -# -------------------- Installing PHP Extension: xhprof -------------------- -RUN set -eux \ - # Installation: Version specific - # Type: PECL extension - # Default: Pecl command - && pecl install xhprof-0.9.4 \ - # Enabling - && docker-php-ext-enable xhprof \ - && true - - # -------------------- Installing PHP Extension: xmlrpc -------------------- RUN set -eux \ # Installation: Generic @@ -990,8 +979,6 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \ - && php -m | grep -oiE '^xhprof$' \ - && php-fpm -m | grep -oiE '^xhprof$' \ && php -m | grep -oiE '^xmlreader$' \ && php-fpm -m | grep -oiE '^xmlreader$' \ && php -m | grep -oiE '^xmlrpc$' \ diff --git a/Dockerfiles/mods/Dockerfile-5.5 b/Dockerfiles/mods/Dockerfile-5.5 index 7bf9951f..b88e8f88 100644 --- a/Dockerfiles/mods/Dockerfile-5.5 +++ b/Dockerfiles/mods/Dockerfile-5.5 @@ -689,17 +689,6 @@ RUN set -eux \ && true -# -------------------- Installing PHP Extension: xhprof -------------------- -RUN set -eux \ - # Installation: Version specific - # Type: PECL extension - # Default: Pecl command - && pecl install xhprof-0.9.4 \ - # Enabling - && docker-php-ext-enable xhprof \ - && true - - # -------------------- Installing PHP Extension: xmlrpc -------------------- RUN set -eux \ # Installation: Generic @@ -1043,8 +1032,6 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \ - && php -m | grep -oiE '^xhprof$' \ - && php-fpm -m | grep -oiE '^xhprof$' \ && php -m | grep -oiE '^xmlreader$' \ && php-fpm -m | grep -oiE '^xmlreader$' \ && php -m | grep -oiE '^xmlrpc$' \ diff --git a/Dockerfiles/mods/Dockerfile-5.6 b/Dockerfiles/mods/Dockerfile-5.6 index 27ba6baa..c76c6577 100644 --- a/Dockerfiles/mods/Dockerfile-5.6 +++ b/Dockerfiles/mods/Dockerfile-5.6 @@ -708,17 +708,6 @@ RUN set -eux \ && true -# -------------------- Installing PHP Extension: xhprof -------------------- -RUN set -eux \ - # Installation: Version specific - # Type: PECL extension - # Default: Pecl command - && pecl install xhprof-0.9.4 \ - # Enabling - && docker-php-ext-enable xhprof \ - && true - - # -------------------- Installing PHP Extension: xmlrpc -------------------- RUN set -eux \ # Installation: Generic @@ -1061,8 +1050,6 @@ RUN set -eux \ && php-fpm -m | grep -oiE '^wddx$' \ && php -m | grep -oiE '^xdebug$' \ && php-fpm -m | grep -oiE '^xdebug$' \ - && php -m | grep -oiE '^xhprof$' \ - && php-fpm -m | grep -oiE '^xhprof$' \ && php -m | grep -oiE '^xmlreader$' \ && php-fpm -m | grep -oiE '^xmlreader$' \ && php -m | grep -oiE '^xmlrpc$' \ diff --git a/doc/php-modules.md b/doc/php-modules.md index 609a844d..4985ae52 100644 --- a/doc/php-modules.md +++ b/doc/php-modules.md @@ -2199,10 +2199,10 @@ The following PHP modules are available on the `mods`, `prod`, `slim` and `work` xhprof - ✓ - ✓ - ✓ - ✓ + + + + ✓ ✓ ✓ diff --git a/php_modules/xhprof/install.yml b/php_modules/xhprof/install.yml index 5431071e..1c9cafb1 100644 --- a/php_modules/xhprof/install.yml +++ b/php_modules/xhprof/install.yml @@ -7,19 +7,3 @@ all: type: pecl - -5.6: - type: pecl - version: 0.9.4 - -5.5: - type: pecl - version: 0.9.4 - -5.4: - type: pecl - version: 0.9.4 - -5.3: - type: pecl - version: 0.9.4 diff --git a/php_modules/xhprof/options.yml b/php_modules/xhprof/options.yml index 5debbe89..f2adfe88 100644 --- a/php_modules/xhprof/options.yml +++ b/php_modules/xhprof/options.yml @@ -4,7 +4,7 @@ name: xhprof # Exclude module build/installation for the following PHP versions -exclude: [5.2] +exclude: [5.2, 5.3, 5.4, 5.5, 5.6] # In order for this module to built correctly against all dependencies, # the following modules must have been built first.