Skip to content

Conversation

@sanmai
Copy link
Contributor

@sanmai sanmai commented Dec 19, 2024

What and why? 🤔

Let's start testing the library on PHP 8.4 and fix issues. Specifically, implicit nullable are now deprecated as of PHP 8.4:

- public function __construct(CacheProvider $cache_provider = null)
+ public function __construct(?CacheProvider $cache_provider = null)

Unless we make the change above, we'll see:

Deprecated:   Implicitly marking parameter $cache_provider as nullable is deprecated, the explicit nullable type must be used instead

This is a non-breaking change, as you can see from the lack of LSP errors: https://3v4l.org/VmME0

Testing Steps ✍️

CI should pass, review the changes.

You're it! 👑

Tag a random reviewer by adding @Automattic/stream-builders to the reviewers section, but mention them here for visibility as well.

@coveralls
Copy link

coveralls commented Dec 19, 2024

Coverage Status

coverage: 79.704%. remained the same
when pulling 548cad0 on sanmai/php84
into a1d595e on main.

@sanmai sanmai requested a review from a team as a code owner December 19, 2024 04:24
@sanmai sanmai requested a review from jbao December 19, 2024 04:24
matrix:
php-version:
- "7.4"
- "8.1"
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We would want to switch to PHP 8.1 for static analysis and other common stages, but there are branch protection rules that demand PHP 7.4. So let's add 8.1 first and tweak the protections later.

@sanmai sanmai enabled auto-merge (squash) December 19, 2024 04:59
@sanmai sanmai merged commit a91ac23 into main Dec 19, 2024
13 checks passed
@sanmai sanmai deleted the sanmai/php84 branch December 19, 2024 13:05
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.

4 participants