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

fix: disable Xdebug for composer command, fixes #4219 #5586

Merged

Conversation

stasadev
Copy link
Member

@stasadev stasadev commented Nov 29, 2023

The Issue

How This PR Solves The Issue

Adds XDEBUG_MODE=off for ddev composer.
os.Setenv("XDEBUG_MODE", "off") is not working here, because ddev composer runs inside docker-compose exec.

Manual Testing Instructions

  1. ddev start
  2. ddev xdebug
  3. ddev composer -V - should not show Xdebug output.

Automated Testing Overview

Related Issue Link(s)

Release/Deployment Notes

@stasadev stasadev requested a review from a team as a code owner November 29, 2023 18:26
Copy link

github-actions bot commented Nov 29, 2023

@stasadev stasadev changed the title fix: disable Xdebug for composer command, fixes #4219 fix: disable Xdebug for composer command, fixes #4219 Nov 29, 2023
@rfay rfay force-pushed the 20231129_stasadev_disable_xdebug_for_composer branch from a89b644 to 54001fb Compare December 1, 2023 23:17
@rfay
Copy link
Member

rfay commented Dec 1, 2023

Rebased

Copy link
Member

@rfay rfay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like an elegant fix, and works correctly. I also manually tested with PhpStorm listening for xdebug. And tried with nc -l 9003 on the host. Without this, xdebug connects to 9003 when you do a ddev composer command, and with this patch it does not.

@rfay rfay merged commit 6f092e8 into ddev:master Dec 4, 2023
17 of 18 checks passed
@stasadev stasadev deleted the 20231129_stasadev_disable_xdebug_for_composer branch December 4, 2023 18:23
@rfay
Copy link
Member

rfay commented Dec 5, 2023

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants