Problem/Motivation
These coding standards are written for PHP4 not PHP8. Time to modernize.
Benefits
If we adopted this change, the Drupal Project would benefit by having significantly less boilerplate.
Three supporters required
- https://www.drupal.org/u/{userid} (yyyy-mm-dd they added support)
- https://www.drupal.org/u/{userid} (yyyy-mm-dd they added support)
- https://www.drupal.org/u/{userid} (yyyy-mm-dd they added support)
Proposed changes
Everything that has a type doesn't require documentation. If a reviewer can't understand what's it for then add some. Otherwise, just stop. This was the original intent behind behind #3376518: Allow omitting @var, @param and @return tags or their descriptions if the variable name and type is enough anyways but even that limited version took two years. Now that Drupal has fully embraced typing even beyond what PHP can provide with #3468236: Adopt phpstan phpdoc types as canonical reference of allowed types it's seriously time to stop doing this.
Provide all proposed changes to the Drupal Coding standards. Give a link to each section that will be changed, and show the current text and proposed text as in the following layout:
1. {link to the documentation heading that is to change}
Current text
Add current text in blockquotes
Proposed text
Add proposed text in blockquotes
2. Repeat the above for each page or sub-page that needs to be changed.
Remaining tasks
Create this issue in the Coding Standards queue, using the defined template- Add supporters
- Create a Change Record
- Review by the Coding Standards Committee
- Coding Standards Committee takes action as required
- Discussed by the Core Committer Committee, if it impacts Drupal Core
- Final review by Coding Standards Committee
- Documentation updates
- Edit all pages
- Publish change record
- Remove 'Needs documentation edits' tag
- If applicable, create follow-up issues for PHPCS rules/sniffs changes
For a full explanation of these steps see the Coding Standards project page
Comments