Problem/Motivation

Docblocks in Views are pretty subpar, while good documentation is key, if not prerequisite for actual code cleanups, bugfixes and many other tasks.

Recognizing that many efforts in the past stalled, but also that Views currently doesn't see too many changes in code and that this finally needs to be done: let's get started! Of course, while making sure the scope is clear, not stretched, and the resulting patches are reviewable.

Steps to reproduce

Proposed resolution

  1. Start with fixing docblocks in Views filter plugins.
    - correct existing docblocks in regard to coding standards
    - add missing docblocks or {@inheritdoc}
    - add undocumented parameters and typehints
    - add undocumented return types
    - don't change any code

Remaining tasks

Split this into two patches one with just the @inheritdoc changes and the other with everything else.
Reroll patch
Review
Commit

User interface changes

API changes

Data model changes

Release notes snippet

Comments

Pancho created an issue. See original summary.

pancho’s picture

StatusFileSize
new40.04 KB

A first step, not yet ready for review. We should probably start with the generic base classes and interfaces in a separate issue.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Issue summary: View changes
Issue tags: -docblock +Coding standards, +Needs reroll

Skimming the patch, I think it will be easier to review if the @inheritdoc changes are moved to a separate issue.

Also, this needs a reroll and there are @param being added that need a comment.

immaculatexavier’s picture

Status: Needs work » Needs review
StatusFileSize
new39.44 KB

Rerolled Patch against 9.4.x

shashwat purav’s picture

Status: Needs review » Needs work
immaculatexavier’s picture

StatusFileSize
new43.94 KB
new9.67 KB

Rerolled Patch against #11 with diff - fixed custom commands

immaculatexavier’s picture

Status: Needs work » Needs review
shashwat purav’s picture

Status: Needs review » Needs work

Hi @immaculatexavier, there are still custom commands issues.

immaculatexavier’s picture

@Shashwat Purav

I am working on the same

immaculatexavier’s picture

StatusFileSize
new40.69 KB
new5.22 KB

Rerolled patch against #13 attaching interdiff

immaculatexavier’s picture

Status: Needs work » Needs review

Need review for #17

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

Status: Needs review » Needs work

Commit check failures
The last patch doesn't pass commit checks, could you make sure to run ./core/scripts/dev/commit-code-check.sh before uploading a patch to make sure there are no issues with code formatting. see https://www.drupal.org/docs/develop/development-tools/running-core-devel...

quietone’s picture

Status: Needs work » Closed (outdated)
Issue tags: -Needs reroll
Related issues: +#3207949: Fix Drupal.Commenting.FunctionComment.MissingParamType

@immaculatexavier, thanks for working on this patch.

Actually, my comment in #10 isn't quite right. Coding standards are fixed by sniff, not module. The work is being done in #2571965: [meta] Fix PHP coding standards in core, stage 1.

I have moved the @param changes to the growing patch in #3207949: Fix Drupal.Commenting.FunctionComment.MissingParamType.

I am closing this as outdated.