This repository was archived by the owner on Jan 30, 2020. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +57
-18
lines changed Expand file tree Collapse file tree 3 files changed +57
-18
lines changed Original file line number Diff line number Diff line change 22
33All notable changes to this project will be documented in this file, in reverse chronological order by release.
44
5- ## 2.8.0 - TBD
5+ ## 2.7.4 - TBD
66
77### Added
88
99- Nothing.
1010
11- ### Deprecated
11+ ### Changes
1212
13- - Nothing.
14-
15- ### Removed
16-
17- - Nothing.
18-
19- ### Fixed
20-
21- - Nothing.
22-
23- ## 2.7.4 - TBD
24-
25- ### Added
26-
27- - Nothing.
13+ - [ #122 ] ( https://github.com/zendframework/zend-inputfilter/pull/122 ) maps the
14+ ` Zend\InputFilter\InputFilterPluginManager ` service to
15+ ` Zend\InputFilter\InputFilterPluginManagerFactory ` , and adds an alias from
16+ ` InputFitlerPluginManager ` to the fully qualified class name. This change
17+ allows you to request the service using either the original short name, or the
18+ fully qualified class name.
2819
2920### Deprecated
3021
Original file line number Diff line number Diff line change @@ -29,11 +29,14 @@ public function __invoke()
2929 public function getDependencyConfig ()
3030 {
3131 return [
32+ 'aliases ' => [
33+ 'InputFilterManager ' => InputFilterPluginManager::class,
34+ ],
3235 'abstract_factories ' => [
3336 InputFilterAbstractServiceFactory::class,
3437 ],
3538 'factories ' => [
36- ' InputFilterManager ' => InputFilterPluginManagerFactory::class,
39+ InputFilterPluginManager::class => InputFilterPluginManagerFactory::class,
3740 ],
3841 ];
3942 }
Original file line number Diff line number Diff line change 1+ <?php
2+ /**
3+ * @link http://github.com/zendframework/zend-inputfilter for the canonical source repository
4+ * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
5+ * @license http://framework.zend.com/license/new-bsd New BSD License
6+ */
7+
8+ namespace ZendTest \InputFilter ;
9+
10+ use Zend \InputFilter \ConfigProvider ;
11+ use Zend \InputFilter \InputFilterAbstractServiceFactory ;
12+ use Zend \InputFilter \InputFilterPluginManager ;
13+ use Zend \InputFilter \InputFilterPluginManagerFactory ;
14+
15+ final class ConfigProviderTest extends \PHPUnit_Framework_TestCase
16+ {
17+ public function testProvidesExpectedConfiguration ()
18+ {
19+ $ provider = new ConfigProvider ();
20+
21+ $ expected = [
22+ 'abstract_factories ' => [
23+ InputFilterAbstractServiceFactory::class,
24+ ],
25+ 'aliases ' => [
26+ 'InputFilterManager ' => InputFilterPluginManager::class,
27+ ],
28+ 'factories ' => [
29+ InputFilterPluginManager::class => InputFilterPluginManagerFactory::class,
30+ ],
31+ ];
32+
33+ $ this ->assertEquals ($ expected , $ provider ->getDependencyConfig ());
34+ }
35+
36+ public function testInvocationProvidesDependencyConfiguration ()
37+ {
38+ $ provider = new ConfigProvider ();
39+
40+ $ expected = [
41+ 'dependencies ' => $ provider ->getDependencyConfig (),
42+ ];
43+ $ this ->assertEquals ($ expected , $ provider ());
44+ }
45+ }
You can’t perform that action at this time.
0 commit comments