Skip to content

Conversation

@MarkusBauer
Copy link

Implicitly nullable parameter declarations are deprecated from PHP 8.4 on and will be removed in PHP 9. This project uses them in one function only, which is fixed by this PR.

How to reproduce:

> docker run --rm -v .:/app "php:8.4-rc-cli" find /app -type f -name "*.php" -exec php -d error_reporting=32765 -l {} \; | grep -v 'No syntax errors detected'
Deprecated: Jenssegers\ImageHash\ImageHash::__construct(): Implicitly marking parameter $implementation as nullable is deprecated, the explicit nullable type must be used instead in /app/src/ImageHash.php on line 16
Deprecated: Jenssegers\ImageHash\ImageHash::__construct(): Implicitly marking parameter $driver as nullable is deprecated, the explicit nullable type must be used instead in /app/src/ImageHash.php on line 16

Note: Not fixed are deprecated features in the test dependencies (namely PhpCoveralls).

@pataar
Copy link
Contributor

pataar commented Jan 27, 2025

@jenssegers Any chance in merging this?

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