Skip to content
This repository was archived by the owner on Jan 29, 2020. It is now read-only.

Commit 40db0d5

Browse files
committed
Remove zend-log dependency
As of release 2.8.0, zend-log now exposes itself as a ZF component, allowing removal of the dependency from zend-mvc.
1 parent eb2288c commit 40db0d5

File tree

7 files changed

+30
-154
lines changed

7 files changed

+30
-154
lines changed

composer.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727
"zendframework/zend-form": "^2.7",
2828
"zendframework/zend-inputfilter": "^2.6",
2929
"zendframework/zend-json": "^2.6.1 || ^3.0",
30-
"zendframework/zend-log": "^2.7.1",
3130
"zendframework/zend-psr7bridge": "^0.2",
3231
"fabpot/php-cs-fixer": "1.7.*",
3332
"phpunit/phpunit": "^4.5"
@@ -38,7 +37,6 @@
3837
"zendframework/zend-http": "Zend\\Http component",
3938
"zendframework/zend-inputfilter": "Zend\\Inputfilter component",
4039
"zendframework/zend-json": "(^2.6.1 || ^3.0) To auto-deserialize JSON body content in AbstractRestfulController extensions, when json_decode is unavailable",
41-
"zendframework/zend-log": "Zend\\Log component",
4240
"zendframework/zend-modulemanager": "Zend\\ModuleManager component",
4341
"zendframework/zend-mvc-console": "zend-mvc-console provides the ability to expose zend-mvc as a console application",
4442
"zendframework/zend-mvc-i18n": "zend-mvc-i18n provides integration with zend-i18n, including a translation bridge and translatable route segments",

composer.lock

Lines changed: 2 additions & 104 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

doc/book/migration/to-v3-0.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,34 @@ factories have changed. In such situations, you have two options:
184184
- Instead of extending, consider using [delegator factories](https://zendframework.github.io/zend-servicemanager/delegators/),
185185
as these decorate the service factory, regardless of what factory is used.
186186

187+
## Log integration
188+
189+
In version 2, zend-mvc exposed `LogProcessorManager` and `LogWriterManager`
190+
services by default, and provided specifications to zend-modulemanager's
191+
`ServiceListener` to allow modules to provide configuration for each.
192+
193+
This functionality is now removed from zend-mvc. It is now exposed directly by
194+
the [zend-log](https://zendframework.github.io/zend-log/) component
195+
itself. To add it, install zend-log:
196+
197+
```bash
198+
$ composer require zendframework/zend-log
199+
```
200+
201+
Note: the above assumes you have already installed zend-component-installer, per
202+
the section above on [dependency reduction](#dependency-reduction).
203+
204+
zend-log now also exposes `LogFilterManager` and `LogFormatterManager`,
205+
corresponding to the following:
206+
207+
Service | Config Key | Provider Interface | Provider Method
208+
------- | ---------- | ------------------ | ---------------
209+
LogFilterManager | `log_filters` | `Zend\Log\Filter\LogFilterProviderInterface` | `getLogFilterConfig()`
210+
LogFormatterManager | `log_formatters` | `Zend\Log\Formatter\LogFormatterProviderInterface` | `getLogFormatterConfig()`
211+
212+
This additions allow you to provide additional plugins for every aspect zend-log
213+
exposes.
214+
187215
## Plugins
188216

189217
The following plugins have been removed from the main zend-mvc repository, and

src/Service/LogProcessorManagerFactory.php

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/Service/LogWriterManagerFactory.php

Lines changed: 0 additions & 17 deletions
This file was deleted.

src/Service/ModuleManagerFactory.php

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -85,18 +85,6 @@ public function __invoke(ContainerInterface $container, $name, array $options =
8585
'Zend\ModuleManager\Feature\InputFilterProviderInterface',
8686
'getInputFilterConfig'
8787
);
88-
$serviceListener->addServiceManager(
89-
'LogProcessorManager',
90-
'log_processors',
91-
'Zend\ModuleManager\Feature\LogProcessorProviderInterface',
92-
'getLogProcessorConfig'
93-
);
94-
$serviceListener->addServiceManager(
95-
'LogWriterManager',
96-
'log_writers',
97-
'Zend\ModuleManager\Feature\LogWriterProviderInterface',
98-
'getLogWriterConfig'
99-
);
10088

10189
$events = $container->get('EventManager');
10290
$defaultListeners->attach($events);

src/Service/ServiceListenerFactory.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,6 @@ class ServiceListenerFactory implements FactoryInterface
7878
'HttpViewManager' => 'Zend\Mvc\Service\HttpViewManagerFactory',
7979
'InjectTemplateListener' => 'Zend\Mvc\Service\InjectTemplateListenerFactory',
8080
'InputFilterManager' => 'Zend\Mvc\Service\InputFilterManagerFactory',
81-
'LogProcessorManager' => 'Zend\Mvc\Service\LogProcessorManagerFactory',
82-
'LogWriterManager' => 'Zend\Mvc\Service\LogWriterManagerFactory',
8381
'PaginatorPluginManager' => 'Zend\Mvc\Service\PaginatorPluginManagerFactory',
8482
'Request' => 'Zend\Mvc\Service\RequestFactory',
8583
'Response' => 'Zend\Mvc\Service\ResponseFactory',

0 commit comments

Comments
 (0)