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

Commit 12549cb

Browse files
committed
Merge branch 'feature/remove-zend-validator' into develop
Close #118
2 parents b6a0541 + 9da358a commit 12549cb

File tree

7 files changed

+47
-44
lines changed

7 files changed

+47
-44
lines changed

Diff for: CHANGELOG.md

+4
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,10 @@ for full details on how to migrate your v2 application.
5959
functionality related to exposing and configuring the zend-filter
6060
`FilterPluginManager`. That functionality is now exposed directly by the
6161
zend-filter component.
62+
- [#118](https://github.com/zendframework/zend-mvc/pull/118) removes the
63+
functionality related to exposing and configuring the zend-validator
64+
`ValidatorPluginManager`. That functionality is now exposed directly by the
65+
zend-validator component.
6266

6367
### Fixed
6468

Diff for: composer.json

-2
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
"zendframework/zend-log": "^2.7.1",
3232
"zendframework/zend-psr7bridge": "^0.2",
3333
"zendframework/zend-serializer": "^2.6.1",
34-
"zendframework/zend-validator": "^2.6",
3534
"fabpot/php-cs-fixer": "1.7.*",
3635
"phpunit/phpunit": "^4.5"
3736
},
@@ -52,7 +51,6 @@
5251
"zendframework/zend-psr7bridge": "(^0.2) To consume PSR-7 middleware within the MVC workflow",
5352
"zendframework/zend-serializer": "Zend\\Serializer component",
5453
"zendframework/zend-servicemanager-di": "zend-servicemanager-di provides utilities for integrating zend-di and zend-servicemanager in your zend-mvc application",
55-
"zendframework/zend-validator": "Zend\\Validator component",
5654
"zendframework/zend-view": "Zend\\View component"
5755
},
5856
"extra": {

Diff for: composer.lock

+26-18
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Diff for: doc/book/migration/to-v3-0.md

+17
Original file line numberDiff line numberDiff line change
@@ -217,3 +217,20 @@ $ composer require zendframework/zend-mvc-plugin-prg
217217

218218
`Zend\Mvc\Controller\Plugin\PostRedirectGet` becomes
219219
`Zend\Mvc\Plugin\Prg\PostRedirectGet`. However, it is still mapped as `prg()`.
220+
221+
## Validator integration
222+
223+
In version 2, zend-mvc exposed a `ValidatorManager` service by default, and
224+
provided specifications to zend-modulemanager's `ServiceListener`
225+
to allow modules to provide validator configuration.
226+
227+
This functionality is now removed from zend-mvc. It is now exposed directly by
228+
the [zend-validator](https://zendframework.github.io/zend-validator/) component
229+
itself. To add it, install zend-validator:
230+
231+
```bash
232+
$ composer require zendframework/zend-validator
233+
```
234+
235+
Note: the above assumes you have already installed zend-component-installer, per
236+
the section above on [dependency reduction](#dependency-reduction).

Diff for: src/Service/ModuleManagerFactory.php

-6
Original file line numberDiff line numberDiff line change
@@ -67,12 +67,6 @@ public function __invoke(ContainerInterface $container, $name, array $options =
6767
'Zend\ModuleManager\Feature\ViewHelperProviderInterface',
6868
'getViewHelperConfig'
6969
);
70-
$serviceListener->addServiceManager(
71-
'ValidatorManager',
72-
'validators',
73-
'Zend\ModuleManager\Feature\ValidatorProviderInterface',
74-
'getValidatorConfig'
75-
);
7670
$serviceListener->addServiceManager(
7771
'FormElementManager',
7872
'form_elements',

Diff for: src/Service/ServiceListenerFactory.php

-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ class ServiceListenerFactory implements FactoryInterface
8585
'Request' => 'Zend\Mvc\Service\RequestFactory',
8686
'Response' => 'Zend\Mvc\Service\ResponseFactory',
8787
'SerializerAdapterManager' => 'Zend\Mvc\Service\SerializerAdapterPluginManagerFactory',
88-
'ValidatorManager' => 'Zend\Mvc\Service\ValidatorManagerFactory',
8988
'ViewHelperManager' => 'Zend\Mvc\Service\ViewHelperManagerFactory',
9089
View\Http\DefaultRenderingStrategy::class => HttpDefaultRenderingStrategyFactory::class,
9190
'ViewFeedStrategy' => 'Zend\Mvc\Service\ViewFeedStrategyFactory',

Diff for: src/Service/ValidatorManagerFactory.php

-17
This file was deleted.

0 commit comments

Comments
 (0)