Skip to content

Fix deprecation notices#109

Merged
rtheunissen merged 2 commits into
php-ds:masterfrom
billythekid:patch-1
Feb 27, 2025
Merged

Fix deprecation notices#109
rtheunissen merged 2 commits into
php-ds:masterfrom
billythekid:patch-1

Conversation

@billythekid

@billythekid billythekid commented Feb 26, 2025

Copy link
Copy Markdown
Contributor

This should fix Implicitly marking parameter $param as nullable is deprecated, the explicit nullable type must be used instead PHP 8.4 notices in Set and Map classes. Works towards #108

Nullable type hinting came in in 7.1 so no need to update composer.json here as it's currently on 7.4 anyway

add explicit nullable types
add explicit nullable type
@rtheunissen
rtheunissen merged commit ef42c47 into php-ds:master Feb 27, 2025
@Bilge

Bilge commented May 16, 2025

Copy link
Copy Markdown
Contributor

@rtheunissen This needs a tag, please.

@Bilge

Bilge commented May 17, 2025

Copy link
Copy Markdown
Contributor

Actually, this still isn't enough.

Deprecated: Ds\Traits\GenericSequence::filter(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in /vendor/php-ds/php-ds/src/Traits/GenericSequence.php on line 99

Deprecated: Ds\Traits\GenericSequence::join(): Implicitly marking parameter $glue as nullable is deprecated, the explicit nullable type must be used instead in /vendor/php-ds/php-ds/src/Traits/GenericSequence.php on line 162

Deprecated: Ds\Traits\GenericSequence::slice(): Implicitly marking parameter $length as nullable is deprecated, the explicit nullable type must be used instead in /vendor/php-ds/php-ds/src/Traits/GenericSequence.php on line 321

Deprecated: Ds\Traits\GenericSequence::sort(): Implicitly marking parameter $comparator as nullable is deprecated, the explicit nullable type must be used instead in /vendor/php-ds/php-ds/src/Traits/GenericSequence.php on line 333

Deprecated: Ds\Traits\GenericSequence::sorted(): Implicitly marking parameter $comparator as nullable is deprecated, the explicit nullable type must be used instead in /vendor/php-ds/php-ds/src/Traits/GenericSequence.php on line 346

Deprecated: Ds\Sequence::filter(): Implicitly marking parameter $callback as nullable is deprecated, the explicit nullable type must be used instead in /vendor/php-ds/php-ds/src/Sequence.php on line 71

Deprecated: Ds\Sequence::join(): Implicitly marking parameter $glue as nullable is deprecated, the explicit nullable type must be used instead in /vendor/php-ds/php-ds/src/Sequence.php on line 124

Deprecated: Ds\Sequence::slice(): Implicitly marking parameter $length as nullable is deprecated, the explicit nullable type must be used instead in /vendor/php-ds/php-ds/src/Sequence.php on line 283

Deprecated: Ds\Sequence::sort(): Implicitly marking parameter $comparator as nullable is deprecated, the explicit nullable type must be used instead in /vendor/php-ds/php-ds/src/Sequence.php on line 293

Deprecated: Ds\Sequence::sorted(): Implicitly marking parameter $comparator as nullable is deprecated, the explicit nullable type must be used instead in /vendor/php-ds/php-ds/src/Sequence.php on line 307

Someone should really go through and actually fix all the occurrences of this deprecation notice.

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.

3 participants