- Issue created by @joachim
- ๐ฎ๐ณIndia prem suthar Ahemdabad- Gujrat , Jodhpur - Rajsthan
Prem Suthar โ made their first commit to this issueโs fork.
- Merge request !6723200~drupal-3422919/3422919-error-in-docs - Fix the doc comment by remove the... โ (Closed) created by prem suthar
- Status changed to Needs work
about 1 year ago 2:04pm 21 February 2024 - ๐ฌ๐งUnited Kingdom joachim
Thanks for the MR!
Could you just fix the one problem for this issue though, rather than expand the scope?
I am going to be filing an issue to fix the confusing use of 'component' to mean extensions, but it's going to involve method renaming too.
- Status changed to Needs review
about 1 year ago 2:37pm 21 February 2024 - Status changed to Needs work
about 1 year ago 3:59pm 21 February 2024 - ๐บ๐ธUnited States smustgrave
@Prem Suthar just FYI this was tagged for novice, meaning for new users to Drupal contribution, and based on your post history believe you could work on non novice issues please.
Believe the goal was just to update getComponentNames function.
- ๐ฌ๐งUnited Kingdom joachim
I think we could expand the scope to include the other error that @Prem Suthar spotted, which is that the structure of the @param array is incorrectly documented:
> Array of component lists indexed by type
However, the current MR is removing the '(optional)' part.
I've filed ๐ Fix incorrect use of word 'component' in locale module Active , which is a bigger task which covers both code and docs.
- ๐ฌ๐งUnited Kingdom joachim
Hmm on second thoughts,
> Array of component lists indexed by type
does sort of describe it -- it's an array of several lists, and the array is keyed by the type of the things in the list.
The other issue is going to rewrite that text anyway so let's just fix the incorrect 'update' here.
- ๐ธ๐ฌSingapore Lee Jun Long
Hi, I am looking into this issue queue as part of Drupalcon Singapore 2024 Contribution day, and hope I can contribute in one way or another.
I have made a fresh installation of a Drupal 11 site to check on this, and tried to search the codebase for the code block shown in the Problem/Motivation. I realised that the only location I can find comes from
core/modules/locale/src/LocaleConfigManager.php
. I checked that merge requestMR !6723
, and found that the MR includes changes to bothcore/modules/locale/src/LocaleConfigManager.php
andcore/modules/locale/locale.bulk.inc
. This confused me as I didn't understand the current state of the issue queue, and how I can contribute further. - ๐ฌ๐งUnited Kingdom joachim
It's core/modules/locale/src/LocaleConfigManager.php that needs fixing.
- ๐ฎ๐ณIndia adwivedi008
adwivedi008 โ changed the visibility of the branch 3422919-error-in-docs to hidden.
- ๐ฎ๐ณIndia adwivedi008
adwivedi008 โ changed the visibility of the branch 3422919-error-in-docs to active.
- ๐ฎ๐ณIndia adwivedi008
adwivedi008 โ changed the visibility of the branch 3422919-error-in-docs to hidden.
- ๐ฎ๐ณIndia adwivedi008
adwivedi008 โ changed the visibility of the branch 3422919-error-in-docs to hidden.
- ๐ฎ๐ณIndia adwivedi008
adwivedi008 โ changed the visibility of the branch 3422919-error-in-docs to active.
- ๐ฎ๐ณIndia adwivedi008
adwivedi008 โ changed the visibility of the branch 3422919-error-in-docs to hidden.
- ๐ฎ๐ณIndia adwivedi008
adwivedi008 โ changed the visibility of the branch 3422919-error-in-docs to active.
- ๐บ๐ธUnited States smustgrave
Issue summary for good practice should still be filled out.
Also the parameter is still optional.
- ๐ง๐ทBrazil brandonlira
Error in docs for getComponentNames()
Problem/Motivation
The docs say:
@param array $components (optional) Array of component lists indexed by type. If not present or it is an empty array, it will update all components.
The use of the word "update" is incorrect, as the method actually returns configuration names rather than updating anything.
Steps to reproduce
- Open
core/modules/locale/src/LocaleConfigManager.php
. - Locate the
getComponentNames()
method. - Check the docblock and see that it mentions โupdateโ when the method is only returning configuration names.
Proposed resolution
- Remove the word โupdateโ from the docblock.
- Clarify that if
$components
is empty or not provided, the method returns all configuration names. - Retain that the parameter is (optional).
Remaining tasks
- Update the docblock and push changes to the issue fork.
- Review and test the updated documentation.
- Await merge request approval.
User interface changes
None.
API changes
None; this is purely a documentation fix.
Data model changes
None.
Release notes snippet
Not applicable.
- Open
- ๐ง๐ทBrazil brandonlira
Hi everyone,
I've updated the issue summary in my comment (#22) with the correct documentation details for the getComponentNames() method. It seems I don't have permission to edit the main issue summary directly. Could someone with the necessary permissions please update the issue summary with my changes?
Thank you!
- ๐ง๐ทBrazil brandonlira
I have pushed my changes for Issue #3422919, which restore the "(optional)" note in the docblock of the getComponentNames() method. Please review my changes in MR and let me know if further adjustments are needed.
- First commit to issue fork.