Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
This is a follow-up from #1784312: Stop doing so much pre-kernel bootstrapping - the ClassLoader test that checks that the namespaces of disabled modules don't get registered had to be changed there. This was because we need to register module namespaces before accessing any service in the container, but we end up doing this right in the kernel itself and using an out of date list of modules if a module has just been disabled. Subsequent requests do not result in the namespace getting registered, but we should really try to find a way to prevent it happening even once.
Comment | File | Size | Author |
---|---|---|---|
#11 | 1846376.patch | 3.28 KB | effulgentsia |
#4 | 1846376.patch | 3.28 KB | amateescu |
#1 | interdiff.txt | 2.97 KB | effulgentsia |
Comments
Comment #1
effulgentsia CreditAttribution: effulgentsia commentedThis can be applied on top of #1784312-76: Stop doing so much pre-kernel bootstrapping.
Comment #2
catchAbout to commit the other one, let's get this in quick.
Comment #3
catchComment #4
amateescu CreditAttribution: amateescu commentedLet's try to test it then.
Comment #5
amateescu CreditAttribution: amateescu commentedUgh.
Comment #7
amateescu CreditAttribution: amateescu commentedThat's an unrelated test failure, HEAD is broken atm: #1842726: Transliteration component must not contain drupal_alter().
Comment #8
c4rl CreditAttribution: c4rl commented#4: 1846376.patch queued for re-testing.
Comment #10
c4rl CreditAttribution: c4rl commented#4: 1846376.patch queued for re-testing.
Comment #11
effulgentsia CreditAttribution: effulgentsia commentedHEAD is working again, and #4 passed the retest, but isn't turning green for some reason, so here it is again.
Comment #12
Fabianx CreditAttribution: Fabianx commented#11 passed the BOT.
Comment #13
sunThanks, looks good to me.
Comment #14
catchCommitted/pushed to 8.x, thanks!
Comment #16
donquixote CreditAttribution: donquixote commentedDoes someone in here still remember this issue?
I am pretty sure this "fix" no longer works in current Drupal 8.
At least with the Composer ClassLoader, there is no way to "unregister" a namespace. Whatever is still happening there is bogus now...
http://drupalcode.org/project/drupal.git/blob/1f9a488b927e9548365bf4882e...
And here is what ClassLoader::add() actually does..
http://drupalcode.org/project/drupal.git/blob/1f9a488b927e9548365bf4882e...
This can only ever add to the registered namespaces, never remove any.
I am keeping this mechanic in the PSR-4 patch,
#2083547: PSR-4: Putting it all together
but I would prefer to remove it.
We can open a new issue for this, but I would like to get some feedback from the old days' participants first..
(and apologies if reopening is the wrong thing to do)
Comment #17
jhedstromSince modules can only be uninstalled now, are the concerns in #16 still applicable?
Comment #18
jeroenmarinusI have reviewed the comment of donquixote, but cannot find any traces of the code he references.
Just as jhedstrom mentions, it also doesn't seem to be relevant anymore. Closing this issue, if it somehow is not ok maybe it's better to open a new one.