Problem/Motivation
hook_library_alter()
was previously deprecated, and was "removed" in #2392717: Remove hook_library_alter() from theme.api.php, but it was not actually removed. The actual invocation of the hook was left in and only the documentation was changed.
Proposed solution
Finish removing it.
API Changes
Deprecated hook_library_alter() will be removed (for real this time).
Notes
All the instances of hook_library_alter() has been removed in #2390707: Remove hook_library_alter() implementations
hook_library_alter() has been removed already from theme.api.php in #2392717: Remove hook_library_alter() from theme.api.php
There is already a change record addressing its deprecation.
Beta phase evaluation
Issue category | Task because it contains only removal of deprecated code. |
---|---|
Issue priority | Normal because it contains only removal of deprecated code. |
Prioritized changes | The main goal of this issue is removing code already deprecated for 8.0.0. |
Disruption | Non-disruptive for core/contributed and custom modules because the code has been already marked deprecated (and documentation of it already removed) so it shouldn't be used anywhere. |
Comment | File | Size | Author |
---|---|---|---|
#23 | interdiff.txt | 831 bytes | lauriii |
#23 | remove_deprecated-2472547-23.patch | 4.99 KB | lauriii |
#12 | interdiff.txt | 916 bytes | lauriii |
#12 | remove_deprecated-2472547-12.patch | 4.39 KB | lauriii |
#8 | interdiff.txt | 1.93 KB | lauriii |
Comments
Comment #1
lauriiiComment #3
lauriiiThere was still tests for alter.
Comment #4
lauriiiComment #5
lauriiiComment #6
Fabianx CreditAttribution: Fabianx for Acquia commentedRTBC, thanks Laurii!
Comment #7
dawehnerRight this was the runtime hook, let's drop it.
We can remove the module handler and theme manager from the class itself now.
Comment #8
lauriiiGood catch!
Comment #9
Fabianx CreditAttribution: Fabianx for Acquia commentedBack to RTBC, changes look good.
Comment #10
dawehnerCan we please cleanup the test to not longer create mock objects for the module handler / theme handler?
Comment #11
xjmAlso, since this is a normal task, let's add a beta evaluation and examine how the change fits during the Drupal 8 beta.
Comment #12
lauriiiComment #13
lauriiiComment #14
Fabianx CreditAttribution: Fabianx for Acquia commentedBack to RTBC ...
Comment #17
lauriiiSetting back to RTBC because testbot was a little drunk.
Comment #18
xjmReviewing this.
Comment #19
xjmSo this confused me at first, because the hook did not appear to be marked deprecated -- it just appeared to be undocumented. What actually happened is that #2392717: Remove hook_library_alter() from theme.api.php removed the documentation of the hook... but not the test coverage or the invocation. Oops! So this change is allowed during the beta.
I updated the summary to explain this. (Note that removing deprecated code is not unfrozen; that's only strings, markup, migrate, docs, etc.) I also updated the title of the change record: https://www.drupal.org/node/2391981/revisions/view/8368695/8371373
Now reviewing the patch itself. :)
Comment #20
xjmActually @dawehner has more feedback.
Comment #21
xjmComment #22
dawehnerWe can drop
as well in that test file.
Comment #23
lauriiiFixed the documentation :)
Comment #24
jibranSomewhat related #2472119: Extension installers allow extensions with duplicate names to be enabled.
Comment #25
Fabianx CreditAttribution: Fabianx for Acquia commentedTagging
Comment #26
xjmNot really a part of the criticals and performance sprint, so removing that tag. :)
Per #19, this is okay to go in since the hook was already deprecated for removal 8.0.0 and we just missed a bit of the patch previously. Committed and pushed to 8.0.x
Comment #28
Wim LeersThis should have fixed the performance regression that #2050269: hook_library_info_alter() is not called for themes caused! :)
Comment #29
Fabianx CreditAttribution: Fabianx for Acquia commentedWe need a quick follow-up issue to fix the comments:
nit - We forgot to remove this comment, which is no longer true.