Using the lastest Drupal 8 (-dev), when I install Drupal using a custom profile that contains some features, I have this error :
Missing proxy class 'Drupal\features\ProxyClass\FeaturesConfigInstaller' for lazy service 'config.installer'.
Use the following command to generate the proxy class:
php core/scripts/generate-proxy-class.php 'Drupal\features\FeaturesConfigInstaller' "modules/contrib/features/src"| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 2542640.proxy_class.1.patch | 4.13 KB | haza |
Comments
Comment #1
hazaHere is the patch that contains the file that was generated using the command.
Comment #2
RaisinBranCrunch commentedI hit this same issue with 8.x-3.0-alpha2. Had to use this fix to get around it.
Comment #3
RaisinBranCrunch commentedWow, how to undo comment changes? Damn it, Drupal.
Comment #4
mpotter commentedCan somebody point me to the documentation or examples for this patch's Proxy class? I'd commit your patch but I need to understand it more before I can.
Comment #5
hazaThe issue that introduced the change (manually generated classes) : #2408371: Proxies of module interfaces don't work
Comment #6
mpotter commentedAh, ok, thanks very much for that link, it's an interesting read. What made it a bit difficult was that the ProxyClass for ConfigInstaller is in the Drupal/Core/ProxyClass/Config area instead of within Drupal/Core/Config. Not sure I agree with that split of namespace, although I understand that it allows the proxy to find the original service more easily.
Looks like it's only an issue for Features because we subclass an existing lazy service. Interesting that it says: "Not disruptive for core/contributed and custom modules/themes because lazy services were not available for modules." I can't seem to find what actually flags ConfigInstaller as a Lazy service though.
Will be interesting to see how this evolves. I still can't really tell if the ProxyClass is *required* or just suggested for performance reasons. Did the auto-generation of proxies actually get removed? The message when installing Features about the missing ProxyClass is a "warning", so not really sure.
If this is optional then I can forsee a lot of support issues with users confused by the warning message. While it's helpful for devs to point to the generation script, it's not something we'd want end-users doing when enabling a module that decides not to use a ProxyClass.
I'm all for the performance boost and will certainly add this to Features, but I'm worried that the implications of this on contrib haven't been fully thought yet.
Comment #7
mpotter commentedCommitted to 4080fa0.