Right now it is protected and you need to completely override by PluginManagerBase::createInstance() and extend DefaultFactory::createInstance() to use it while expanding your plugin's constructor.

CommentFileSizeAuthor
#1 plugin-1889826-1.patch4 KBtim.plunkett
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

tim.plunkett’s picture

tim.plunkett’s picture

The other option would be to make it a non-static public method on DiscoveryInterface. That has the benefit of not being static, but I think it makes more sense on the factory.

msonnabaum’s picture

I think this is fine.

msonnabaum’s picture

Status: Needs review » Reviewed & tested by the community
tim.plunkett’s picture

Priority: Normal » Critical

This blocks a critical.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to 8.x. I don't mind it being static; static method calls are usually faster than virtual method calls.

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