Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Support phpdbg SAPI in Debug::enable() #26677

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

Closed
wants to merge 2 commits into from
Closed

Support phpdbg SAPI in Debug::enable() #26677

wants to merge 2 commits into from

Conversation

hkdobrev
Copy link
Contributor

@hkdobrev hkdobrev commented Mar 26, 2018

Q A
Branch? 2.7
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets
License MIT
Doc PR

PHPDBG is a CLI PHP debugger which could be useful for debugging in development or for running PHPUnit tests with code coverage faster compared to XDebug.

It has CLI characteristics, but it runs as a different SAPI.

@nicolas-grekas
Copy link
Member

Would be ok as bug fix on 2.7 on my side.

PHPDBG is a CLI PHP debugger which could be useful for debugging in development
or for running PHPUnit tests with code coverage faster compared to XDebug.

It has CLI characteristics, but it runs as a different SAPI.
@hkdobrev hkdobrev changed the base branch from master to 2.7 March 26, 2018 21:52
@hkdobrev
Copy link
Contributor Author

@nicolas-grekas Updated as a bug fix on top of 2.7.

@ogizanagi ogizanagi added Bug and removed Feature labels Mar 26, 2018
2.7.1
-----

* fix support for PHPDBG SAPI in `Debug::enable()`
Copy link
Contributor

Choose a reason for hiding this comment

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

This must be reverted. We only add new entries on minor versions, for features.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.

@ogizanagi ogizanagi added this to the 2.7 milestone Mar 26, 2018
@hkdobrev
Copy link
Contributor Author

On a separate note, there are quite a few places where checks for CLI hard-code the cli SAPI instead of using a function to hold all the CLI SAPIs. E.g. the simple PHPUnit runner, the var dumper and the process components support phpdbg, but not others like http foundation and http kernel. This could bring a lot of headaches to someone trying to use phpdbg debugger with a Symfony project. Would you welcome a PR addressing that in all components?

@fabpot
Copy link
Member

fabpot commented Mar 27, 2018

Thank you @hkdobrev.

fabpot added a commit that referenced this pull request Mar 27, 2018
This PR was squashed before being merged into the 2.7 branch (closes #26677).

Discussion
----------

Support phpdbg SAPI in Debug::enable()

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes    <!-- please add some, will be required by reviewers -->
| Fixed tickets |    <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | <!-- required for new features -->

PHPDBG is a CLI PHP debugger which could be useful for debugging in development or for running PHPUnit tests with code coverage faster compared to XDebug.

It has CLI characteristics, but it runs as a different SAPI.

Commits
-------

49a144f Support phpdbg SAPI in Debug::enable()
@fabpot fabpot closed this Mar 27, 2018
@ogizanagi
Copy link
Contributor

@hkdobrev : Yes, if there are other places where this makes sense, a PR fixing it all is always appreciated :)

@hkdobrev hkdobrev deleted the debug-enable-phpdbg branch March 27, 2018 10:22
This was referenced Apr 2, 2018
fabpot added a commit that referenced this pull request Apr 3, 2018
This PR was squashed before being merged into the 2.7 branch (closes #26749).

Discussion
----------

Add PHPDbg support to HTTP components

| Q             | A
| ------------- | ---
| Branch?       | 2.7
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets |
| License       | MIT
| Doc PR        |

This is a follow-up to #26677.

Turns out there aren't that many remaining instances of `PHP_SAPI` checks without considering `phpdbg` where it's needed.

Commits
-------

60dd79c Add PHPDbg support to HTTP components
This was referenced Apr 3, 2018
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.

5 participants