wodby / php

Generic PHP docker container images
MIT License
152 stars 103 forks source link

PHP_TAG=8.3-dev doesn't work with Xdebug #204

Open rahunak opened 1 month ago

rahunak commented 1 month ago

Fresh installed site with PHP_TAG=8.2-dev-4.43.6 from https://github.com/wodby/docker4drupal
in php container have output: wodby@php.container:/var/www/html $ php -v
PHP 8.2.5 (cli) (built: Apr 14 2023 17:52:42) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.2.5, Copyright (c) Zend Technologies
with Zend OPcache v8.2.5, Copyright (c), by Zend Technologies
with Xdebug v3.2.0, Copyright (c) 2002-2022, by Derick Rethans

But when I switch php to PHP_TAG=8.3-dev-4.60.2 in php container have output: wodby@php.container:/var/www/html $ php -v
PHP 8.3.9 (cli) (built: Jul 6 2024 01:11:01) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.3.9, Copyright (c) Zend Technologies
with Zend OPcache v8.3.9, Copyright (c), by Zend Technologies

In the new version no Xdebug, it's a problem. Any help appreciated.

csandanov commented 1 month ago

This is probably due to the change introduced in 4.47.0, we got rid of the confusingPHP_XDEBUG env var (https://github.com/wodby/php/issues/176).

So now by default xdebug disabled via the default value of PHP_EXTENSIONS_DISABLE='xdebug,xhprof,spx', if you need to enable xdebug you should override it (e.g. PHP_EXTENSIONS_DISABLE='xhprof,spx'). But maybe we should enable all extensions by default in the -dev variants 🤔