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

Commit 28a5c99

Browse files
committed
Remove zend-inputfilter dependency
As of zend-inputfilter 2.7.0, the component exposes itself as a config-provider and ZF component, removing the requirement to do so within zend-mvc.
1 parent 6005197 commit 28a5c99

File tree

6 files changed

+33
-35
lines changed

6 files changed

+33
-35
lines changed

composer.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
},
2626
"require-dev": {
2727
"zendframework/zend-form": "^2.7",
28-
"zendframework/zend-inputfilter": "^2.6",
2928
"zendframework/zend-json": "^2.6.1 || ^3.0",
3029
"zendframework/zend-psr7bridge": "^0.2",
3130
"fabpot/php-cs-fixer": "1.7.*",
@@ -35,7 +34,6 @@
3534
"zendframework/zend-config": "Zend\\Config component",
3635
"zendframework/zend-di": "Zend\\Di component",
3736
"zendframework/zend-http": "Zend\\Http component",
38-
"zendframework/zend-inputfilter": "Zend\\Inputfilter component",
3937
"zendframework/zend-json": "(^2.6.1 || ^3.0) To auto-deserialize JSON body content in AbstractRestfulController extensions, when json_decode is unavailable",
4038
"zendframework/zend-modulemanager": "Zend\\ModuleManager component",
4139
"zendframework/zend-mvc-console": "zend-mvc-console provides the ability to expose zend-mvc as a console application",

composer.lock

Lines changed: 13 additions & 9 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: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,26 @@ $ composer require zendframework/zend-hydrator
149149
Note: the above assumes you have already installed zend-component-installer, per
150150
the section above on [dependency reduction](#dependency-reduction).
151151

152+
## InputFilter integration
153+
154+
In version 2, zend-mvc exposed a `InputFilterManager` service by default, and
155+
provided specifications to zend-modulemanager's `ServiceListener`
156+
to allow modules to provide validator configuration.
157+
158+
This functionality is now removed from zend-mvc. It is now exposed directly by
159+
the [zend-inputfilter](https://zendframework.github.io/zend-inputfilter/) component
160+
itself. To add it, install zend-inputfilter:
161+
162+
```bash
163+
$ composer require zendframework/zend-inputfilter
164+
```
165+
166+
Note: the above assumes you have already installed zend-component-installer, per
167+
the section above on [dependency reduction](#dependency-reduction).
168+
169+
zend-inputfilter now also exposes the `InputFilterAbstractServiceFactory` as an
170+
abstract factory by default.
171+
152172
## i18n integration
153173

154174
Internationalization tooling, including:

src/Service/InputFilterManagerFactory.php

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

src/Service/ModuleManagerFactory.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,12 +79,6 @@ public function __invoke(ContainerInterface $container, $name, array $options =
7979
'Zend\ModuleManager\Feature\RouteProviderInterface',
8080
'getRouteConfig'
8181
);
82-
$serviceListener->addServiceManager(
83-
'InputFilterManager',
84-
'input_filters',
85-
'Zend\ModuleManager\Feature\InputFilterProviderInterface',
86-
'getInputFilterConfig'
87-
);
8882

8983
$events = $container->get('EventManager');
9084
$defaultListeners->attach($events);

src/Service/ServiceListenerFactory.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@ class ServiceListenerFactory implements FactoryInterface
7777
'HttpRouteNotFoundStrategy' => HttpRouteNotFoundStrategyFactory::class,
7878
'HttpViewManager' => 'Zend\Mvc\Service\HttpViewManagerFactory',
7979
'InjectTemplateListener' => 'Zend\Mvc\Service\InjectTemplateListenerFactory',
80-
'InputFilterManager' => 'Zend\Mvc\Service\InputFilterManagerFactory',
8180
'PaginatorPluginManager' => 'Zend\Mvc\Service\PaginatorPluginManagerFactory',
8281
'Request' => 'Zend\Mvc\Service\RequestFactory',
8382
'Response' => 'Zend\Mvc\Service\ResponseFactory',

0 commit comments

Comments
 (0)