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

PHP 8.4 - implicit nulls are deprecated #960

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

drbyte
Copy link
Contributor

@drbyte drbyte commented Aug 7, 2024

Use explicit nullable type.

MobileDetect::__construct(): Implicitly marking parameter $cache as nullable is deprecated, the explicit nullable type must be used instead

CacheException::__construct(): Implicitly marking parameter $previous as nullable is deprecated, the explicit nullable type must be used instead

Also updated Github Actions workflow to include PHP 8.4

Fixes #956
Replaces #957

@drbyte drbyte force-pushed the fix-php-8.4-implicit-nulls branch 3 times, most recently from 976522f to d0edfa3 Compare August 7, 2024 17:14
`MobileDetect::__construct(): Implicitly marking parameter $cache as nullable is deprecated, the explicit nullable type must be used instead`
`CacheException::__construct(): Implicitly marking parameter $previous as nullable is deprecated, the explicit nullable type must be used instead`

Updated Github Actions workflow to include PHP 8.4

Fixes serbanghita#956
Replaces serbanghita#957
@drbyte drbyte force-pushed the fix-php-8.4-implicit-nulls branch from d0edfa3 to 8033d6e Compare August 7, 2024 17:15
@drbyte
Copy link
Contributor Author

drbyte commented Aug 7, 2024

Note: phpstan hasn't yet fixed this same issue within their package.
Therefore the composer.json in this PR includes a dev version of phpstan. The .x-dev suffix can be dropped once phpstan officially releases the 1.12 version. Or whatever other changes might be more ideal after phpstan officially fixes the same in their package.

Fortunately it's backward compatible back to at least PHP 8.0, so all the tests are passing fine.

@serbanghita
Copy link
Owner

Checking this asap, thank you!

@serbanghita serbanghita merged commit 8f54bd3 into serbanghita:4.8.x Aug 12, 2024
5 checks passed
@drbyte drbyte deleted the fix-php-8.4-implicit-nulls branch August 12, 2024 15:54
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.

php 8.4 - implicit nulls are deprecated
2 participants