From 9d02e23d9bc26104ed3648854496f3d41c5cf09f Mon Sep 17 00:00:00 2001 From: Mistral OZ - MIO Date: Wed, 10 Nov 2021 11:46:22 +0100 Subject: [PATCH] Fix php8.1-xdebug --- .github/PULL_REQUEST_TEMPLATE.md | 15 ++++----------- README.md | 4 ++-- build-and-test.sh | 14 +++++++------- extensions/8.1/xdebug | 1 + utils/README.blueprint.md | 4 ++-- 5 files changed, 16 insertions(+), 22 deletions(-) create mode 120000 extensions/8.1/xdebug diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index c0952711..ecc5de57 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -9,12 +9,10 @@ For more information, see the [CONTRIBUTING](CONTRIBUTING.md) guide. -This PR fixes/implements the following **bugs/features** +This PR fixes/implements : -* [ ] Bug 1 -* [ ] Bug 2 -* [ ] Feature 1 -* [ ] Feature 2 +* [ ] Bug +* [ ] Feature * [ ] Breaking changes @@ -27,13 +25,8 @@ Explain the **motivation** for making this change. What existing problem does th Demonstrate the code is solid. Example: The exact commands you ran and their output. -**Closing issues** - - -Fixes # - **Checklist** -- [ ] Have you followed the guidelines in our [CONTRIBUTING](CONTRIBUTING.md) guide? +- [ ] I followed the guidelines in [CONTRIBUTING](CONTRIBUTING.md) guide - [ ] I have squashed any insignificant commits - [ ] This change has comments for package types, values, functions, and non-obvious lines of code \ No newline at end of file diff --git a/README.md b/README.md index a0493191..d57cbacd 100644 --- a/README.md +++ b/README.md @@ -187,8 +187,8 @@ Below is a list of extensions available in this image: - *mcrypt* is not available anymore in PHP 7.3+ - *weakref* is not compatible with PHP 7.3+ (but weak references were added to the PHP core in PHP 7.4) - *sybase* extension is not available in v4 (use v3) -- *ev*, *event*, *gnupg*, *uploadprogress*, *xmlrpc* are not available in PHP 8.0+ -- *amqp*, *apcu*, *ast*, *ds*, *gettext*, *grpc*, *igbinary*, *imagick*, *mailparse*, *memcached*, *mongodb*, *msgpack*, *mysqli*, *pcov*, *rdkafka*, *redis*, *swoole*, *uploadprogress*, *uuid*, *xdebug*, *yaml* are not available in PHP 8.1+ (RC) +- *event*, *gnupg*, *uploadprogress*, *xmlrpc* are not available in PHP 8.0+ +- *amqp*, *apcu*, *ast*, *blackfire*, *ds*, *gettext*, *grpc*, *ev*, *igbinary*, *imagick*, *mailparse*, *memcached*, *mongodb*, *msgpack*, *mysqli*, *pcov*, *rdkafka*, *redis*, *swoole*, *uploadprogress*, *uuid*, *yaml* are not available in PHP 8.1+ (RC) ### Enabling/disabling extensions in the fat image diff --git a/build-and-test.sh b/build-and-test.sh index ad3df785..e9bd96ef 100755 --- a/build-and-test.sh +++ b/build-and-test.sh @@ -191,16 +191,16 @@ RESULT=`docker run --rm -e CRON_SCHEDULE_1="* * * * * * *" -e CRON_COMMAND_1="wh #[[ "$?" = "1" ]] #set -e -if [[ "${PHP_VERSION}" != "8.1" ]]; then - # Let's check that the "xdebug.client_host" contains a value different from "no value" - docker run --rm -e PHP_EXTENSION_XDEBUG=1 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -i | grep xdebug.client_host| grep -v "no value" +# Let's check that the "xdebug.client_host" contains a value different from "no value" +docker run --rm -e PHP_EXTENSION_XDEBUG=1 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -i | grep xdebug.client_host| grep -v "no value" - # Let's check that "xdebug.mode" is set to "debug" by default - docker run --rm -e PHP_EXTENSION_XDEBUG=1 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -i | grep xdebug.mode| grep "debug" +# Let's check that "xdebug.mode" is set to "debug" by default +docker run --rm -e PHP_EXTENSION_XDEBUG=1 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -i | grep xdebug.mode| grep "debug" - # Let's check that "xdebug.mode" is properly overridden - docker run --rm -e PHP_EXTENSION_XDEBUG=1 -e PHP_INI_XDEBUG__MODE=debug,coverage thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -i | grep xdebug.mode| grep "debug,coverage" +# Let's check that "xdebug.mode" is properly overridden +docker run --rm -e PHP_EXTENSION_XDEBUG=1 -e PHP_INI_XDEBUG__MODE=debug,coverage thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -i | grep xdebug.mode| grep "debug,coverage" +if [[ "${PHP_VERSION}" != "8.1" ]]; then # Tests that blackfire + xdebug will output an error RESULT=`docker run --rm -e PHP_EXTENSION_XDEBUG=1 -e PHP_EXTENSION_BLACKFIRE=1 thecodingmachine/php:${PHP_VERSION}-${BRANCH}-${BRANCH_VARIANT} php -v 2>&1 | grep 'WARNING: Both Blackfire and Xdebug are enabled. This is not recommended as the PHP engine may not behave as expected. You should strongly consider disabling Xdebug or Blackfire.'` [[ "$RESULT" = "WARNING: Both Blackfire and Xdebug are enabled. This is not recommended as the PHP engine may not behave as expected. You should strongly consider disabling Xdebug or Blackfire." ]] diff --git a/extensions/8.1/xdebug b/extensions/8.1/xdebug new file mode 120000 index 00000000..2ee34925 --- /dev/null +++ b/extensions/8.1/xdebug @@ -0,0 +1 @@ +../core/xdebug \ No newline at end of file diff --git a/utils/README.blueprint.md b/utils/README.blueprint.md index 235bf6a0..ecd6c4cb 100644 --- a/utils/README.blueprint.md +++ b/utils/README.blueprint.md @@ -105,8 +105,8 @@ Below is a list of extensions available in this image: - *mcrypt* is not available anymore in PHP 7.3+ - *weakref* is not compatible with PHP 7.3+ (but weak references were added to the PHP core in PHP 7.4) - *sybase* extension is not available in v4 (use v3) -- *ev*, *event*, *gnupg*, *uploadprogress*, *xmlrpc* are not available in PHP 8.0+ -- *amqp*, *apcu*, *ast*, *ds*, *gettext*, *grpc*, *igbinary*, *imagick*, *mailparse*, *memcached*, *mongodb*, *msgpack*, *mysqli*, *pcov*, *rdkafka*, *redis*, *swoole*, *uploadprogress*, *uuid*, *xdebug*, *yaml* are not available in PHP 8.1+ (RC) +- *event*, *gnupg*, *uploadprogress*, *xmlrpc* are not available in PHP 8.0+ +- *amqp*, *apcu*, *ast*, *blackfire*, *ds*, *gettext*, *grpc*, *ev*, *igbinary*, *imagick*, *mailparse*, *memcached*, *mongodb*, *msgpack*, *mysqli*, *pcov*, *rdkafka*, *redis*, *swoole*, *uploadprogress*, *uuid*, *yaml* are not available in PHP 8.1+ (RC) ### Enabling/disabling extensions in the fat image