Problem/Motivation
#778346: system_sort_modules_by_info_name() is misnamed added a new functional method but that's not the Drupal 8 & 9 way - in this instance we could add the array callback method as a static to the ExtensionList class.
Also #778346: system_sort_modules_by_info_name() is misnamed didn't add a deprecation message to the docblock and the the docblock missed the point of the name change - which was to make it obvious that this method is generic.
Proposed resolution
Move the method to the ExtensionList class and use it from there. Remove system_sort_by_info_name()
if we manage to fix this before 9.3.x.
Remaining tasks
User interface changes
API changes
system_sort_by_info_name()
(9.3.x only) is removed.
system_sort_modules_by_info_name()
is deprecated in favour of \Drupal\Core\Extension\ExtensionList::sortByName()
Update https://www.drupal.org/node/3225624 on commit.
Data model changes
None
Release notes snippet
N/a
Comment | File | Size | Author |
---|---|---|---|
#10 | interdiff_7-10.txt | 1.95 KB | srilakshmier |
#10 | 3225779-10.patch | 8.48 KB | srilakshmier |
Comments
Comment #2
alexpottComment #3
alexpottComment #5
alexpottComment #6
daffie CreditAttribution: daffie commentedCan we add a return typehint to the method.
It should be 9.3.0 not 9.1.0.
Comment #7
ravi.shankar CreditAttribution: ravi.shankar at OpenSense Labs commentedMade changes as suggest in comment #6, please review.
Comment #8
daffie CreditAttribution: daffie commentedI have created a new CR for this issue. Please change the link to the new CR (https://www.drupal.org/node/3225999).
Comment #9
srilakshmier CreditAttribution: srilakshmier at Valuebound for Valuebound commentedComment #10
srilakshmier CreditAttribution: srilakshmier at Valuebound for Valuebound commentedUploaded the patch based on comment #8. Please review.
Comment #11
daffie CreditAttribution: daffie commentedThe old function is deprecated and has a deprecation message test.
This issue does the same as #778346: system_sort_modules_by_info_name() is misnamed, only the replacement method is different.
Therefor if this get committed, then the CR (https://www.drupal.org/node/3225624) needs to be unpublished.
For me it is RTBC.
Comment #12
catchCommitted 22a6932 and pushed to 9.3.x. Thanks!
Comment #14
catchUnpublished https://www.drupal.org/node/3225624