wp-cli / php-cli-tools

A collection of tools to help with PHP command line utilities
MIT License
676 stars 118 forks source link

Add annotations to remove deprecated warning message on php8.1 #152

Closed aerogus closed 2 years ago

aerogus commented 2 years ago

added some #[\ReturnTypeWillChange] to suppress message like these :

Deprecated: Return type of cli\arguments\Lexer::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in vendor/wp-cli/php-cli-tools/lib/cli/arguments/Lexer.php on line 36
PHP Deprecated:  Return type of cli\arguments\Lexer::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in vendor/wp-cli/php-cli-tools/lib/cli/arguments/Lexer.php on line 64