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 2.9.2 support #526

Closed
wants to merge 1 commit into from
Closed

Xdebug 2.9.2 support #526

wants to merge 1 commit into from

Conversation

pe7er
Copy link

@pe7er pe7er commented Aug 12, 2021

I am using Xdebug 2.9.2 (on Ubuntu 20.04 + PHP 7.4).
PR #448 seems to crash my environment with Xdebug 2.9.2 crash with a 500 error.

When I change the
if(extension_loaded('xdebug')
back to
if(extension_loaded('xdebug') && xdebug_is_enabled() && getenv('JOOMLATOOLS_BOX'))
it works ok again

I am using Xdebug 2.9.2 (on Ubuntu 20.04 + PHP 7.4). 
PR joomlatools#448 seems to crash my environment with Xdebug 2.9.2 crash with a 500 error.

When I change the 
```if(extension_loaded('xdebug')```
back to 
```if(extension_loaded('xdebug') && xdebug_is_enabled() && getenv('JOOMLATOOLS_BOX'))```
it works ok again
@johanjanssens
Copy link
Member

johanjanssens commented Aug 13, 2021

Hello Peter,

Thanks for the contribution. Much appreciated, happy to resolve this for you.

The xdebug_is_enabled() function no longer exists for xdebug 3. We have chosen to not add support for both xdebug 2 and 3 since there are quite some differences between both versions.

Would it be an option for you to upgrade to xdebug 3 instead? xdebug 2.9 is in security mode right now and will soon become unsupported: https://xdebug.org/docs/compat Might be worth upgrading?

If not we can probably just disable xdebug support for xdebug 2.x to get around this issue.

@johanjanssens johanjanssens self-requested a review August 13, 2021 20:53
@johanjanssens johanjanssens self-assigned this Aug 13, 2021
@pe7er
Copy link
Author

pe7er commented Aug 16, 2021

Hi Johan,
Thanks for your reply!

My Ubuntu 20.04 laptop has Xdebug version 2.9.2 in it's repo.
I've had a lot of issues with Xdebug 3 on another laptop using Debian Linux.
Hence, I am hesitant switching to v3 at the moment.

I've fixed it in my local environment and submitted this PR just in case other users run into the same issue.
No prob, I understand your choice in supporting the latest version.

@pe7er pe7er closed this Aug 16, 2021
@johanjanssens
Copy link
Member

johanjanssens commented Sep 8, 2021

@pe7er Quick update. We haven't forgotten about this one. We are working on a few improvements for the error handling and are removing the xdebug check and trigger altogether in favor of a more generic environment variable to put the framework into full debug mode. This will make sure you can use either xdebug 2 or 3, depending on your preference and setup.

The work is being done in this issue: #534

@johanjanssens johanjanssens linked an issue Sep 8, 2021 that may be closed by this pull request
@johanjanssens johanjanssens added this to the 3.5 milestone Sep 8, 2021
@pe7er
Copy link
Author

pe7er commented Sep 10, 2021

@johanjanssens Thanks!
Meanwhile I have followed your advice and moved to Xdebug 3.

@johanjanssens
Copy link
Member

Great to hear that!

@johanjanssens johanjanssens modified the milestones: 3.5, v3.5.7 Nov 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use Koowa::isDebug check for debugging
2 participants