Skip to content

Run infection via phpdbg by default, since phpdbg is pre-installed with PHP #70

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

Merged

Conversation

Ocramius
Copy link
Member

Q A
Documentation no
Bugfix yes
BC Break no
New Feature no
RFC no
QA no

Description

This removes the need for installing pcov or xdebug in environments that need to
run mutation tests: phpdbg being pre-installed means that any bugs with it will
also be reported to the PHP project, instead of dragging in bugs from third-party
extensions.

This also fixes builds for projects that did not declare ext-pcov or ext-xdebug
as dependencies in require-dev: no need to have those, when running this task.

…led with PHP

This removes the need for installing `pcov` or `xdebug` in environments that need to
run mutation tests: `phpdbg` being pre-installed means that any bugs with it will
also be reported to the PHP project, instead of dragging in bugs from third-party
extensions.

This also fixes builds for projects that did not declare `ext-pcov` or `ext-xdebug`
as dependencies in `require-dev`: no need to have those, when running this task.
@Ocramius Ocramius added the Bug Something isn't working label Oct 11, 2021
@Ocramius Ocramius added this to the 1.11.4 milestone Oct 11, 2021
@Ocramius Ocramius requested a review from boesing October 11, 2021 09:03
@boesing
Copy link
Member

boesing commented Oct 11, 2021

I am not sure if phpdbg is set by-version when running the container.

We do actually only link php-config, php and phpize.

https://github.com/laminas/laminas-continuous-integration-action/blob/a2e86382379d207e43296a442e16646d4b67f0da/entrypoint.sh#L136

Not sure what kind of binary phpdbg is so it might work but I doubt it.

@Ocramius
Copy link
Member Author

As discussed with @boesing, will need to adjust laminas-continuous-integration-action too - investigating/preparing a patch

Ocramius added a commit to Ocramius/laminas-continuous-integration-action that referenced this pull request Oct 11, 2021
…script

This allows usage of the built-in PHP debugger, without the need to install larger
third-party extensions.

This is a requirement for laminas/laminas-ci-matrix-action#70
Copy link
Member

@boesing boesing left a comment

Choose a reason for hiding this comment

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

LGTM

https://github.com/laminas/laminas-continuous-integration-action/releases/tag/1.13.2 is already published and thus this should work.

You can verify this by creating the matrix with:

docker build . -t laminas/laminas-ci-matrix-action:dev-local
# The next command should output the JSON to pass to the container
docker run -v $(realpath .):/github/workspace -w=/github/workspace laminas/laminas-ci-matrix-action:dev-local
# The next command should pull the latest version of the CI Container
docker pull ghcr.io/laminas/laminas-continuous-integration:1
# Pass the JSON to the container
docker run -v $(realpath .):/github/workspace -w=/github/workspace ghcr.io/laminas/laminas-continious-integration-action:1 '{}'

@Ocramius
Copy link
Member Author

@boesing just verified this on ocramius/proxy-manager and it works 👍

🚢 + 🏷️

@Ocramius Ocramius merged commit ca94c95 into laminas:1.11.x Oct 11, 2021
@Ocramius Ocramius self-assigned this Oct 11, 2021
@Ocramius Ocramius deleted the fix/run-infection-with-phpdbg-by-default branch October 11, 2021 11:55
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

Successfully merging this pull request may close these issues.

2 participants