Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Found few places that misplaced @return & @throws tags in /core/lib/Drupal
core/lib/Drupal/Component/
core/lib/Drupal/Core/Access/AccessManager.php
core/lib/Drupal/Core/Config/ConfigImporter.php
core/lib/Drupal/Core/Config/Schema/TypedConfigInterface.php
core/lib/Drupal/Core/DependencyInjection/ClassResolverInterface.php
core/lib/Drupal/Core/Entity/Enhancer/EntityRouteEnhancer.php
core/lib/Drupal/Core/Entity/EntityAutocompleteMatcher.php
core/lib/Drupal/Core/Entity/FieldableEntityInterface.php
core/lib/Drupal/Core/Entity/Query/QueryFactoryInterface.php
core/lib/Drupal/Core/Entity/Query/Sql/Query.php
core/lib/Drupal/Core/Entity/Query/Sql/Tables.php
core/lib/Drupal/Core/Entity/Query/Sql/TablesInterface.php
core/lib/Drupal/Core/Executable/ExecutableManagerInterface.php
core/lib/Drupal/Core/Extension/module.api.php
core/lib/Drupal/Core/Field/FieldItemInterface.php
core/lib/Drupal/Core/Menu/MenuTreeStorageInterface.php
core/lib/Drupal/Core/ParamConverter/EntityConverter.php
core/lib/Drupal/Core/ParamConverter/ParamConverterManagerInterface.php
core/lib/Drupal/Core/Plugin/ContextAwarePluginInterface.php
core/lib/Drupal/Core/Render/RendererInterface.php
core/lib/Drupal/Core/TypedData/DataDefinitionInterface.php
core/lib/Drupal/Core/TypedData/ListDataDefinitionInterface.php
core/lib/Drupal/Core/TypedData/TypedDataManagerInterface.php
core/lib/Drupal.php
Comment | File | Size | Author |
---|---|---|---|
#8 | 2599524-8-Fixing-order-of-documentation-sections.patch | 26.87 KB | blackra |
#5 | 2599524-1.patch | 2.84 KB | krknth |
Comments
Comment #2
krknth CreditAttribution: krknth as a volunteer and at Valuebound commentedComment #3
krknth CreditAttribution: krknth as a volunteer and at Valuebound commentedComment #4
jhodgdonNo patch yet, so just "active" not "needs work".
Comment #5
krknth CreditAttribution: krknth as a volunteer and at Valuebound commentedAdded patch
Needs review.
Comment #6
jhodgdonLooks fine, thanks!
Comment #7
blackra CreditAttribution: blackra as a volunteer commentedAwesome work, krknth.
xjm has asked for this issue to be combined with four other similar issues - it makes her job much easier :-)
A combined patch is attached.
Comment #8
blackra CreditAttribution: blackra as a volunteer commentedFixed a typo in the patch numbering.
Comment #9
rhett.prichard CreditAttribution: rhett.prichard as a volunteer commentedVerified patch [#2599524-8.patch] from [#2599524] by reapplying all the children's patches of this issues's parent. git diff showed no differences.
Comment #10
jhodgdonOh, that was my fault (partly). I suggested to krknth in IRC that the patches be "not too big and not too small" rather than all one big huge issue. So they were split up... maybe slightly smaller than they should have, but it was my suggestion.
Anyway, thanks for the combined patch. I actually prefer smaller patches for reviewing, but that's OK. :)
There are 3 problems with the docs in this patch, which are out of scope for this issue and should be addressed in a separate issue:
Typo:
specifies -> specified
exists => exist
Sigh. This @param and @return need to have docs added to them. Having @param and @return with only a type and no documentation is not OK.
Comment #11
krknth CreditAttribution: krknth as a volunteer and at Valuebound commented@jhodgdon : created separate issue
#2601282: Fixing docblocks for core/lib/Drupal/Core/Entity
Comment #12
xjmThanks @krknth!
Comment #14
xjmRegarding splitting up the patches, I agree for changes that actually involve different patterns of work or new work, e.g. for #2594909: Missing @return tags in function/method comments in the core/modules folder it would not make sense to try to write lots of missing
@return
docs in one patch since each one would be different. But for something like this where the changes are one or two of the same kinds of simple fixes (just moving lines around) throughout the whole file, it's preferable (and more fair in terms of issue credit) to have one 28K patch rather than five 5K patches or whatever. On the other hand, over a certain number of lines of code, the patch does become unreviewable. I remember reading some research about this but can't locate it. (See my related comment on #2572635-14: Fix 'Drupal.Commenting.DocComment.LongFullStop' coding standard). We have a long-outstanding todo to document such recommendations more clearly; an old draft is in https://docs.google.com/document/d/1zYDnu45djDBcU87sNgKk15C5XDBYzNHvahoq....Note that as far as we could tell when looking into this at BADCamp, there is not yet a coder rule to check for the order of these documentation sections, meaning there's not an existing child of #2571965: [meta] Fix PHP coding standards in core that would fix this as far as I can see. There might be a rule for blank lines between each @whichever grouping; that I didn't check for. A followup would be to patch coder to add rules for the things fixed here (canonical ordering of documentation sections and blank lines separating them).
In any case, committed and pushed to 8.0.x. Thanks everyone to getting this issue sorted out consistently!
Comment #15
blackra CreditAttribution: blackra as a volunteer commentedThe current coder module does not appear to check this and I could not find an existing issue on this subject so I have created #2605986: Missing check for ordering of comment tags.