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"
CommentFileSizeAuthor
#1 2542640.proxy_class.1.patch4.13 KBhaza

Comments

haza’s picture

Status: Active » Needs review
StatusFileSize
new4.13 KB

Here is the patch that contains the file that was generated using the command.

RaisinBranCrunch’s picture

Issue summary: View changes

I hit this same issue with 8.x-3.0-alpha2. Had to use this fix to get around it.

RaisinBranCrunch’s picture

Issue summary: View changes

Wow, how to undo comment changes? Damn it, Drupal.

mpotter’s picture

Can 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.

haza’s picture

The issue that introduced the change (manually generated classes) : #2408371: Proxies of module interfaces don't work

mpotter’s picture

Ah, 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.

mpotter’s picture

Status: Needs review » Fixed

Committed to 4080fa0.

  • mpotter committed 4080fa0 on 8.x-3.x authored by Haza
    Issue #2542640 by Haza: Missing proxy class 'Drupal\features\ProxyClass\...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.