Closed RalfEggert closed 8 years ago
If you go that road, i think you actually need to make that class. Otherwise you have to create a fake class and end up with something like 'Zend\Expressive\FinalHandler'
: https://github.com/zendframework/zend-expressive-skeleton/blob/master/src/ExpressiveInstaller/Resources/config/templates-plates.php#L6-L7
In stead of a fake class, I rather stick to config
since it's easy, short and is exactly what it says it is.
Please don't change the "config" key! Our factories rely on the "convention" that the application factory is available as service id "config" in the container. Ok, we could define an alias but "config" is available in ZF2 and therefor should be available in expressive too.
It was just an idea. Could only be solved with a class constant that uses config
as the value. But I understand that it is such an elementary change that it is hard to implement now. Maybe an idea for ZF4.
I will close this.
Currently, the container configuration is just placed under the fixed
config
key like here:https://github.com/zendframework/zend-expressive-skeleton/blob/master/src/ExpressiveInstaller/Resources/config/container-zend-servicemanager.php#L13
This key is hard coded. Wouldn't it be better if we could use a class name or a constant here? Something like
Zend\Expressive\Container\Config::class
or something similar.Or is that a bad idea?