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

Remove zend-inputfilter dependency #123

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
},
"require-dev": {
"zendframework/zend-form": "^2.7",
"zendframework/zend-inputfilter": "^2.6",
"zendframework/zend-json": "^2.6.1 || ^3.0",
"zendframework/zend-psr7bridge": "^0.2",
"fabpot/php-cs-fixer": "1.7.*",
Expand All @@ -35,7 +34,6 @@
"zendframework/zend-config": "Zend\\Config component",
"zendframework/zend-di": "Zend\\Di component",
"zendframework/zend-http": "Zend\\Http component",
"zendframework/zend-inputfilter": "Zend\\Inputfilter component",
"zendframework/zend-json": "(^2.6.1 || ^3.0) To auto-deserialize JSON body content in AbstractRestfulController extensions, when json_decode is unavailable",
"zendframework/zend-modulemanager": "Zend\\ModuleManager component",
"zendframework/zend-mvc-console": "zend-mvc-console provides the ability to expose zend-mvc as a console application",
Expand Down
22 changes: 13 additions & 9 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions doc/book/migration/to-v3-0.md
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,26 @@ $ composer require zendframework/zend-hydrator
Note: the above assumes you have already installed zend-component-installer, per
the section above on [dependency reduction](#dependency-reduction).

## InputFilter integration

In version 2, zend-mvc exposed a `InputFilterManager` service by default, and
provided specifications to zend-modulemanager's `ServiceListener`
to allow modules to provide validator configuration.

This functionality is now removed from zend-mvc. It is now exposed directly by
the [zend-inputfilter](https://zendframework.github.io/zend-inputfilter/) component
itself. To add it, install zend-inputfilter:

```bash
$ composer require zendframework/zend-inputfilter
```

Note: the above assumes you have already installed zend-component-installer, per
the section above on [dependency reduction](#dependency-reduction).

zend-inputfilter now also exposes the `InputFilterAbstractServiceFactory` as an
abstract factory by default.

## i18n integration

Internationalization tooling, including:
Expand Down
17 changes: 0 additions & 17 deletions src/Service/InputFilterManagerFactory.php

This file was deleted.

6 changes: 0 additions & 6 deletions src/Service/ModuleManagerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,6 @@ public function __invoke(ContainerInterface $container, $name, array $options =
'Zend\ModuleManager\Feature\RouteProviderInterface',
'getRouteConfig'
);
$serviceListener->addServiceManager(
'InputFilterManager',
'input_filters',
'Zend\ModuleManager\Feature\InputFilterProviderInterface',
'getInputFilterConfig'
);

$events = $container->get('EventManager');
$defaultListeners->attach($events);
Expand Down
1 change: 0 additions & 1 deletion src/Service/ServiceListenerFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ class ServiceListenerFactory implements FactoryInterface
'HttpRouteNotFoundStrategy' => HttpRouteNotFoundStrategyFactory::class,
'HttpViewManager' => 'Zend\Mvc\Service\HttpViewManagerFactory',
'InjectTemplateListener' => 'Zend\Mvc\Service\InjectTemplateListenerFactory',
'InputFilterManager' => 'Zend\Mvc\Service\InputFilterManagerFactory',
'PaginatorPluginManager' => 'Zend\Mvc\Service\PaginatorPluginManagerFactory',
'Request' => 'Zend\Mvc\Service\RequestFactory',
'Response' => 'Zend\Mvc\Service\ResponseFactory',
Expand Down