Closed (duplicate)
Project:
Drupal core
Version:
8.2.x-dev
Component:
action.module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
3 Oct 2012 at 13:01 UTC
Updated:
5 Oct 2016 at 14:32 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
lars toomre commentedMarking this postponed until #1787900: Clean up cruft in the Action documentation is committed.
Comment #1.0
lars toomre commentedUpdated issue summary.
Comment #1.1
lars toomre commentedUpdated issue summary.
Comment #2
lars toomre commentedSetting this issue to active now, since there now is a report in #1816682-3: Make Action module pass Coder Review that aims to correct the coding style in the rest of the Action module.
Comment #2.0
lars toomre commentedUpdated issue summary.
Comment #3
baisongI was pointed to this issue in core mentoring hours.
I added as many type hints as I could following these guidelines, and corrected 1 punctuation error (missing period).
Patch attached.
Comment #4
mile23Reroll.
The only problematic docblock is in
EmailAction::_construct(). It's missing the parameter name for$mail_manager.I say this rather than change it so I can do the review later.
Comment #5
mile23Comment #6
mile23Caught the problems in #4, with a few others.
Comment #7
mile23Comment #8
deepakaryan1988Re-rolling the patch of @mile23 .
Comment #9
yogen.prasad commentedLooking fine
Comment #10
deepakaryan1988Comment #11
deepakaryan1988Comment #12
xjmThanks @yogen.prasad and @deepakaryan1988. Did you carefully review each function to ensure that the typehints were correct in all cases?
These patches should only add missing type hinting, not do any other cleanups. The scope creep of adding other changes do these patches makes them more difficult to review. Long reference as to why: http://webchick.net/please-stop-eating-baby-kittens
This is not the correct docblock format, but it doesn't belong in this patch anyway. :) See above.
Comment #13
deepakaryan1988Ahh @xjm Thanks for pointing out..
will keep in mind in future!
Comment #14
mile23I re-did the work rather than try to modify #8.
A couple of small out-of-scope items are still in there, because they modify the same file as in-scope issues.
There are instructions for reviewing this issue in the issue summary.
Comment #15
dawehnerDon't we know the action ID is a string (or maybe an integer?)
Comment #16
mile23I couldn't find it. The example feeds it to a DB function requiring mixed.
Comment #17
mile23Reroll of #14.
Still not sure about the type of $aid, because it's not documented anywhere.
Comment #18
naveenvalechaI suspect its integer
Comment #20
naveenvalechaComment #22
alvar0hurtad0here's the reroll of #17
Comment #23
alvar0hurtad0I think, my patch removes to much things, I'm reviewing it.
Comment #24
alvar0hurtad0Sorry for my previous patch this is the reroll of #17
Comment #26
mile23In IRC w/ @chx we discussed that
action.api.phpis a) wrong, and b) isn't needed because we already documenthook_ENTITY_TYPE_delete().If
action.api.phphad any action module specific information it would be worth salvaging but it doesn't.Let's revert the changes to
action.api.phpin this patch, and then have a follow-up about deleting the file in another issue.Comment #27
mile23The follow-up #2663830: Remove action.api.php
Comment #28
xjmAgain, please remove the out-of-scope changes. See: https://www.drupal.org/core/scope#merge
Comment #29
mile23Needed a reroll anyway. Removes out of scope changes.
Changing to 8.0.x because that's what we've done on the other similar child issues. The patch applies cleanly to 8.0.x and 8.1.x.
Comment #32
naveenvalechaThis has been fixed as part of #2721901: Fix Drupal.Commenting.FunctionComment.MissingParamName