Skip to content
This repository has been archived by the owner on Feb 6, 2020. It is now read-only.

Expected ConfigAbstractFactory configuration per service manager #212

Open
roelvanduijnhoven opened this issue Dec 15, 2017 · 1 comment

Comments

@roelvanduijnhoven
Copy link

roelvanduijnhoven commented Dec 15, 2017

I find the new Config Abstract Factory very handy. That saves a lot of typing. So thanks for that 👏.

One thing that keeps bothering me however is that there seems to be only a single configuration array that determinates how services in all service manager are to be instantiated. You can mix plain services, controllers and view helpers!

IMO that:

  • Introduces some possible problems if service names are identical.
  • Disallows one to properly split the configuration per service manager. When you have a lot of services it really helps to categorize them.

Another way of tackling this would be to add the config key directly as one of the components of the service manager config. But there are obviously other options.

return [
    'factories => [],
    \Zend\ServiceManager\AbstractFactory\ConfigAbstractFactory::class => []
];

I am curious what other people think; or how they tackle this problem?

@weierophinney
Copy link
Member

This repository has been closed and moved to laminas/laminas-servicemanager; a new issue has been opened at laminas/laminas-servicemanager#15.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants