You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 29, 2020. It is now read-only.
I intend to make a prototype for v3 that looks more like a ConfigAggregator hybrid with module manager benefits. I think it will improve the way module manager works with zend-mvc applications that also have console applications, and will make module manager more easily reusable in different contexts.
Change module to be either a class name or an object, drop namespace + Module resolution
Make modulemanager accept config providers as regular modules. That is, if no getConfig() is defined and is callable, then invoke to collect config.
Move glob config paths into a regular config provider as can be seen in Expressive skeleton
Rearrange events and listeners if necessary to let modules extend module manager behavior. For example, modules that are enabling most of Zend\ModuleManager\Feature\*ProviderInterface.
Likely load modules event will need to be split into init modules and load modules. Or most of load module listeners moved to load modules post
Rework module manager to let modules be loaded outside of zend-mvc application.
I might need to remove the concept of module name to allow config providers, module instances in a way that would not be annoying or error-prone.
It would be rather bad:
$moduleManager = newModuleManager([
// Include cache configuration'cache_config' => newArrayProvider($cacheConfig),
// Framework stuff
\Zend\Mvc\Module::class,
\Zend\Router\Module::class,
// Mvc module that is only providing config can be a regular config provider'Application' => Application\ConfigProvider::class,
'glob_config' => newPhpFileProvider('config/autoload/{{,*.}global,{,*.}local}.php'),
'dev_config' => newPhpFileProvider('config/development.config.php'),
], $cacheConfig['config_cache_path']);
Eg, if I forgot to specify keys for PhpFileProvider instances, what would be the module name? Module manager tracks stuff that is already loaded by module name. Result might be... interesting.
I intend to make a prototype for v3 that looks more like a ConfigAggregator hybrid with module manager benefits. I think it will improve the way module manager works with zend-mvc applications that also have console applications, and will make module manager more easily reusable in different contexts.
Module
resolutiongetConfig()
is defined and is callable, then invoke to collect config.Zend\ModuleManager\Feature\*ProviderInterface
.Likely
load modules
event will need to be split intoinit modules
andload modules
. Or most ofload module
listeners moved toload modules post
$config = $moduleManager->getMergedConfig()
roughly doing following:ModuleManagerEventListenersProviderInterface
, attach provided listenersZend\Mvc\Module
:OnBootstrapListener
feature and store them as mvc bootstrap listeners in extra uncacheable configMvcEvent::EVENT_BOOTSTRAP
eventExpected usage is much like with Expressive:
The text was updated successfully, but these errors were encountered: