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

Upgrade to PHPUnit v10 #741

Open
wants to merge 5 commits into
base: 8.4.x
Choose a base branch
from
Open

Conversation

lcobucci
Copy link

@lcobucci lcobucci commented Mar 2, 2023

Fix #740

This makes the test suite compatible with the latest PHPUnit version and upgrades everything to it, which removes the SEGFAULTs we were having previously.

(the first commit is from #737, a rebase to sync is more than enough to remove it from the last merged branch)

Some people - like me - have a tweaked/opinionated global Git
configuration that forces GPG signatures everywhere, which basically
breaks the tests.

This standardises the expected configuration for tests, preventing
unexpected breakages.

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
PHPUnit 10.x only accepts static data providers, so...

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
@lcobucci
Copy link
Author

lcobucci commented Mar 2, 2023

Replaces #736

More info: sebastianbergmann/phpunit#5063

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
@Ocramius
Copy link
Member

Ocramius commented Mar 2, 2023

@Ocramius Ocramius added the bug label Mar 2, 2023
@Ocramius Ocramius added this to the 8.4.0 milestone Mar 2, 2023
@lcobucci
Copy link
Author

lcobucci commented Mar 2, 2023

Argh, this is possibly blocked by laminas/laminas-ci-matrix-action#189 and laminas/laminas-continuous-integration-action#130

Fun!

We can "hide" the SEGFAULTs by temporarily relying on exec().

Trade-offs, eh!?

@lcobucci
Copy link
Author

lcobucci commented Mar 2, 2023

Can't we add it as extension to be installed for this package (at least until that addressed on the upstream)?

Alternatively we can also use a pre-install script to run arbitrary commands as root: https://github.com/laminas/laminas-continuous-integration-action/blob/1.33.x/entrypoint.sh#L162

That might help to only install a coverage driver for specific jobs and allow moving this forward.

@Ocramius
Copy link
Member

Ocramius commented Mar 2, 2023

I really just need to do the upstream releasing/fixing: however you put the problem, the blocker is me and my constantly clogged schedule :S

@Ocramius
Copy link
Member

Ocramius commented Mar 2, 2023

I'd be fine with using exec() BTW: the code is well tested anyway, so it's an implementation change only.

@lcobucci
Copy link
Author

lcobucci commented Mar 2, 2023

I'd be fine with using exec() BTW: the code is well tested anyway, so it's an implementation change only.

I'll send a different PR to tackle this, I've the changes in my local history 👍

Given the plans for laminas-continuous-integration-action v2 is to always
ship PCOV, we can simply enable it here to allow us to detach the two
processes.

Signed-off-by: Luís Cobucci <lcobucci@gmail.com>
@lcobucci
Copy link
Author

lcobucci commented Mar 2, 2023

I'd be fine with using exec() BTW: the code is well tested anyway, so it's an implementation change only.

I'll send a different PR to tackle this, I've the changes in my local history +1

Scratch that, we can already enable PCOV here and solve the issue.

I've pushed an extra commit and rebased the baseline PR to verify that CI works for both.

@Ocramius @asgrim please approve the workflow run (whenever) on both PRs to make sure things are fine 👍

@lcobucci
Copy link
Author

lcobucci commented Mar 3, 2023

Silly me... I've overlooked the generated command for infection on the matrix 🤦
I used vendor/bin/infection to test, CI is using phpdbg -qrr ./vendor/bin/roave-infection-static-analysis-plugin

Well, that would never work 🤣

@lcobucci
Copy link
Author

lcobucci commented Mar 3, 2023

All the things I can think of are horrendous... let's release CI-action v2 😆

@Ocramius
Copy link
Member

Ocramius commented Mar 3, 2023

Yeah, and phpdbg + pcov together do lead to segfaults :S

@Ocramius
Copy link
Member

Ocramius commented Mar 3, 2023

@lcobucci doing some paid work, then picking up OCI-CatalogService again

@Ocramius Ocramius removed this from the 8.4.0 milestone Nov 25, 2023
@lcobucci
Copy link
Author

@Ocramius should we close this or bump to v11? 😅

@Ocramius
Copy link
Member

If it works, we can merge here, although no idea if it does :P

My OSS efforts have been almost zero this year, sorry.

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.

SEGFAULTs consistently happening on CI
2 participants