WordPress / WordPress/WordPress-Coding-Standards
PHP 8.0 | PHP/NoSilencedErrors: review function list
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 2.8k
- Forks
- 521
- Avg merge
- 5d 20h
- Merged PRs (30d)
- 1
Description
PHP 8 changes the behaviour of the error silence operator @ : where previously it would silence all notices, warnings and errors, it will now only silence notices and warnings, but will not prevent fatal errors/catchable exceptions anymore.
PHP 8 also contains another relevant change, which is that the error level for a number of notices/warnings has been elevated to fatal error/catchable exception.
It would be very helpful if someone would review if any of the functions in the $function_whitelist are affected by these changes and need to be removed from the list.
Note: yes, the name of the property should also be changed, but there's a separate open ticket for that.
This was also discussed in the #core-php Slack channel: https://wordpress.slack.com/archives/C60K3MP2Q/p1611678080004700
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the PHP/NoSilencedErrors implementation and its $function_whitelist. Review each listed function against the PHP 8 error-silencing and error-level changes described in the issue, then update the list where needed and run the relevant project checks to confirm the sniff remains correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100