zendframework / zend-log

Log component from Zend Framework
BSD 3-Clause "New" or "Revised" License
62 stars 51 forks source link

Ensure plugin manager config is honored in non-zend-mvc contexts #74

Closed weierophinney closed 7 years ago

weierophinney commented 7 years ago

Per https://discourse.zendframework.com/t/validatormanager-not-calling-custom-validator-factory/109/5?u=matthew the log_processors, log_writers, log_filters, and log_formatters config keys are not honored currently unless the application is within a zend-mvc context. This is due to the fact that Zend\Log\Module wires configuration for the Zend\ModuleManager\Listener\ServiceListener in order to push merged service configuration into the plugin during bootstrap; no similar logic is available when not in a zend-mvc context, however.

This patch fixes that situation by modifying each of the ProcessorPluginManagerFactory, WriterPluginManagerFactory, FilterPluginManagerFactory, and FormatterPluginManagerFactory to do the following:

weierophinney commented 7 years ago

CI failures are due to changes in zend-servicemanager plugin manager compatibility trait; new tests pass on all versions.