@mnapoli opened this issue on April 10th 2015

Following #7644 the plugin manager will be stored in the DI container, which means we will be able to inject it by simply type-hinting it:

class MyService {
    public function __construct(Manager $pluginManager) {
        // ...
    }
}

Manager alone is confusing (the name doesn't mean anything) and can lead to conflicts. This is already a problem (we end up e.g. aliasing the class name in a lot of places) but I think it's a good time to take the opportunity to rename it as the problem will only get more visible when using dependency injection.

It could be renamed to Piwik\Plugin\PluginManager for example.

Of course backward compatibility would be kept and Piwik\Plugin\Manager still exist as an alias to the new class

Thoughts?

@mattab commented on April 10th 2015

It could be renamed to Piwik\Plugin\PluginManager for example.

+1

@mnapoli commented on May 21st 2015

After thinking about it I think it's best to do that for 3.0 as there will be less risks of conflicts with the DI refactorings and we probably won't have the same level of BC to keep.

Powered by GitHub Issue Mirror