Active
Project:
Drupal core
Version:
main
Component:
base system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
24 Jul 2015 at 20:33 UTC
Updated:
9 Dec 2023 at 06:10 UTC
Jump to comment: Most recent
From #2408371-90: Proxies of module interfaces don't work:
Reopening for a question: is it intentional that the
generate-proxy-classscript that was added here only works for modules that are enabled?I'd just been trying for 20 minutes to figure out what's wrong for a new module that was therefore not yet installed. Turns out this is what's wrong: I had not yet enabled the module… that I was trying to develop.
TBD
TBD
None.
None.
None.
Comments
Comment #1
fabianx commentedThat is likely not intentional, but probably a side effect related to the autoloading strategy used by Drupal for modules.
In any case we should give a good error message, when we can't find the module (and detect a potential module namespace).
Comment #2
dawehnerYes we need a working autoloading in order to generate the proxy. We need that as we use reflection for those classes/interface, see
+1
Comment #11
duneblI would add that the
generate-proxy-class.phpscript does not work in a multi site environment.It is trying to load the default DB and there is no way to set an alias to make it point to another site/db
..or maybe I missed something
Comment #12
avpadernoComment #16
catchMoving this to a task since it's purely a DX nicety and can't affect runtime code as such, but agreed a nice error message would be good here.
Comment #17
quietone commentedThis was a bugsmash daily target, adding tag.
Comment #19
quietone commented@Wim Leers, thanks for making this issue!
Yes, an error message would be helpful. Like @Wim Leers, I wasted too much trying to figure out why the script was no working while I was working on what I thought would be a simple issue, #3092424: ProxyBuilder generates incorrect @see reference.