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

Force install PHPUnit version 9 #410

Merged
merged 1 commit into from Jun 15, 2023
Merged

Conversation

nicwortel
Copy link
Contributor

PHPUnit 10 does not support PHP versions < 8.1.

See #409 (comment) for context.

I was confused as to why PHIVE did not abide the ^9.5 version constraint in phive.xml, I assume this is because in integrate.yaml there is a direct phive install (...) phpunit call, which overrides the phive.xml file?

And I assume that just running phive install as part of the GitHub Actions workflow does not work because the GPG key must be accepted.

@theseer
Copy link
Member

theseer commented Jun 15, 2023

PHPUnit 10 does not support PHP versions < 8.1.

See #409 (comment) for context.

I was confused as to why PHIVE did not abide the ^9.5 version constraint in phive.xml, I assume this is because in integrate.yaml there is a direct phive install (...) phpunit call, which overrides the phive.xml file?

And I assume that just running phive install as part of the GitHub Actions workflow does not work because the GPG key must be accepted.

Indeed we need to pass the gpg key id to be trusted, but that doesn't require us to specify what to install. Given we use install with an alias but without a version constraint, the setting in the phive.xml is ignored.

PHPUnit 10 does not support PHP versions < 8.1.

See phar-io#409 (comment) for context.
Copy link
Member

@theseer theseer left a comment

Choose a reason for hiding this comment

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

Using ^9 is not a valid semver specification. Or at least, we do not support that ;)

But instead of fixing it, let's just remove the phpunit@^9. It should pick up the entry fom the phive.xml

@nicwortel
Copy link
Contributor Author

Yeah, I was a bit too fast and didn't check to see that it wasn't a valid constraint 😉 I changed it into @^9.5 before I saw your comment.

If I drop phpunit and let it install all packages, don't we need to pass GPG keys for all phars in phive.xml?

@theseer
Copy link
Member

theseer commented Jun 15, 2023

Yeah, I was a bit too fast and didn't check to see that it wasn't a valid constraint wink I changed it into @^9.5 before I saw your comment.

No worries.

If I drop phpunit and let it install all packages, don't we need to pass GPG keys for all phars in phive.xml?

Valid point. Maybe I should change the behavior of the install command to honor the phive.xml version constraint anyhow... So, let's keep it this way for now.

@theseer theseer merged commit dfba120 into phar-io:master Jun 15, 2023
31 checks passed
@nicwortel nicwortel deleted the use-phpunit-9 branch June 15, 2023 15:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants