Problem/Motivation
Seven's implementation of hook_library_info_alter() is missing $extension parameter. This could potentially cause name conflicts with non-core libraries, as library names are not unique.
Beta phase evaluation
| Issue category | Bug, Seven is not using hook_library_info_alter() consistently with the other implementations in core and it could cause hard to diagnose bugs later. |
|---|---|
| Issue priority | Normal because as of now nothing is broken. |
| Disruption | No disruption for anyone, just makes things more solid. |
Proposed resolution
Add the missing parameter and update the 'if' statements to check against it. That way we only target libraries coming from the intended source.
Remaining tasks
None.
User interface changes
None.
API changes
None.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | seven_library_info_alter-2490974-1.patch | 1.57 KB | jstoller |
Comments
Comment #1
jstollerComment #2
jstollerComment #3
aburrows commentedtesting patch now
Comment #4
jstollerComment #5
aburrows commentedAre we counting libraries as js/css as mentioned in d8 or like we did libraries in d7 sites/all/libraries etc
Comment #6
jstoller@aburrows: I'm not sure I understand the question. hook_library_info_alter() is specific to d8. Seven is using it to override a number libraries from core.libraries.yml and add its own CSS/js.
Comment #7
star-szrThis checks out, thanks @jstoller!
Comment #8
star-szrComment #9
alexpottCommitted c6415d4 and pushed to 8.0.x. Thanks!