Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XDEBUG 3 complains about xdebug.remote_autostart = 1 in /usr/local/etc/php/conf.d/xxx-lando-default.ini #92

Open
zuernBernhard opened this issue Jan 26, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@zuernBernhard
Copy link

When I run a current PHP Version in lando (eg 8.1) Xdebug (>=3) complains about config which is only compatible with XDEBUG2.

So every command which uses PHP like lando php -v results in a message like

$ lando php -v
Xdebug: [Config] The setting 'xdebug.remote_autostart' has been renamed, see the upgrading guide at https://xdebug.org/docs/upgrade_guide#changed-xdebug.remote_autostart (See: https://xdebug.org/docs/errors#CFG-C-CHANGED)
PHP 8.1.18 (cli) (built: May  3 2023 05:11:38) (NTS)
Copyright (c) The PHP Group
Zend Engine v4.1.18, Copyright (c) Zend Technologies
    with Zend OPcache v8.1.18, Copyright (c), by Zend Technologies
    with Xdebug v3.2.1, Copyright (c) 2002-2023, by Derick Rethans
@zuernBernhard
Copy link
Author

Perhaps this solution is too simple ?

#93

@AaronFeledy
Copy link

Some older php versions supported by Lando still use Xdebug 2 for compatibility reasons. Currently, Lando shares this single config file across the two versions of Xdebug. Simply removing the older config will fix this warning, but will also break Xdebug in older PHP versions. This could be changed so that there are two possible config files and Lando could choose the correct one based on the version of PHP. An example of this type of behavior can be found in the Lando Drupal plugin where there is a separate config for MySQL 8.

I would suggest creating a new ini file containing just xdebug 2 config, then adding logic similar to Drupal's MySQL config selection to add it in when an older PHP version is used. https://github.com/lando/drupal/blob/eb8152876ff67d0f2760b44ce7f62438f454d719/builders/_drupaly.js#L99-L103

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants