phar-io / phive

The Phar Installation and Verification Environment (PHIVE)
https://phar.io
BSD 3-Clause "New" or "Revised" License
579 stars 43 forks source link

Force install PHPUnit version 9 #410

Closed nicwortel closed 1 year ago

nicwortel commented 1 year ago

PHPUnit 10 does not support PHP versions < 8.1.

See https://github.com/phar-io/phive/pull/409#issuecomment-1593139528 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 commented 1 year ago

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.

nicwortel commented 1 year ago

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.

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 commented 1 year ago

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.