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

Request: Support PHPUnit 7 because... WordPress. #25

Closed
connerbw opened this issue Jul 23, 2019 · 4 comments

Comments

@connerbw
Copy link

commented Jul 23, 2019

WordPress doesn't support PHPUnit 8, yet:

Travis.CI started giving us out of memory errors.

Did I mention WordPress.

Help? 😢

@rask

This comment has been minimized.

Copy link

commented Jul 30, 2019

This is mostly PHPUnit and php-code-coverage related, not PCOV, as they decide what coverage driver to load. PCOV support appeared in PHPUnit 8 as the php-code-coverage dependency introduced PCOV driver support in that release (php-code-coverage 7.x I think?).

The sanest approach would be to pester WordPress core developers to upgrade to PHPUnit 8, but I do understand that it would probably take ages to happen.

@michaelbutler

This comment has been minimized.

Copy link

commented Jul 30, 2019

Not sure why it is not mentioned in this project's README.md (maybe it should?) but there is a workaround for this... krakjoe created pcov/clobber as a small composer package that can be used to live patch PHPUnit 7 code to support pcov.

As a build prestep you could install clobber, run it on your project's root workspace, then run your test suite with pcov, then finally unclobber as a post step, and remove clobber package.

@rask

This comment has been minimized.

Copy link

commented Jul 31, 2019

@michaelbutler did not know about this, need to check it out. Thanks!

@krakjoe

This comment has been minimized.

Copy link
Owner

commented Jul 31, 2019

clobber is not mentioned in the readme because I would prefer if people just do the upgrade, clobber is not an elegant tool, it's a get-the-job-done tool that's fine to use temporarily, but I don't intend to maintain it into the future and it can't be considered a legitimate method of deploying pcov.

I totally get that it's not possible to "just do the upgrade", which is why clobber exists in the first place, but that we don't live in an ideal world is not a good excuse for failing to aim for ideal :)

@krakjoe krakjoe closed this Jul 31, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.