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

Allow tests to run on PHP8.4 #253

Merged
merged 2 commits into from
Oct 20, 2024
Merged

Conversation

heiglandreas
Copy link
Contributor

This then also prepares the package to be released for PHP8.4 runtimes

This then also prepares the package to be released for PHP8.4
runtimes
@scheb
Copy link
Owner

scheb commented Oct 19, 2024

I'd rather take this into a separate branch until 8.4 is actually released until all the builds can go green. Otherwise I'll have a failing build on the main branch.

Then everyone who wants to use it is free to reference that branch for time being. At least that's how I did it previously to prepare for upcoming PHP releases.

@heiglandreas
Copy link
Contributor Author

The challenge for users of the libs is that they then have to wait with testing their code until the libs are ready for PHP8.4. Which means that they won't be able to find issues with PHP8.4 while it's still in RC. Which in turn means that PHP doesn't actually know whether there are enough cases tested....

But I do have an idea that might make the build green again...

I'll address that later and perhaps we can find a way to allow testing with 8.4

@heiglandreas heiglandreas force-pushed the upgrade_to_php84 branch 2 times, most recently from 82ecbc1 to 65c8a16 Compare October 19, 2024 17:30
As Psalm is only used in one single job it can be removed in general
and then reinstalled when it is actually required before it is
executed.

This process allows to keep Psalm in the dev-dependencies so that
constributors still have it available but in CI-runs it needs not
to be installed when it is not executed.
@heiglandreas
Copy link
Contributor Author

The "problem" was that Psalm isn't yet ready for PHP8.4 but everything else is. As Psalm is in CI only used in the coding-standards run (which runs under PHP8.2) I removed that package completely before the default composer install action and then run composer require -W --dev vimeo/psalm:^5.0 before running psalm to re-install it, now under PHP8.2.

That way it is possible to test against recent versions of PHP without having to wait for a tool that is only used with an older PHP-version to get up to speed.

The psalm-dependency is still in the composer.json so that people that want to contribute have all the tools available.

@scheb
Copy link
Owner

scheb commented Oct 20, 2024

Yea, I understand that problem and I'm also guilty on that, since I'm typically declaring compatibility with a new version, once the stable version is released. It's the classic chicken egg problem.

PHP 8.4 doesn't seem to be a big deal and I'm fine with your implementation, so let's merge it.

@scheb scheb merged commit 42c8476 into scheb:7.x Oct 20, 2024
10 of 11 checks passed
@heiglandreas heiglandreas deleted the upgrade_to_php84 branch October 21, 2024 04:34
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.

2 participants