Skip to content

Run tests on PHP 8.1 #1012

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

Merged
merged 3 commits into from
Nov 22, 2021
Merged

Run tests on PHP 8.1 #1012

merged 3 commits into from
Nov 22, 2021

Conversation

derrabus
Copy link
Member

No description provided.

@derrabus
Copy link
Member Author

Oh well, Laminas Code apparently hasn't tagged a stable release for PHP 8.1 yet. Is there a way we can allow installing a dev version of laminas/lamias-code for the failing tests?

@weaverryan
Copy link
Member

Hmm, maybe not easily. It gets installed when we run composer require other-stuff inside our test projects. And so, we would need a way to say "please allow laminas-code at a dev version but not other stuff". If we can pull that off, then we definitely could :)

@derrabus
Copy link
Member Author

Would the good old "minimum-stability": "dev" + "prefer-stable": true trick work here? 🤔

@weaverryan
Copy link
Member

Haha, well, that SORT of worked. I mean, it did work, but the tests exploded... for several reasons. One is a super odd NormalizerAwareTrait not being found. Another is that php-cs-fixer doesn't like that PHP 8.1 is being used. I haven't had any time yet to look into these.

@weaverryan
Copy link
Member

This "should" now be "healthy". Not yet passing, but most (if not all) of the issues are legitimate (the 2 I know of already have PR's and just need a Symfony 5.3 release and DoctrineBundle merge + release).

@derrabus
Copy link
Member Author

derrabus commented Nov 20, 2021

Haha, well, that SORT of worked. I mean, it did work, but the tests exploded... for several reasons.

The output is already pretty insightful, thanks. 🙂

Another is that php-cs-fixer doesn't like that PHP 8.1 is being used.

We should be able to silence that by setting the env variable PHP_CS_FIXER_IGNORE_ENV to something truthy. I just noticed that you did that already. 🙈

weaverryan added a commit that referenced this pull request Nov 22, 2021
This PR was merged into the 1.0-dev branch.

Discussion
----------

Fix PHP 8.1 deprecations

This PR fixes two pieces of code that trigger a deprecation error on PHP 8.1. You can see them in the CI output of #1012.

Commits
-------

43b757b Fix PHP 8.1 deprecations
@weaverryan
Copy link
Member

I've just rebased so we can see what the tests think after #1016 :)

@weaverryan
Copy link
Member

Thank you @derrabus!

@weaverryan weaverryan merged commit b4bc959 into symfony:main Nov 22, 2021
@derrabus derrabus deleted the improvement/php-8.1 branch November 22, 2021 20:00
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