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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable xdebug manually #5135

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion composer.json
Expand Up @@ -41,7 +41,7 @@
"sebastian/code-unit": "^1.0.6",
"sebastian/comparator": "^4.0.8",
"sebastian/diff": "^4.0.3",
"sebastian/environment": "^5.1.3",
"sebastian/environment": "^5.1.4",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm assuming this PR will be released as that version.

"sebastian/exporter": "^4.0.5",
"sebastian/global-state": "^5.0.1",
"sebastian/object-enumerator": "^4.0.3",
Expand Down
4 changes: 4 additions & 0 deletions src/Util/PHP/AbstractPhpProcess.php
Expand Up @@ -209,6 +209,10 @@ public function getCommand(array $settings, string $file = null): string
array_keys(ini_get_all('xdebug'))
)
);

if (!$this->runtime->isXdebugLoadedByDefault()) {
$settings[] = 'zend_extension=' . (getenv('TODO_USE_PHPUNIT_SETTINGS') ?: 'php_xdebug');
Copy link
Contributor Author

@uuf6429 uuf6429 Jan 15, 2023

Choose a reason for hiding this comment

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

getenv('TODO_USE_PHPUNIT_SETTINGS')

Should I...

  1. ...just use php_xdebug since it already solves most cases
  2. ...use getenv('XX') ?: 'php_xdebug' to offer a bit of flexibility (what should it be named?)
  3. ...use PHPUnit xml config functionality to "do it properly"

}
}

$command .= $this->settingsToParameters($settings);
Expand Down