backdrop / backdrop-issues

Issue tracker for Backdrop core.
144 stars 39 forks source link

[DX] User Role CRUD hook docs need to be updated (remove mention of database) #5942

Open klonos opened 1 year ago

klonos commented 1 year ago

This is a function docblock/documentation task. Not sure how we can get all of these instances, but I'll start by making a list of them as I come across them:

Edit: copied a more complete list from #6522 ...thanks @jenlampton 🙏🏼

We still have the following hooks, and their description text should be updated.

avpaderno commented 1 year ago

All the hook_user_role_* and hook_node_type_* hooks need to be checked, for example hook_user_role_update(), at least because it contains a sentence like The module should save its custom additions to the database.

avpaderno commented 1 year ago

As for fixing those sentences, would not removing the phrase containing database be sufficient?

Modules implementing this hook can act on the user role object before it is saved.

Save a user role.

This hook is invoked from node_type_save() after the node type is created.

On the first sentence I changed the verb from Present Perfect to Present, as I have never seen Present Perfect used in that way.

avpaderno commented 1 year ago

(PHP_CodeSniffer fails, but because phpcs cannot be found.)

avpaderno commented 4 months ago

I have synchronized the PR with latest branch updates.

klonos commented 4 months ago

Thanks @kiamlaluno 🙏🏼 (and sorry for missing this earlier)

... would not removing the phrase containing database be sufficient?

Yes, that seems sufficient to me 👍🏼 ...marking as RTBC and setting the mileston, and I'll let our @backdrop/core-committers make the final decision on whether that approach is appropriate or not.

klonos commented 4 months ago

I'm copying @jenlampton's list from #6522 (which I will close as a duplicate of this issue here, since this is older and already has a PR).

klonos commented 4 months ago

...I've copied the texts from the other issue to the issue summary in this issue here. I've changed the formatting, so that the text can fit in the available width of the comments in GitHUb (for easier readability and comparison without having to scroll vertically) - otherwise, the text remains unchanged.