Closed (duplicate)
Project:
Drupal core
Version:
9.2.x-dev
Component:
taxonomy.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
8 Oct 2012 at 23:41 UTC
Updated:
12 Apr 2021 at 05:45 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
lars toomre commentedHere is a small patch that adds missing type hinting to the hook examples in taxonomy.api.php file.
Comment #2
lars toomre commentedSetting to the right component.
Comment #3
seanrOne of them had the $ in the wrong spot. See attached.
Comment #5
seanrOuch, didn't realize how old this was - that file has completely changed now. Not sure if this is even relevant anymore.
Comment #6
lars toomre commentedIt would be great if you went through this module now and added the type hints as appropriate. This issue was effectively created and then postponed until after API freeze to bring the docblocks up to snuff from a type hint perspective. I will review any patch you put forward @seanr.
Comment #7
seanrOnly found three that needed it. This patch should cover it now.
Comment #8
Jalandhar commentedPatch no longer applies. It needs reroll.
Comment #9
jeroen commentedComment #10
jeroen commentedThere's no more taxonomy.api.php file. I'm assuming Drupal 8 merged nodes and taxonomy terms into entities. The reroll isn't possible.
I did add some type hinting and moved some parameters from their class-type to the interface they implement.
Tests seem to still work.
Comment #11
jeroen commentedComment #12
mile23Comment #13
mile23Unsurprisingly, needs a reroll. :-)
Comment #14
adci_contributor commentedTrying to reroll.
Comment #15
mile23phpcs tells me there are 'Missing parameter name' and 'Missing parameter type' errors in
/src/Controller/TermAutocompleteController.php,/src/Plugin/views/filter/TaxonomyIndexTid.phpand/taxonomy.moduleComment #16
mrjmd commentedI ran phpcs after applying the patch in #14 and found several more issues. Patch attached.
Comment #18
mrjmd commentedOops, another try.
Also resisting the urge to fix the numerous other phpcs violations in this module :).
Comment #20
mile23Comment #21
jibranThis needs re-roll after #1847596: Remove Taxonomy term reference field in favor of Entity reference
Comment #22
siva_epari commentedPatch rerolled.
Comment #24
willzyx commentedAdded missing type hinting in
TermStorageComment #25
mile23Still missing a bunch in
taxonomy.module. Which shows me that I have a bug in myphpcsreview one-liner above... add a--extensions="module/php"option.Comment #26
willzyx commentedComment #27
willzyx commentedComment #28
mile23Patch in #26 has out-of-scope function signature hinting. We only want docblock changes here, for @param and @returns.
Bumping to 8.1.x.
Comment #34
idebr commentedRerolled against 8.6.x.
#28 Removed changes to function arguments
Fixed the following sniffs in the Taxonomy module:
Comment #40
quietone commentedThis work is now being done by sniff. The work here is now in #3207949: Fix Drupal.Commenting.FunctionComment.MissingParamType so closing this as a duplicate. I've identified credit to add over there, let me know if I got it wrong.