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

Fix PHP 8.1 deprecation errors, take two #3504

Closed
wants to merge 1 commit into from
Closed

Fix PHP 8.1 deprecation errors, take two #3504

wants to merge 1 commit into from

Conversation

jeffbyrnes
Copy link

Fixes a series of deprecation errors, originally meant to be fixed in
#3400.

Fixes #3497

PHP Deprecated:  Return type of PHP_CodeSniffer\Files\FileList::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2

Deprecated: Return type of PHP_CodeSniffer\Files\FileList::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2
PHP Deprecated:  Return type of PHP_CodeSniffer\Files\FileList::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2

Deprecated: Return type of PHP_CodeSniffer\Files\FileList::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2
PHP Deprecated:  Return type of PHP_CodeSniffer\Files\FileList::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2

Deprecated: Return type of PHP_CodeSniffer\Files\FileList::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2
PHP Deprecated:  Return type of PHP_CodeSniffer\Files\FileList::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2

Deprecated: Return type of PHP_CodeSniffer\Files\FileList::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2
PHP Deprecated:  Return type of PHP_CodeSniffer\Files\FileList::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2

Deprecated: Return type of PHP_CodeSniffer\Files\FileList::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2
PHP Deprecated:  Return type of PHP_CodeSniffer\Files\FileList::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2

Deprecated: Return type of PHP_CodeSniffer\Files\FileList::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2
PHP Deprecated:  Return type of PHP_CodeSniffer\Filters\Filter::getChildren() should either be compatible with RecursiveFilterIterator::getChildren(): ?RecursiveFilterIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Filters/Filter.php on line 2

Deprecated: Return type of PHP_CodeSniffer\Filters\Filter::getChildren() should either be compatible with RecursiveFilterIterator::getChildren(): ?RecursiveFilterIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Filters/Filter.php on line 2
PHP Deprecated:  Return type of PHP_CodeSniffer\Filters\Filter::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Filters/Filter.php on line 2

Deprecated: Return type of PHP_CodeSniffer\Filters\Filter::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Filters/Filter.php on line 2

@jeffbyrnes
Copy link
Author

@jrfnl this seems fix these for me locally.

Fixes a series of deprecation errors, originally meant to be fixed in

PHP Deprecated:  Return type of PHP_CodeSniffer\Files\FileList::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2

Deprecated: Return type of PHP_CodeSniffer\Files\FileList::current() should either be compatible with Iterator::current(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2
PHP Deprecated:  Return type of PHP_CodeSniffer\Files\FileList::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2

Deprecated: Return type of PHP_CodeSniffer\Files\FileList::next() should either be compatible with Iterator::next(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2
PHP Deprecated:  Return type of PHP_CodeSniffer\Files\FileList::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2

Deprecated: Return type of PHP_CodeSniffer\Files\FileList::key() should either be compatible with Iterator::key(): mixed, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2
PHP Deprecated:  Return type of PHP_CodeSniffer\Files\FileList::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2

Deprecated: Return type of PHP_CodeSniffer\Files\FileList::valid() should either be compatible with Iterator::valid(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2
PHP Deprecated:  Return type of PHP_CodeSniffer\Files\FileList::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2

Deprecated: Return type of PHP_CodeSniffer\Files\FileList::rewind() should either be compatible with Iterator::rewind(): void, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2
PHP Deprecated:  Return type of PHP_CodeSniffer\Files\FileList::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2

Deprecated: Return type of PHP_CodeSniffer\Files\FileList::count() should either be compatible with Countable::count(): int, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Files/FileList.php on line 2
PHP Deprecated:  Return type of PHP_CodeSniffer\Filters\Filter::getChildren() should either be compatible with RecursiveFilterIterator::getChildren(): ?RecursiveFilterIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Filters/Filter.php on line 2

Deprecated: Return type of PHP_CodeSniffer\Filters\Filter::getChildren() should either be compatible with RecursiveFilterIterator::getChildren(): ?RecursiveFilterIterator, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Filters/Filter.php on line 2
PHP Deprecated:  Return type of PHP_CodeSniffer\Filters\Filter::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Filters/Filter.php on line 2

Deprecated: Return type of PHP_CodeSniffer\Filters\Filter::accept() should either be compatible with FilterIterator::accept(): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in phar:///usr/local/Cellar/php-code-sniffer/3.6.2/bin/phpcs/src/Filters/Filter.php on line 2
@jrfnl
Copy link
Contributor

jrfnl commented Dec 16, 2021

@jeffbyrnes This is not the right fix. There is a use statement for the class mentioned in the attribute, so the fix in #3400 was correct.

It's the PHAR building where things go wrong. PR #3442 actually already largely addresses this. Making a minor tweak now as a final fix.

@jeffbyrnes
Copy link
Author

@jrfnl ok great! I’ll close this out.

@jeffbyrnes jeffbyrnes closed this Dec 16, 2021
@jeffbyrnes jeffbyrnes deleted the fix-php-8.1-deprecation-errors-for-returntypewillchange branch December 16, 2021 17:57
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 errors should go to stderr, too
2 participants