From f78b13d8f8777489feb5130a43c7a6f25c62a7ef Mon Sep 17 00:00:00 2001 From: Ievgen Sentiabov Date: Wed, 26 Apr 2017 13:46:51 +0300 Subject: [PATCH 1/3] MAGETWO-59661: [Github] PHP7 returns types incompatible with generate code #6106 - Updated Zend Code library to 3.x version and it dependencies - Refactored code generators to support PHP 7.x features - Refactored Setup module for new Zend Service Manager - Covered code generators by tests --- composer.json | 50 +- composer.lock | 1183 ++++++++++------- .../Integrity/_files/blacklist/reference.txt | 2 + .../Generator/_files/SampleEmptyExtension.txt | 2 +- .../Code/Generator/_files/SampleExtension.txt | 2 +- .../Code/Generator/ClassGenerator.php | 4 + .../Code/Generator/EntityAbstract.php | 14 +- .../Magento/Framework/Console/Cli.php | 7 +- .../Code/Generator/Interceptor.php | 1 + .../Unit/Code/Generator/InterceptorTest.php | 109 +- .../Code/Generator/_files/Interceptor.txt | 40 + .../Unit/Code/Generator/_files/Sample.php | 21 + .../Code/Generator/_files/TInterceptor.txt | 40 + .../Unit/Code/Generator/_files/TSample.php | 21 + .../Code/Generator/Repository.php | 113 +- .../Test/Unit/Code/Generator/FactoryTest.php | 58 +- .../Code/Generator/GenerateRepositoryTest.php | 97 +- .../Code/Generator/_files/SampleProxy.txt | 2 +- .../Generator/_files/SampleRepository.txt | 2 +- .../_files/SampleRepositoryInterface.php | 17 + .../Generator/_files/TSampleInterface.php | 11 + .../Generator/_files/TSampleRepository.txt | 191 +++ .../_files/TSampleRepositoryInterface.php | 16 + .../Framework/Reflection/TypeProcessor.php | 4 +- .../Webapi/ServiceInputProcessor.php | 3 + setup/config/application.config.php | 13 +- setup/config/di.config.php | 2 +- setup/index.php | 6 +- setup/src/Magento/Setup/Application.php | 79 ++ .../src/Magento/Setup/Console/CommandList.php | 2 +- setup/src/Magento/Setup/Module.php | 3 +- .../Setup/Mvc/Bootstrap/InitParamListener.php | 10 +- .../Test/Unit/Console/CommandListTest.php | 2 +- 33 files changed, 1468 insertions(+), 659 deletions(-) create mode 100644 lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/Interceptor.txt create mode 100644 lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/Sample.php create mode 100644 lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TInterceptor.txt create mode 100644 lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TSample.php create mode 100644 lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepositoryInterface.php create mode 100644 lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/TSampleInterface.php create mode 100644 lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/TSampleRepository.txt create mode 100644 lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/TSampleRepositoryInterface.php create mode 100644 setup/src/Magento/Setup/Application.php diff --git a/composer.json b/composer.json index 6045df86d760f..dc8cafb289a74 100644 --- a/composer.json +++ b/composer.json @@ -9,31 +9,31 @@ ], "require": { "php": "~5.6.5|7.0.2|7.0.4|~7.0.6", - "zendframework/zend-stdlib": "~2.4.6", - "zendframework/zend-code": "~2.4.6", - "zendframework/zend-server": "~2.4.6", - "zendframework/zend-soap": "~2.4.6", - "zendframework/zend-uri": "~2.4.6", - "zendframework/zend-validator": "~2.4.6", - "zendframework/zend-crypt": "~2.4.6", - "zendframework/zend-console": "~2.4.6", - "zendframework/zend-modulemanager": "~2.4.6", - "zendframework/zend-mvc": "~2.4.6", - "zendframework/zend-text": "~2.4.6", - "zendframework/zend-i18n": "~2.4.6", - "zendframework/zend-eventmanager": "~2.4.6", - "zendframework/zend-view": "~2.4.6", - "zendframework/zend-servicemanager": "~2.4.6", - "zendframework/zend-json": "~2.4.6", - "zendframework/zend-config": "~2.4.6", - "zendframework/zend-form": "~2.4.6", - "zendframework/zend-di": "~2.4.6", - "zendframework/zend-serializer": "~2.4.6", - "zendframework/zend-log": "~2.4.6", - "zendframework/zend-http": "~2.4.6", - "zendframework/zend-db": "~2.4.6", - "zendframework/zend-captcha": "~2.4.6", - "zendframework/zend-session": "~2.4.6", + "zendframework/zend-stdlib": "^2.7.7", + "zendframework/zend-code": "^3.1.0", + "zendframework/zend-server": "^2.6.1", + "zendframework/zend-soap": "^2.6.0", + "zendframework/zend-uri": "^2.5.1", + "zendframework/zend-validator": "^2.6.0", + "zendframework/zend-crypt": "^2.6.0", + "zendframework/zend-console": "^2.6.0", + "zendframework/zend-modulemanager": "^2.7", + "zendframework/zend-mvc": "~2.6.3", + "zendframework/zend-text": "^2.6.0", + "zendframework/zend-i18n": "^2.7.3", + "zendframework/zend-eventmanager": "^2.6.3", + "zendframework/zend-view": "^2.8.1", + "zendframework/zend-servicemanager": "^2.7.8", + "zendframework/zend-json": "^2.6.1", + "zendframework/zend-config": "^2.6.0", + "zendframework/zend-form": "^2.10.0", + "zendframework/zend-di": "^2.6.1", + "zendframework/zend-serializer": "^2.7.2", + "zendframework/zend-log": "^2.9.1", + "zendframework/zend-http": "^2.6.0", + "zendframework/zend-db": "^2.8.2", + "zendframework/zend-captcha": "^2.7.1", + "zendframework/zend-session": "^2.7.3", "magento/zendframework1": "~1.12.16", "colinmollenhour/credis": "1.6", "colinmollenhour/php-redis-session-abstract": "1.2", diff --git a/composer.lock b/composer.lock index f7521d5ae15c4..5dc9f7d9c03b8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,8 +4,8 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "ddf3054539b1f3cc87593dbd56131823", - "content-hash": "1e52568aafa11689028311fb3060e920", + "hash": "2347ae3c42dc5ac237e6d9f72c16e279", + "content-hash": "6a02ffd3ae83bf39140bb7952fafb84d", "packages": [ { "name": "braintree/braintree_php", @@ -401,6 +401,37 @@ ], "time": "2017-04-03 19:08:52" }, + { + "name": "container-interop/container-interop", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/container-interop/container-interop.git", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "shasum": "" + }, + "require": { + "psr/container": "^1.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "Interop\\Container\\": "src/Interop/Container/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", + "homepage": "https://github.com/container-interop/container-interop", + "time": "2017-02-14 19:40:03" + }, { "name": "justinrainbow/json-schema", "version": "1.6.1", @@ -1014,6 +1045,55 @@ ], "time": "2016-10-04 00:57:04" }, + { + "name": "psr/container", + "version": "1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-fig/container.git", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Container\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common Container Interface (PHP FIG PSR-11)", + "homepage": "https://github.com/php-fig/container", + "keywords": [ + "PSR-11", + "container", + "container-interface", + "container-interop", + "psr" + ], + "time": "2017-02-14 16:28:37" + }, { "name": "psr/log", "version": "1.0.2", @@ -1815,34 +1895,33 @@ }, { "name": "zendframework/zend-captcha", - "version": "2.4.11", + "version": "2.7.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-captcha.git", - "reference": "ba8ec60bbad38d233b0336293a332b2f8b53a134" + "reference": "2d56293a5ae3e45e7c8ee7030aa8b305768d8014" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-captcha/zipball/ba8ec60bbad38d233b0336293a332b2f8b53a134", - "reference": "ba8ec60bbad38d233b0336293a332b2f8b53a134", + "url": "https://api.github.com/repos/zendframework/zend-captcha/zipball/2d56293a5ae3e45e7c8ee7030aa8b305768d8014", + "reference": "2d56293a5ae3e45e7c8ee7030aa8b305768d8014", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-math": "~2.4.0", - "zendframework/zend-stdlib": "~2.4.0" + "php": "^5.6 || ^7.0", + "zendframework/zend-math": "^2.6 || ^3.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-session": "~2.4.0", - "zendframework/zend-text": "~2.4.0", - "zendframework/zend-validator": "~2.4.0", - "zendframework/zendservice-recaptcha": "*" + "phpunit/phpunit": "~4.8", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-session": "^2.6", + "zendframework/zend-text": "^2.6", + "zendframework/zend-validator": "^2.6", + "zendframework/zendservice-recaptcha": "^3.0" }, "suggest": { - "zendframework/zend-resources": "Translations of captcha messages", + "zendframework/zend-i18n-resources": "Translations of captcha messages", "zendframework/zend-session": "Zend\\Session component", "zendframework/zend-text": "Zend\\Text component", "zendframework/zend-validator": "Zend\\Validator component", @@ -1851,8 +1930,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" } }, "autoload": { @@ -1869,42 +1948,42 @@ "captcha", "zf2" ], - "time": "2015-11-23 15:35:19" + "time": "2017-02-23 08:09:44" }, { "name": "zendframework/zend-code", - "version": "2.4.11", + "version": "3.1.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-code.git", - "reference": "e3b32fa0fa358643aa6880b04944650981208c20" + "reference": "2899c17f83a7207f2d7f53ec2f421204d3beea27" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-code/zipball/e3b32fa0fa358643aa6880b04944650981208c20", - "reference": "e3b32fa0fa358643aa6880b04944650981208c20", + "url": "https://api.github.com/repos/zendframework/zend-code/zipball/2899c17f83a7207f2d7f53ec2f421204d3beea27", + "reference": "2899c17f83a7207f2d7f53ec2f421204d3beea27", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-eventmanager": "self.version" + "php": "^5.6 || 7.0.0 - 7.0.4 || ^7.0.6", + "zendframework/zend-eventmanager": "^2.6 || ^3.0" }, "require-dev": { - "doctrine/common": ">=2.1", - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-stdlib": "self.version" + "doctrine/annotations": "~1.0", + "ext-phar": "*", + "phpunit/phpunit": "^4.8.21", + "squizlabs/php_codesniffer": "^2.5", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "suggest": { - "doctrine/common": "Doctrine\\Common >=2.1 for annotation features", + "doctrine/annotations": "Doctrine\\Common\\Annotations >=1.0 for annotation features", "zendframework/zend-stdlib": "Zend\\Stdlib component" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "3.1-dev", + "dev-develop": "3.2-dev" } }, "autoload": { @@ -1922,34 +2001,33 @@ "code", "zf2" ], - "time": "2015-05-11 16:17:05" + "time": "2016-10-24 13:23:32" }, { "name": "zendframework/zend-config", - "version": "2.4.11", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-config.git", - "reference": "6b879e54096b8e0d2290f7414c38f9a5947cb8ac" + "reference": "2920e877a9f6dca9fa8f6bd3b1ffc2e19bb1e30d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-config/zipball/6b879e54096b8e0d2290f7414c38f9a5947cb8ac", - "reference": "6b879e54096b8e0d2290f7414c38f9a5947cb8ac", + "url": "https://api.github.com/repos/zendframework/zend-config/zipball/2920e877a9f6dca9fa8f6bd3b1ffc2e19bb1e30d", + "reference": "2920e877a9f6dca9fa8f6bd3b1ffc2e19bb1e30d", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" + "php": "^5.5 || ^7.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-filter": "self.version", - "zendframework/zend-i18n": "self.version", - "zendframework/zend-json": "self.version", - "zendframework/zend-servicemanager": "self.version" + "zendframework/zend-filter": "^2.6", + "zendframework/zend-i18n": "^2.5", + "zendframework/zend-json": "^2.6.1", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3" }, "suggest": { "zendframework/zend-filter": "Zend\\Filter component", @@ -1960,8 +2038,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.6-dev", + "dev-develop": "2.7-dev" } }, "autoload": { @@ -1979,30 +2057,32 @@ "config", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-02-04 23:01:10" }, { "name": "zendframework/zend-console", - "version": "2.4.11", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-console.git", - "reference": "92f9c51bdc42332e63914eec892364594a9b68c8" + "reference": "cbbdfdfa0564aa20d1c6c6ef3daeafe6aec02360" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-console/zipball/92f9c51bdc42332e63914eec892364594a9b68c8", - "reference": "92f9c51bdc42332e63914eec892364594a9b68c8", + "url": "https://api.github.com/repos/zendframework/zend-console/zipball/cbbdfdfa0564aa20d1c6c6ef3daeafe6aec02360", + "reference": "cbbdfdfa0564aa20d1c6c6ef3daeafe6aec02360", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" + "php": "^5.5 || ^7.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "^4.0", + "zendframework/zend-filter": "^2.6", + "zendframework/zend-json": "^2.6", + "zendframework/zend-validator": "^2.5" }, "suggest": { "zendframework/zend-filter": "To support DefaultRouteMatcher usage", @@ -2011,8 +2091,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.6-dev", + "dev-develop": "2.7-dev" } }, "autoload": { @@ -2029,33 +2109,31 @@ "console", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-02-09 17:15:12" }, { "name": "zendframework/zend-crypt", - "version": "2.4.11", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-crypt.git", - "reference": "165ec063868884eb952f6bca258f464f7103b79f" + "reference": "1b2f5600bf6262904167116fa67b58ab1457036d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-crypt/zipball/165ec063868884eb952f6bca258f464f7103b79f", - "reference": "165ec063868884eb952f6bca258f464f7103b79f", + "url": "https://api.github.com/repos/zendframework/zend-crypt/zipball/1b2f5600bf6262904167116fa67b58ab1457036d", + "reference": "1b2f5600bf6262904167116fa67b58ab1457036d", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-math": "~2.4.0", - "zendframework/zend-servicemanager": "~2.4.0", - "zendframework/zend-stdlib": "~2.4.0" + "container-interop/container-interop": "~1.0", + "php": "^5.5 || ^7.0", + "zendframework/zend-math": "^2.6", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-config": "~2.4.0" + "phpunit/phpunit": "~4.0" }, "suggest": { "ext-mcrypt": "Required for most features of Zend\\Crypt" @@ -2063,8 +2141,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.6-dev", + "dev-develop": "2.7-dev" } }, "autoload": { @@ -2081,43 +2159,47 @@ "crypt", "zf2" ], - "time": "2015-11-23 16:33:27" + "time": "2016-02-03 23:46:30" }, { "name": "zendframework/zend-db", - "version": "2.4.11", + "version": "2.8.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-db.git", - "reference": "b78b12c68bdafffaecb87f684426ad446b95204f" + "reference": "5926a1a2e7e035546b690cb7d4c11a3c47db2c98" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-db/zipball/b78b12c68bdafffaecb87f684426ad446b95204f", - "reference": "b78b12c68bdafffaecb87f684426ad446b95204f", + "url": "https://api.github.com/repos/zendframework/zend-db/zipball/5926a1a2e7e035546b690cb7d4c11a3c47db2c98", + "reference": "5926a1a2e7e035546b690cb7d4c11a3c47db2c98", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" + "php": "^5.5 || ^7.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-eventmanager": "self.version", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-stdlib": "self.version" + "zendframework/zend-eventmanager": "^2.6.2 || ^3.0", + "zendframework/zend-hydrator": "^1.1 || ^2.1", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3" }, "suggest": { "zendframework/zend-eventmanager": "Zend\\EventManager component", + "zendframework/zend-hydrator": "Zend\\Hydrator component for using HydratingResultSets", "zendframework/zend-servicemanager": "Zend\\ServiceManager component" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.8-dev", + "dev-develop": "2.9-dev" + }, + "zf": { + "component": "Zend\\Db", + "config-provider": "Zend\\Db\\ConfigProvider" } }, "autoload": { @@ -2134,41 +2216,37 @@ "db", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-08-09 19:28:55" }, { "name": "zendframework/zend-di", - "version": "2.4.11", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-di.git", - "reference": "fb578aa1e1ce9fb2dccec920f113e7db4ad44297" + "reference": "1fd1ba85660b5a2718741b38639dc7c4c3194b37" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-di/zipball/fb578aa1e1ce9fb2dccec920f113e7db4ad44297", - "reference": "fb578aa1e1ce9fb2dccec920f113e7db4ad44297", + "url": "https://api.github.com/repos/zendframework/zend-di/zipball/1fd1ba85660b5a2718741b38639dc7c4c3194b37", + "reference": "1fd1ba85660b5a2718741b38639dc7c4c3194b37", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-code": "self.version", - "zendframework/zend-stdlib": "self.version" + "container-interop/container-interop": "^1.1", + "php": "^5.5 || ^7.0", + "zendframework/zend-code": "^2.6 || ^3.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-servicemanager": "self.version" - }, - "suggest": { - "zendframework/zend-servicemanager": "Zend\\ServiceManager component" + "phpunit/phpunit": "~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.6-dev", + "dev-develop": "2.7-dev" } }, "autoload": { @@ -2185,35 +2263,34 @@ "di", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-04-25 20:58:11" }, { "name": "zendframework/zend-escaper", - "version": "2.4.11", + "version": "2.5.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-escaper.git", - "reference": "13f468ff824f3c83018b90aff892a1b3201383a9" + "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/13f468ff824f3c83018b90aff892a1b3201383a9", - "reference": "13f468ff824f3c83018b90aff892a1b3201383a9", + "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/2dcd14b61a72d8b8e27d579c6344e12c26141d4e", + "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e", "shasum": "" }, "require": { - "php": ">=5.3.23" + "php": ">=5.5" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" } }, "autoload": { @@ -2230,36 +2307,37 @@ "escaper", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-06-30 19:48:38" }, { "name": "zendframework/zend-eventmanager", - "version": "2.4.11", + "version": "2.6.3", "source": { "type": "git", "url": "https://github.com/zendframework/zend-eventmanager.git", - "reference": "c2c46a7a2809b74ceb66fd79f66d43f97e1747b4" + "reference": "3d41b6129fb4916d483671cea9f77e4f90ae85d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/c2c46a7a2809b74ceb66fd79f66d43f97e1747b4", - "reference": "c2c46a7a2809b74ceb66fd79f66d43f97e1747b4", + "url": "https://api.github.com/repos/zendframework/zend-eventmanager/zipball/3d41b6129fb4916d483671cea9f77e4f90ae85d3", + "reference": "3d41b6129fb4916d483671cea9f77e4f90ae85d3", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" + "php": "^5.5 || ^7.0", + "zendframework/zend-stdlib": "^2.7" }, "require-dev": { + "athletic/athletic": "dev-master", "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-release-2.6": "2.6-dev", + "dev-master": "3.0-dev", + "dev-develop": "3.1-dev" } }, "autoload": { @@ -2271,50 +2349,54 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-event-manager", + "homepage": "https://github.com/zendframework/zend-eventmanager", "keywords": [ "eventmanager", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-02-18 20:49:05" }, { "name": "zendframework/zend-filter", - "version": "2.4.11", + "version": "2.7.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-filter.git", - "reference": "a3711101850078b2aa69586c71897acaada2e9cb" + "reference": "84c50246428efb0a1e52868e162dab3e149d5b80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-filter/zipball/a3711101850078b2aa69586c71897acaada2e9cb", - "reference": "a3711101850078b2aa69586c71897acaada2e9cb", + "url": "https://api.github.com/repos/zendframework/zend-filter/zipball/84c50246428efb0a1e52868e162dab3e149d5b80", + "reference": "84c50246428efb0a1e52868e162dab3e149d5b80", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" + "php": "^5.5 || ^7.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", + "pear/archive_tar": "^1.4", "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-crypt": "self.version", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-uri": "self.version" + "zendframework/zend-crypt": "^2.6", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-uri": "^2.5" }, "suggest": { - "zendframework/zend-crypt": "Zend\\Crypt component", - "zendframework/zend-i18n": "Zend\\I18n component", - "zendframework/zend-servicemanager": "Zend\\ServiceManager component", - "zendframework/zend-uri": "Zend\\Uri component for UriNormalize filter" + "zendframework/zend-crypt": "Zend\\Crypt component, for encryption filters", + "zendframework/zend-i18n": "Zend\\I18n component for filters depending on i18n functionality", + "zendframework/zend-servicemanager": "Zend\\ServiceManager component, for using the filter chain functionality", + "zendframework/zend-uri": "Zend\\Uri component, for the UriNormalize filter" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" + }, + "zf": { + "component": "Zend\\Filter", + "config-provider": "Zend\\Filter\\ConfigProvider" } }, "autoload": { @@ -2332,67 +2414,73 @@ "filter", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-04-18 18:32:43" }, { "name": "zendframework/zend-form", - "version": "2.4.11", + "version": "2.10.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-form.git", - "reference": "779ba5da3dc040c52e632ea340462af2306c7682" + "reference": "ca2b2f9e1bdc5511d06967d755cbb793708a2d7b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-form/zipball/779ba5da3dc040c52e632ea340462af2306c7682", - "reference": "779ba5da3dc040c52e632ea340462af2306c7682", + "url": "https://api.github.com/repos/zendframework/zend-form/zipball/ca2b2f9e1bdc5511d06967d755cbb793708a2d7b", + "reference": "ca2b2f9e1bdc5511d06967d755cbb793708a2d7b", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-inputfilter": "~2.4.0", - "zendframework/zend-stdlib": "~2.4.0" + "php": "^5.5 || ^7.0", + "zendframework/zend-hydrator": "^1.1 || ^2.1", + "zendframework/zend-inputfilter": "^2.6", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "ircmaxell/random-lib": "^1.1", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-cache": "~2.4.0", - "zendframework/zend-captcha": "~2.4.0", - "zendframework/zend-code": "~2.4.0", - "zendframework/zend-eventmanager": "~2.4.0", - "zendframework/zend-filter": "~2.4.0", - "zendframework/zend-i18n": "~2.4.0", - "zendframework/zend-servicemanager": "~2.4.0", - "zendframework/zend-session": "~2.4.0", - "zendframework/zend-text": "~2.4.0", - "zendframework/zend-validator": "~2.4.0", - "zendframework/zend-view": "~2.4.0", - "zendframework/zendservice-recaptcha": "~2.0" + "doctrine/annotations": "~1.0", + "phpunit/phpunit": "^4.8", + "zendframework/zend-cache": "^2.6.1", + "zendframework/zend-captcha": "^2.7.1", + "zendframework/zend-code": "^2.6 || ^3.0", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-escaper": "^2.5", + "zendframework/zend-eventmanager": "^2.6.2 || ^3.0", + "zendframework/zend-filter": "^2.6", + "zendframework/zend-i18n": "^2.6", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-session": "^2.6.2", + "zendframework/zend-text": "^2.6", + "zendframework/zend-validator": "^2.6", + "zendframework/zend-view": "^2.6.2", + "zendframework/zendservice-recaptcha": "^3.0.0" }, "suggest": { - "zendframework/zend-captcha": "Zend\\Captcha component", - "zendframework/zend-code": "Zend\\Code component", - "zendframework/zend-eventmanager": "Zend\\EventManager component", - "zendframework/zend-filter": "Zend\\Filter component", - "zendframework/zend-i18n": "Zend\\I18n component", - "zendframework/zend-servicemanager": "Zend\\ServiceManager component", - "zendframework/zend-validator": "Zend\\Validator component", - "zendframework/zend-view": "Zend\\View component", - "zendframework/zendservice-recaptcha": "ZendService\\ReCaptcha component" + "zendframework/zend-captcha": "^2.7.1, required for using CAPTCHA form elements", + "zendframework/zend-code": "^2.6 || ^3.0, required to use zend-form annotations support", + "zendframework/zend-eventmanager": "^2.6.2 || ^3.0, reuired for zend-form annotations support", + "zendframework/zend-i18n": "^2.6, required when using zend-form view helpers", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3, required to use the form factories or provide services", + "zendframework/zend-view": "^2.6.2, required for using the zend-form view helpers", + "zendframework/zendservice-recaptcha": "in order to use the ReCaptcha form element" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.10-dev", + "dev-develop": "2.11-dev" + }, + "zf": { + "component": "Zend\\Form", + "config-provider": "Zend\\Form\\ConfigProvider" } }, "autoload": { "psr-4": { "Zend\\Form\\": "src/" - } + }, + "files": [ + "autoload/formElementManagerPolyfill.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2403,40 +2491,39 @@ "form", "zf2" ], - "time": "2015-09-09 19:11:05" + "time": "2017-02-23 16:03:25" }, { "name": "zendframework/zend-http", - "version": "2.4.11", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-http.git", - "reference": "0456267c3825f3c4b558460e0bffeb4c496e6fb8" + "reference": "09f4d279f46d86be63171ff62ee0f79eca878678" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-http/zipball/0456267c3825f3c4b558460e0bffeb4c496e6fb8", - "reference": "0456267c3825f3c4b558460e0bffeb4c496e6fb8", + "url": "https://api.github.com/repos/zendframework/zend-http/zipball/09f4d279f46d86be63171ff62ee0f79eca878678", + "reference": "09f4d279f46d86be63171ff62ee0f79eca878678", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-loader": "~2.4.0", - "zendframework/zend-stdlib": "~2.4.0", - "zendframework/zend-uri": "~2.4.0", - "zendframework/zend-validator": "~2.4.0" + "php": "^5.5 || ^7.0", + "zendframework/zend-loader": "^2.5", + "zendframework/zend-stdlib": "^2.5 || ^3.0", + "zendframework/zend-uri": "^2.5", + "zendframework/zend-validator": "^2.5" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-config": "~2.4.0" + "phpunit/phpunit": "^4.0", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-config": "^2.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.6-dev", + "dev-develop": "2.7-dev" } }, "autoload": { @@ -2454,37 +2541,94 @@ "http", "zf2" ], - "time": "2015-09-14 16:11:20" + "time": "2017-01-31 14:41:02" + }, + { + "name": "zendframework/zend-hydrator", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-hydrator.git", + "reference": "22652e1661a5a10b3f564cf7824a2206cf5a4a65" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-hydrator/zipball/22652e1661a5a10b3f564cf7824a2206cf5a4a65", + "reference": "22652e1661a5a10b3f564cf7824a2206cf5a4a65", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "^2.0@dev", + "zendframework/zend-eventmanager": "^2.6.2 || ^3.0", + "zendframework/zend-filter": "^2.6", + "zendframework/zend-inputfilter": "^2.6", + "zendframework/zend-serializer": "^2.6.1", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3" + }, + "suggest": { + "zendframework/zend-eventmanager": "^2.6.2 || ^3.0, to support aggregate hydrator usage", + "zendframework/zend-filter": "^2.6, to support naming strategy hydrator usage", + "zendframework/zend-serializer": "^2.6.1, to use the SerializableStrategy", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3, to support hydrator plugin manager usage" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-release-1.0": "1.0-dev", + "dev-release-1.1": "1.1-dev", + "dev-master": "2.0-dev", + "dev-develop": "2.1-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Hydrator\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-hydrator", + "keywords": [ + "hydrator", + "zf2" + ], + "time": "2016-02-18 22:38:26" }, { "name": "zendframework/zend-i18n", - "version": "2.4.11", + "version": "2.7.3", "source": { "type": "git", "url": "https://github.com/zendframework/zend-i18n.git", - "reference": "f26d6ae4be3f1ac98fbb3708aafae908c38f46c8" + "reference": "b2db0d8246a865c659f93199f90f5fc2cd2f3cd8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-i18n/zipball/f26d6ae4be3f1ac98fbb3708aafae908c38f46c8", - "reference": "f26d6ae4be3f1ac98fbb3708aafae908c38f46c8", + "url": "https://api.github.com/repos/zendframework/zend-i18n/zipball/b2db0d8246a865c659f93199f90f5fc2cd2f3cd8", + "reference": "b2db0d8246a865c659f93199f90f5fc2cd2f3cd8", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" + "php": "^5.5 || ^7.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-cache": "self.version", - "zendframework/zend-config": "self.version", - "zendframework/zend-eventmanager": "self.version", - "zendframework/zend-filter": "self.version", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-validator": "self.version", - "zendframework/zend-view": "self.version" + "zendframework/zend-cache": "^2.6.1", + "zendframework/zend-config": "^2.6", + "zendframework/zend-eventmanager": "^2.6.2 || ^3.0", + "zendframework/zend-filter": "^2.6.1", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-validator": "^2.6", + "zendframework/zend-view": "^2.6.3" }, "suggest": { "ext-intl": "Required for most features of Zend\\I18n; included in default builds of PHP", @@ -2492,7 +2636,7 @@ "zendframework/zend-config": "Zend\\Config component", "zendframework/zend-eventmanager": "You should install this package to use the events in the translator", "zendframework/zend-filter": "You should install this package to use the provided filters", - "zendframework/zend-resources": "Translation resources", + "zendframework/zend-i18n-resources": "Translation resources", "zendframework/zend-servicemanager": "Zend\\ServiceManager component", "zendframework/zend-validator": "You should install this package to use the provided validators", "zendframework/zend-view": "You should install this package to use the provided view helpers" @@ -2500,8 +2644,12 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" + }, + "zf": { + "component": "Zend\\I18n", + "config-provider": "Zend\\I18n\\ConfigProvider" } }, "autoload": { @@ -2518,32 +2666,32 @@ "i18n", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-06-07 21:08:30" }, { "name": "zendframework/zend-inputfilter", - "version": "2.4.11", + "version": "2.7.3", "source": { "type": "git", "url": "https://github.com/zendframework/zend-inputfilter.git", - "reference": "6305e9acf7da9f5481b5266cb6e0353a96c10a06" + "reference": "0cf1bdcd8858a8583965310a7dae63ad75bd1237" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-inputfilter/zipball/6305e9acf7da9f5481b5266cb6e0353a96c10a06", - "reference": "6305e9acf7da9f5481b5266cb6e0353a96c10a06", + "url": "https://api.github.com/repos/zendframework/zend-inputfilter/zipball/0cf1bdcd8858a8583965310a7dae63ad75bd1237", + "reference": "0cf1bdcd8858a8583965310a7dae63ad75bd1237", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-filter": "~2.4.0", - "zendframework/zend-stdlib": "~2.4.0", - "zendframework/zend-validator": "~2.4.8" + "php": "^5.5 || ^7.0", + "zendframework/zend-filter": "^2.6", + "zendframework/zend-stdlib": "^2.7 || ^3.0", + "zendframework/zend-validator": "^2.6" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "^4.5", - "zendframework/zend-servicemanager": "~2.4.0" + "phpunit/phpunit": "^4.8", + "squizlabs/php_codesniffer": "^2.6.2", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3" }, "suggest": { "zendframework/zend-servicemanager": "To support plugin manager support" @@ -2551,8 +2699,12 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" + }, + "zf": { + "component": "Zend\\InputFilter", + "config-provider": "Zend\\InputFilter\\ConfigProvider" } }, "autoload": { @@ -2569,43 +2721,44 @@ "inputfilter", "zf2" ], - "time": "2015-09-09 15:44:54" + "time": "2016-08-18 18:40:34" }, { "name": "zendframework/zend-json", - "version": "2.4.11", + "version": "2.6.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-json.git", - "reference": "1db4b878846520e619fbcdc7ce826c8563f8e839" + "reference": "4c8705dbe4ad7d7e51b2876c5b9eea0ef916ba28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-json/zipball/1db4b878846520e619fbcdc7ce826c8563f8e839", - "reference": "1db4b878846520e619fbcdc7ce826c8563f8e839", + "url": "https://api.github.com/repos/zendframework/zend-json/zipball/4c8705dbe4ad7d7e51b2876c5b9eea0ef916ba28", + "reference": "4c8705dbe4ad7d7e51b2876c5b9eea0ef916ba28", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" + "php": "^5.5 || ^7.0" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-http": "self.version", - "zendframework/zend-server": "self.version" + "zendframework/zend-http": "^2.5.4", + "zendframework/zend-server": "^2.6.1", + "zendframework/zend-stdlib": "^2.5 || ^3.0", + "zendframework/zendxml": "^1.0.2" }, "suggest": { - "zendframework/zend-http": "Zend\\Http component", - "zendframework/zend-server": "Zend\\Server component", + "zendframework/zend-http": "Zend\\Http component, required to use Zend\\Json\\Server", + "zendframework/zend-server": "Zend\\Server component, required to use Zend\\Json\\Server", + "zendframework/zend-stdlib": "Zend\\Stdlib component, for use with caching Zend\\Json\\Server responses", "zendframework/zendxml": "To support Zend\\Json\\Json::fromXml() usage" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.6-dev", + "dev-develop": "2.7-dev" } }, "autoload": { @@ -2623,20 +2776,20 @@ "json", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-02-04 21:20:26" }, { "name": "zendframework/zend-loader", - "version": "2.4.11", + "version": "2.5.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-loader.git", - "reference": "5e62c44a4d23c4e09d35fcc2a3b109c944dbdc22" + "reference": "c5fd2f071bde071f4363def7dea8dec7393e135c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-loader/zipball/5e62c44a4d23c4e09d35fcc2a3b109c944dbdc22", - "reference": "5e62c44a4d23c4e09d35fcc2a3b109c944dbdc22", + "url": "https://api.github.com/repos/zendframework/zend-loader/zipball/c5fd2f071bde071f4363def7dea8dec7393e135c", + "reference": "c5fd2f071bde071f4363def7dea8dec7393e135c", "shasum": "" }, "require": { @@ -2644,14 +2797,13 @@ }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" } }, "autoload": { @@ -2668,50 +2820,59 @@ "loader", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2015-06-03 14:05:47" }, { "name": "zendframework/zend-log", - "version": "2.4.11", + "version": "2.9.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-log.git", - "reference": "f6538f4b61cdacafa47c7cef26c5c0204f2d1eef" + "reference": "115d75db1f8fb29efbf1b9a49cb91c662b7195dc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-log/zipball/f6538f4b61cdacafa47c7cef26c5c0204f2d1eef", - "reference": "f6538f4b61cdacafa47c7cef26c5c0204f2d1eef", + "url": "https://api.github.com/repos/zendframework/zend-log/zipball/115d75db1f8fb29efbf1b9a49cb91c662b7195dc", + "reference": "115d75db1f8fb29efbf1b9a49cb91c662b7195dc", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-stdlib": "self.version" + "php": "^5.6 || ^7.0", + "psr/log": "^1.0", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-stdlib": "^2.7 || ^3.0" + }, + "provide": { + "psr/log-implementation": "1.0.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", + "friendsofphp/php-cs-fixer": "~1.7.0", + "mikey179/vfsstream": "^1.6", "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-console": "self.version", - "zendframework/zend-db": "self.version", - "zendframework/zend-escaper": "self.version", - "zendframework/zend-mail": "self.version", - "zendframework/zend-validator": "self.version" + "zendframework/zend-db": "^2.6", + "zendframework/zend-escaper": "^2.5", + "zendframework/zend-filter": "^2.5", + "zendframework/zend-mail": "^2.6.1", + "zendframework/zend-validator": "^2.6" }, "suggest": { - "ext-mongo": "*", - "zendframework/zend-console": "Zend\\Console component", - "zendframework/zend-db": "Zend\\Db component", - "zendframework/zend-escaper": "Zend\\Escaper component, for use in the XML formatter", - "zendframework/zend-mail": "Zend\\Mail component", - "zendframework/zend-validator": "Zend\\Validator component" + "ext-mongo": "mongo extension to use Mongo writer", + "ext-mongodb": "mongodb extension to use MongoDB writer", + "zendframework/zend-console": "Zend\\Console component to use the RequestID log processor", + "zendframework/zend-db": "Zend\\Db component to use the database log writer", + "zendframework/zend-escaper": "Zend\\Escaper component, for use in the XML log formatter", + "zendframework/zend-mail": "Zend\\Mail component to use the email log writer", + "zendframework/zend-validator": "Zend\\Validator component to block invalid log messages" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.9-dev", + "dev-develop": "2.10-dev" + }, + "zf": { + "component": "Zend\\Log", + "config-provider": "Zend\\Log\\ConfigProvider" } }, "autoload": { @@ -2730,41 +2891,40 @@ "logging", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-08-11 13:44:10" }, { "name": "zendframework/zend-math", - "version": "2.4.11", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-math.git", - "reference": "1e7e803366fc7618a8668ce2403c932196174faa" + "reference": "f4358090d5d23973121f1ed0b376184b66d9edec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-math/zipball/1e7e803366fc7618a8668ce2403c932196174faa", - "reference": "1e7e803366fc7618a8668ce2403c932196174faa", + "url": "https://api.github.com/repos/zendframework/zend-math/zipball/f4358090d5d23973121f1ed0b376184b66d9edec", + "reference": "f4358090d5d23973121f1ed0b376184b66d9edec", "shasum": "" }, "require": { - "php": ">=5.3.23" + "php": "^5.5 || ^7.0" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master" + "ircmaxell/random-lib": "~1.1", + "phpunit/phpunit": "~4.0" }, "suggest": { "ext-bcmath": "If using the bcmath functionality", "ext-gmp": "If using the gmp functionality", - "ircmaxell/random-lib": "Fallback random byte generator for Zend\\Math\\Rand if OpenSSL/Mcrypt extensions are unavailable", - "zendframework/zend-servicemanager": ">= current version, if using the BigInteger::factory functionality" + "ircmaxell/random-lib": "Fallback random byte generator for Zend\\Math\\Rand if Mcrypt extensions is unavailable" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" } }, "autoload": { @@ -2781,35 +2941,36 @@ "math", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-04-07 16:29:53" }, { "name": "zendframework/zend-modulemanager", - "version": "2.4.11", + "version": "2.7.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-modulemanager.git", - "reference": "49c0713c2b560dd434aa36b83df4c89f51f8dab4" + "reference": "2a59ab9a0dd7699a55050dff659ab0f28272b46e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-modulemanager/zipball/49c0713c2b560dd434aa36b83df4c89f51f8dab4", - "reference": "49c0713c2b560dd434aa36b83df4c89f51f8dab4", + "url": "https://api.github.com/repos/zendframework/zend-modulemanager/zipball/2a59ab9a0dd7699a55050dff659ab0f28272b46e", + "reference": "2a59ab9a0dd7699a55050dff659ab0f28272b46e", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-eventmanager": "self.version", - "zendframework/zend-stdlib": "self.version" + "php": "^5.5 || ^7.0", + "zendframework/zend-config": "^2.6", + "zendframework/zend-eventmanager": "^2.6.2 || ^3.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-config": "self.version", - "zendframework/zend-console": "self.version", - "zendframework/zend-loader": "self.version", - "zendframework/zend-servicemanager": "self.version" + "zendframework/zend-console": "^2.6", + "zendframework/zend-di": "^2.6", + "zendframework/zend-loader": "^2.5", + "zendframework/zend-mvc": "^2.7", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3" }, "suggest": { "zendframework/zend-config": "Zend\\Config component", @@ -2821,8 +2982,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" } }, "autoload": { @@ -2834,56 +2995,56 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-module-manager", + "homepage": "https://github.com/zendframework/zend-modulemanager", "keywords": [ "modulemanager", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-05-16 21:21:11" }, { "name": "zendframework/zend-mvc", - "version": "2.4.11", + "version": "2.6.3", "source": { "type": "git", "url": "https://github.com/zendframework/zend-mvc.git", - "reference": "5ecf513a82fe9fdeee84919eee45e8098639df04" + "reference": "a0f21c0261adab4a27bd10964995625b7d4c7f64" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-mvc/zipball/5ecf513a82fe9fdeee84919eee45e8098639df04", - "reference": "5ecf513a82fe9fdeee84919eee45e8098639df04", + "url": "https://api.github.com/repos/zendframework/zend-mvc/zipball/a0f21c0261adab4a27bd10964995625b7d4c7f64", + "reference": "a0f21c0261adab4a27bd10964995625b7d4c7f64", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-eventmanager": "~2.4.0", - "zendframework/zend-form": "~2.4.8", - "zendframework/zend-servicemanager": "~2.4.0", - "zendframework/zend-stdlib": "~2.4.0" + "php": "^5.5 || ^7.0", + "zendframework/zend-eventmanager": "~2.5", + "zendframework/zend-form": "~2.6", + "zendframework/zend-hydrator": "~1.0", + "zendframework/zend-servicemanager": "~2.5", + "zendframework/zend-stdlib": "^2.7.5" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-authentication": "~2.4.0", - "zendframework/zend-cache": "~2.4.0", - "zendframework/zend-console": "~2.4.0", - "zendframework/zend-di": "~2.4.0", - "zendframework/zend-filter": "~2.4.0", - "zendframework/zend-http": "~2.4.8", - "zendframework/zend-i18n": "~2.4.0", - "zendframework/zend-inputfilter": "~2.4.8", - "zendframework/zend-json": "~2.4.0", - "zendframework/zend-log": "~2.4.0", - "zendframework/zend-modulemanager": "~2.4.0", - "zendframework/zend-serializer": "~2.4.0", - "zendframework/zend-session": "~2.4.0", - "zendframework/zend-text": "~2.4.0", - "zendframework/zend-uri": "~2.4.0", - "zendframework/zend-validator": "~2.4.8", - "zendframework/zend-version": "~2.4.0", - "zendframework/zend-view": "~2.4.0" + "zendframework/zend-authentication": "~2.5", + "zendframework/zend-cache": "~2.5", + "zendframework/zend-console": "~2.5", + "zendframework/zend-di": "~2.5", + "zendframework/zend-filter": "~2.5", + "zendframework/zend-http": "~2.5", + "zendframework/zend-i18n": "~2.5", + "zendframework/zend-inputfilter": "~2.5", + "zendframework/zend-json": "~2.5", + "zendframework/zend-log": "~2.5", + "zendframework/zend-modulemanager": "~2.6", + "zendframework/zend-serializer": "~2.5", + "zendframework/zend-session": "~2.5", + "zendframework/zend-text": "~2.5", + "zendframework/zend-uri": "~2.5", + "zendframework/zend-validator": "~2.5", + "zendframework/zend-version": "~2.5", + "zendframework/zend-view": "~2.5" }, "suggest": { "zendframework/zend-authentication": "Zend\\Authentication component for Identity plugin", @@ -2899,7 +3060,6 @@ "zendframework/zend-modulemanager": "Zend\\ModuleManager component", "zendframework/zend-serializer": "Zend\\Serializer component", "zendframework/zend-session": "Zend\\Session component for FlashMessenger, PRG, and FPRG plugins", - "zendframework/zend-stdlib": "Zend\\Stdlib component", "zendframework/zend-text": "Zend\\Text component", "zendframework/zend-uri": "Zend\\Uri component", "zendframework/zend-validator": "Zend\\Validator component", @@ -2909,8 +3069,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.6-dev", + "dev-develop": "2.7-dev" } }, "autoload": { @@ -2927,42 +3087,46 @@ "mvc", "zf2" ], - "time": "2015-09-14 16:32:50" + "time": "2016-02-23 15:24:59" }, { "name": "zendframework/zend-serializer", - "version": "2.4.11", + "version": "2.8.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-serializer.git", - "reference": "31a0da5c09f54fe76bc4e145e348b0d3d277aaf0" + "reference": "ff74ea020f5f90866eb28365327e9bc765a61a6e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-serializer/zipball/31a0da5c09f54fe76bc4e145e348b0d3d277aaf0", - "reference": "31a0da5c09f54fe76bc4e145e348b0d3d277aaf0", + "url": "https://api.github.com/repos/zendframework/zend-serializer/zipball/ff74ea020f5f90866eb28365327e9bc765a61a6e", + "reference": "ff74ea020f5f90866eb28365327e9bc765a61a6e", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-json": "self.version", - "zendframework/zend-math": "self.version", - "zendframework/zend-stdlib": "self.version" + "php": "^5.6 || ^7.0", + "zendframework/zend-json": "^2.5 || ^3.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-servicemanager": "self.version" + "phpunit/phpunit": "^4.5", + "squizlabs/php_codesniffer": "^2.3.1", + "zendframework/zend-math": "^2.6", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3" }, "suggest": { - "zendframework/zend-servicemanager": "To support plugin manager support" + "zendframework/zend-math": "(^2.6 || ^3.0) To support Python Pickle serialization", + "zendframework/zend-servicemanager": "(^2.7.5 || ^3.0.3) To support plugin manager support" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.8-dev", + "dev-develop": "2.9-dev" + }, + "zf": { + "component": "Zend\\Serializer", + "config-provider": "Zend\\Serializer\\ConfigProvider" } }, "autoload": { @@ -2980,37 +3144,36 @@ "serializer", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-06-21 17:01:55" }, { "name": "zendframework/zend-server", - "version": "2.4.11", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-server.git", - "reference": "dd6da0d3c304cb43d3ac0be2dc9c334372d3734c" + "reference": "7cb617ca3e9b24579f544a244ee79ae61f480914" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-server/zipball/dd6da0d3c304cb43d3ac0be2dc9c334372d3734c", - "reference": "dd6da0d3c304cb43d3ac0be2dc9c334372d3734c", + "url": "https://api.github.com/repos/zendframework/zend-server/zipball/7cb617ca3e9b24579f544a244ee79ae61f480914", + "reference": "7cb617ca3e9b24579f544a244ee79ae61f480914", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-code": "self.version", - "zendframework/zend-stdlib": "self.version" + "php": "^5.6 || ^7.0", + "zendframework/zend-code": "^2.5 || ^3.0", + "zendframework/zend-stdlib": "^2.5 || ^3.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "^4.8", + "squizlabs/php_codesniffer": "^2.3.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" } }, "autoload": { @@ -3027,30 +3190,32 @@ "server", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-06-20 22:27:55" }, { "name": "zendframework/zend-servicemanager", - "version": "2.4.11", + "version": "2.7.8", "source": { "type": "git", "url": "https://github.com/zendframework/zend-servicemanager.git", - "reference": "855294e12771b4295c26446b6ed2df2f1785f234" + "reference": "2ae3b6e4978ec2e9ff52352e661946714ed989f9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-servicemanager/zipball/855294e12771b4295c26446b6ed2df2f1785f234", - "reference": "855294e12771b4295c26446b6ed2df2f1785f234", + "url": "https://api.github.com/repos/zendframework/zend-servicemanager/zipball/2ae3b6e4978ec2e9ff52352e661946714ed989f9", + "reference": "2ae3b6e4978ec2e9ff52352e661946714ed989f9", "shasum": "" }, "require": { - "php": ">=5.3.23" + "container-interop/container-interop": "~1.0", + "php": "^5.5 || ^7.0" }, "require-dev": { + "athletic/athletic": "dev-master", "fabpot/php-cs-fixer": "1.7.*", "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-di": "self.version" + "zendframework/zend-di": "~2.5", + "zendframework/zend-mvc": "~2.5" }, "suggest": { "ocramius/proxy-manager": "ProxyManager 0.5.* to handle lazy initialization of services", @@ -3059,8 +3224,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.7-dev", + "dev-develop": "3.0-dev" } }, "autoload": { @@ -3072,46 +3237,47 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-service-manager", + "homepage": "https://github.com/zendframework/zend-servicemanager", "keywords": [ "servicemanager", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-12-19 19:14:29" }, { "name": "zendframework/zend-session", - "version": "2.4.11", + "version": "2.7.3", "source": { "type": "git", "url": "https://github.com/zendframework/zend-session.git", - "reference": "da7f5745a75d76d5c803cd4291aa98e7393da2f1" + "reference": "346e9709657b81a5d53d70ce754730a26d1f02f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-session/zipball/da7f5745a75d76d5c803cd4291aa98e7393da2f1", - "reference": "da7f5745a75d76d5c803cd4291aa98e7393da2f1", + "url": "https://api.github.com/repos/zendframework/zend-session/zipball/346e9709657b81a5d53d70ce754730a26d1f02f2", + "reference": "346e9709657b81a5d53d70ce754730a26d1f02f2", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-eventmanager": "self.version", - "zendframework/zend-stdlib": "self.version" + "php": "^5.5 || ^7.0", + "zendframework/zend-eventmanager": "^2.6.2 || ^3.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { + "container-interop/container-interop": "^1.1", "fabpot/php-cs-fixer": "1.7.*", + "mongodb/mongodb": "^1.0.1", "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-cache": "self.version", - "zendframework/zend-db": "self.version", - "zendframework/zend-http": "self.version", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-validator": "self.version" + "zendframework/zend-cache": "^2.6.1", + "zendframework/zend-db": "^2.7", + "zendframework/zend-http": "^2.5.4", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-validator": "^2.6" }, "suggest": { + "mongodb/mongodb": "If you want to use the MongoDB session save handler", "zendframework/zend-cache": "Zend\\Cache component", "zendframework/zend-db": "Zend\\Db component", - "zendframework/zend-eventmanager": "Zend\\EventManager component", "zendframework/zend-http": "Zend\\Http component", "zendframework/zend-servicemanager": "Zend\\ServiceManager component", "zendframework/zend-validator": "Zend\\Validator component" @@ -3119,8 +3285,12 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.7-dev", + "dev-develop": "2.8-dev" + }, + "zf": { + "component": "Zend\\Session", + "config-provider": "Zend\\Session\\ConfigProvider" } }, "autoload": { @@ -3138,33 +3308,33 @@ "session", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-07-05 18:32:50" }, { "name": "zendframework/zend-soap", - "version": "2.4.11", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-soap.git", - "reference": "743ab449c4d0d03cee21db743c5aed360be49d36" + "reference": "2d6012e7231cce550219eccfc80836a028d20bf1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-soap/zipball/743ab449c4d0d03cee21db743c5aed360be49d36", - "reference": "743ab449c4d0d03cee21db743c5aed360be49d36", + "url": "https://api.github.com/repos/zendframework/zend-soap/zipball/2d6012e7231cce550219eccfc80836a028d20bf1", + "reference": "2d6012e7231cce550219eccfc80836a028d20bf1", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-server": "self.version", - "zendframework/zend-stdlib": "self.version", - "zendframework/zend-uri": "self.version" + "php": "^5.5 || ^7.0", + "zendframework/zend-server": "^2.6.1", + "zendframework/zend-stdlib": "^2.7 || ^3.0", + "zendframework/zend-uri": "^2.5.2" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-http": "self.version" + "phpunit/phpunit": "^4.8", + "squizlabs/php_codesniffer": "^2.3.1", + "zendframework/zend-config": "^2.6", + "zendframework/zend-http": "^2.5.4" }, "suggest": { "zendframework/zend-http": "Zend\\Http component" @@ -3172,8 +3342,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.6-dev", + "dev-develop": "2.7-dev" } }, "autoload": { @@ -3190,33 +3360,36 @@ "soap", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-04-21 16:06:27" }, { "name": "zendframework/zend-stdlib", - "version": "2.4.11", + "version": "2.7.7", "source": { "type": "git", "url": "https://github.com/zendframework/zend-stdlib.git", - "reference": "d8ecb629a72da9f91bd95c5af006384823560b42" + "reference": "0e44eb46788f65e09e077eb7f44d2659143bcc1f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/d8ecb629a72da9f91bd95c5af006384823560b42", - "reference": "d8ecb629a72da9f91bd95c5af006384823560b42", + "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/0e44eb46788f65e09e077eb7f44d2659143bcc1f", + "reference": "0e44eb46788f65e09e077eb7f44d2659143bcc1f", "shasum": "" }, "require": { - "php": ">=5.3.23" + "php": "^5.5 || ^7.0", + "zendframework/zend-hydrator": "~1.1" }, "require-dev": { + "athletic/athletic": "~0.1", "fabpot/php-cs-fixer": "1.7.*", "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-eventmanager": "self.version", - "zendframework/zend-filter": "self.version", - "zendframework/zend-serializer": "self.version", - "zendframework/zend-servicemanager": "self.version" + "zendframework/zend-config": "~2.5", + "zendframework/zend-eventmanager": "~2.5", + "zendframework/zend-filter": "~2.5", + "zendframework/zend-inputfilter": "~2.5", + "zendframework/zend-serializer": "~2.5", + "zendframework/zend-servicemanager": "~2.5" }, "suggest": { "zendframework/zend-eventmanager": "To support aggregate hydrator usage", @@ -3227,8 +3400,9 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-release-2.7": "2.7-dev", + "dev-master": "3.0-dev", + "dev-develop": "3.1-dev" } }, "autoload": { @@ -3245,37 +3419,37 @@ "stdlib", "zf2" ], - "time": "2015-07-21 13:55:46" + "time": "2016-04-12 21:17:31" }, { "name": "zendframework/zend-text", - "version": "2.4.11", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-text.git", - "reference": "bd2393fa1f88b719be033a07fdff23f5fa745ad5" + "reference": "07ad9388e4d4f12620ad37b52a5b0e4ee7845f92" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-text/zipball/bd2393fa1f88b719be033a07fdff23f5fa745ad5", - "reference": "bd2393fa1f88b719be033a07fdff23f5fa745ad5", + "url": "https://api.github.com/repos/zendframework/zend-text/zipball/07ad9388e4d4f12620ad37b52a5b0e4ee7845f92", + "reference": "07ad9388e4d4f12620ad37b52a5b0e4ee7845f92", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-stdlib": "self.version" + "php": "^5.5 || ^7.0", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master" + "zendframework/zend-config": "^2.6" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.6-dev", + "dev-develop": "2.7-dev" } }, "autoload": { @@ -3292,37 +3466,36 @@ "text", "zf2" ], - "time": "2015-05-07 14:55:31" + "time": "2016-02-08 19:03:52" }, { "name": "zendframework/zend-uri", - "version": "2.4.11", + "version": "2.5.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-uri.git", - "reference": "33512866d20cc4bc54a0c1a6a0bdfcf5088939b3" + "reference": "0bf717a239432b1a1675ae314f7c4acd742749ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-uri/zipball/33512866d20cc4bc54a0c1a6a0bdfcf5088939b3", - "reference": "33512866d20cc4bc54a0c1a6a0bdfcf5088939b3", + "url": "https://api.github.com/repos/zendframework/zend-uri/zipball/0bf717a239432b1a1675ae314f7c4acd742749ed", + "reference": "0bf717a239432b1a1675ae314f7c4acd742749ed", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-escaper": "~2.4.0", - "zendframework/zend-validator": "~2.4.0" + "php": "^5.5 || ^7.0", + "zendframework/zend-escaper": "^2.5", + "zendframework/zend-validator": "^2.5" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" } }, "autoload": { @@ -3340,54 +3513,60 @@ "uri", "zf2" ], - "time": "2015-09-14 16:17:10" + "time": "2016-02-17 22:38:51" }, { "name": "zendframework/zend-validator", - "version": "2.4.11", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-validator.git", - "reference": "81415511fe729e6de19a61936313cef43c80d337" + "reference": "b71641582297eab52753b72cd4eb45a5ded4485c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-validator/zipball/81415511fe729e6de19a61936313cef43c80d337", - "reference": "81415511fe729e6de19a61936313cef43c80d337", + "url": "https://api.github.com/repos/zendframework/zend-validator/zipball/b71641582297eab52753b72cd4eb45a5ded4485c", + "reference": "b71641582297eab52753b72cd4eb45a5ded4485c", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "~2.4.0" + "container-interop/container-interop": "^1.1", + "php": "^5.6 || ^7.0", + "zendframework/zend-stdlib": "^2.7.6 || ^3.1" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-config": "~2.4.0", - "zendframework/zend-db": "~2.4.0", - "zendframework/zend-filter": "~2.4.0", - "zendframework/zend-i18n": "~2.4.0", - "zendframework/zend-math": "~2.4.0", - "zendframework/zend-servicemanager": "~2.4.0", - "zendframework/zend-session": "~2.4.0", - "zendframework/zend-uri": "~2.4.0" + "phpunit/phpunit": "^6.0.8 || ^5.7.15", + "zendframework/zend-cache": "^2.6.1", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-config": "^2.6", + "zendframework/zend-db": "^2.7", + "zendframework/zend-filter": "^2.6", + "zendframework/zend-http": "^2.5.4", + "zendframework/zend-i18n": "^2.6", + "zendframework/zend-math": "^2.6", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-session": "^2.6.2", + "zendframework/zend-uri": "^2.5" }, "suggest": { - "zendframework/zend-db": "Zend\\Db component", + "zendframework/zend-db": "Zend\\Db component, required by the (No)RecordExists validator", "zendframework/zend-filter": "Zend\\Filter component, required by the Digits validator", - "zendframework/zend-i18n": "Zend\\I18n component to allow translation of validation error messages as well as to use the various Date validators", - "zendframework/zend-math": "Zend\\Math component", - "zendframework/zend-resources": "Translations of validator messages", + "zendframework/zend-i18n": "Zend\\I18n component to allow translation of validation error messages", + "zendframework/zend-i18n-resources": "Translations of validator messages", + "zendframework/zend-math": "Zend\\Math component, required by the Csrf validator", "zendframework/zend-servicemanager": "Zend\\ServiceManager component to allow using the ValidatorPluginManager and validator chains", - "zendframework/zend-session": "Zend\\Session component", + "zendframework/zend-session": "Zend\\Session component, required by the Csrf validator", "zendframework/zend-uri": "Zend\\Uri component, required by the Uri and Sitemap\\Loc validators" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.9-dev", + "dev-develop": "2.10-dev" + }, + "zf": { + "component": "Zend\\Validator", + "config-provider": "Zend\\Validator\\ConfigProvider" } }, "autoload": { @@ -3405,45 +3584,52 @@ "validator", "zf2" ], - "time": "2015-09-08 21:04:17" + "time": "2017-03-17 10:15:50" }, { "name": "zendframework/zend-view", - "version": "2.4.11", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-view.git", - "reference": "d81da0d932a0e35f8cbc6f10d80c8b4ab54973ea" + "reference": "3b6342c381c4437a03fc81d0064c0bb8924914d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-view/zipball/d81da0d932a0e35f8cbc6f10d80c8b4ab54973ea", - "reference": "d81da0d932a0e35f8cbc6f10d80c8b4ab54973ea", + "url": "https://api.github.com/repos/zendframework/zend-view/zipball/3b6342c381c4437a03fc81d0064c0bb8924914d3", + "reference": "3b6342c381c4437a03fc81d0064c0bb8924914d3", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-eventmanager": "self.version", - "zendframework/zend-loader": "self.version", - "zendframework/zend-stdlib": "self.version" + "php": "^5.6 || ^7.0", + "zendframework/zend-eventmanager": "^2.6.2 || ^3.0", + "zendframework/zend-loader": "^2.5", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-authentication": "self.version", - "zendframework/zend-escaper": "self.version", - "zendframework/zend-feed": "self.version", - "zendframework/zend-filter": "self.version", - "zendframework/zend-http": "self.version", - "zendframework/zend-i18n": "self.version", - "zendframework/zend-json": "self.version", - "zendframework/zend-mvc": "self.version", - "zendframework/zend-navigation": "self.version", - "zendframework/zend-paginator": "self.version", - "zendframework/zend-permissions-acl": "self.version", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-uri": "self.version" + "phpunit/phpunit": "^5.7.15 || ^6.0.8", + "zendframework/zend-authentication": "^2.5", + "zendframework/zend-cache": "^2.6.1", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-config": "^2.6", + "zendframework/zend-console": "^2.6", + "zendframework/zend-escaper": "^2.5", + "zendframework/zend-feed": "^2.7", + "zendframework/zend-filter": "^2.6.1", + "zendframework/zend-http": "^2.5.4", + "zendframework/zend-i18n": "^2.6", + "zendframework/zend-json": "^2.6.1", + "zendframework/zend-log": "^2.7", + "zendframework/zend-modulemanager": "^2.7.1", + "zendframework/zend-mvc": "^2.7 || ^3.0", + "zendframework/zend-navigation": "^2.5", + "zendframework/zend-paginator": "^2.5", + "zendframework/zend-permissions-acl": "^2.6", + "zendframework/zend-router": "^3.0.1", + "zendframework/zend-serializer": "^2.6.1", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-session": "^2.6.2", + "zendframework/zend-uri": "^2.5" }, "suggest": { "zendframework/zend-authentication": "Zend\\Authentication component", @@ -3460,11 +3646,14 @@ "zendframework/zend-servicemanager": "Zend\\ServiceManager component", "zendframework/zend-uri": "Zend\\Uri component" }, + "bin": [ + "bin/templatemap_generator.php" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.9-dev", + "dev-develop": "3.0-dev" } }, "autoload": { @@ -3482,7 +3671,7 @@ "view", "zf2" ], - "time": "2015-06-16 15:22:37" + "time": "2017-03-21 15:05:56" } ], "packages-dev": [ @@ -5133,16 +5322,16 @@ }, { "name": "theseer/fdomdocument", - "version": "1.6.4", + "version": "1.6.5", "source": { "type": "git", "url": "https://github.com/theseer/fDOMDocument.git", - "reference": "cf219ede922fb47956726f35e2127277ebd302ca" + "reference": "8dcfd392135a5bd938c3c83ea71419501ad9855d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/fDOMDocument/zipball/cf219ede922fb47956726f35e2127277ebd302ca", - "reference": "cf219ede922fb47956726f35e2127277ebd302ca", + "url": "https://api.github.com/repos/theseer/fDOMDocument/zipball/8dcfd392135a5bd938c3c83ea71419501ad9855d", + "reference": "8dcfd392135a5bd938c3c83ea71419501ad9855d", "shasum": "" }, "require": { @@ -5169,7 +5358,7 @@ ], "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", "homepage": "https://github.com/theseer/fDOMDocument", - "time": "2017-04-17 09:08:13" + "time": "2017-04-21 14:50:31" } ], "aliases": [], diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt index e4078a959c7a8..92c996a50714f 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt @@ -105,6 +105,8 @@ DoubleColon \Magento\Framework\ObjectManager\Code\Generator\SampleConverter \Magento\Observer \Magento\Framework\MessageQueue\Model\TestConsumer +\Magento\Framework\MessageQueue\Code\Generator\TInterface +\Magento\Framework\MessageQueue\Code\Generator\TSearchResultsInterface \Magento\Catalog\Api\Data\Product \Magento\Framework\ObjectManager\Code\Generator\Sample \Magento\Framework\ObjectManager\Code\Generator\Sample diff --git a/lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/_files/SampleEmptyExtension.txt b/lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/_files/SampleEmptyExtension.txt index 1605dad849f04..d540473c49a97 100644 --- a/lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/_files/SampleEmptyExtension.txt +++ b/lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/_files/SampleEmptyExtension.txt @@ -3,6 +3,6 @@ namespace Magento\Catalog\Api\Data; /** * Extension class for @see \Magento\Catalog\Api\Data\ProductInterface */ -class ProductExtension extends \Magento\Framework\Api\AbstractSimpleObject implements \Magento\Catalog\Api\Data\ProductExtensionInterface +class ProductExtension extends \Magento\Framework\Api\AbstractSimpleObject implements ProductExtensionInterface { } diff --git a/lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/_files/SampleExtension.txt b/lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/_files/SampleExtension.txt index 0e725d453d826..ee515cface056 100644 --- a/lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/_files/SampleExtension.txt +++ b/lib/internal/Magento/Framework/Api/Test/Unit/Code/Generator/_files/SampleExtension.txt @@ -3,7 +3,7 @@ namespace Magento\Catalog\Api\Data; /** * Extension class for @see \Magento\Catalog\Api\Data\ProductInterface */ -class ProductExtension extends \Magento\Framework\Api\AbstractSimpleObject implements \Magento\Catalog\Api\Data\ProductExtensionInterface +class ProductExtension extends \Magento\Framework\Api\AbstractSimpleObject implements ProductExtensionInterface { /** * @return string|null diff --git a/lib/internal/Magento/Framework/Code/Generator/ClassGenerator.php b/lib/internal/Magento/Framework/Code/Generator/ClassGenerator.php index 5f4aaf655d62f..54748d74f06c0 100644 --- a/lib/internal/Magento/Framework/Code/Generator/ClassGenerator.php +++ b/lib/internal/Magento/Framework/Code/Generator/ClassGenerator.php @@ -129,6 +129,10 @@ public function addMethods(array $methods) $methodObject->setDocBlock($docBlockObject); } + if (!empty($methodOptions['returnType'])) { + $methodObject->setReturnType($methodOptions['returnType']); + } + $this->addMethodFromGenerator($methodObject); } return $this; diff --git a/lib/internal/Magento/Framework/Code/Generator/EntityAbstract.php b/lib/internal/Magento/Framework/Code/Generator/EntityAbstract.php index 3bc2e53fbca2b..baf2bba142741 100644 --- a/lib/internal/Magento/Framework/Code/Generator/EntityAbstract.php +++ b/lib/internal/Magento/Framework/Code/Generator/EntityAbstract.php @@ -215,15 +215,10 @@ abstract protected function _getClassMethods(); */ protected function _generateCode() { - $this->_classGenerator->setName( - $this->_getResultClassName() - )->addProperties( - $this->_getClassProperties() - )->addMethods( - $this->_getClassMethods() - )->setClassDocBlock( - $this->_getClassDocBlock() - ); + $this->_classGenerator->setName($this->_getResultClassName()) + ->addProperties($this->_getClassProperties()) + ->addMethods($this->_getClassMethods()) + ->setClassDocBlock($this->_getClassDocBlock()); return $this->_getGeneratedCode(); } @@ -318,6 +313,7 @@ protected function _getMethodParameterInfo(\ReflectionParameter $parameter) $parameterInfo = [ 'name' => $parameter->getName(), 'passedByReference' => $parameter->isPassedByReference(), + 'type' => $parameter->getType() ]; if ($parameter->isArray()) { diff --git a/lib/internal/Magento/Framework/Console/Cli.php b/lib/internal/Magento/Framework/Console/Cli.php index 0a2c9ee35c391..27a247107fc33 100644 --- a/lib/internal/Magento/Framework/Console/Cli.php +++ b/lib/internal/Magento/Framework/Console/Cli.php @@ -15,6 +15,7 @@ use Magento\Framework\Filesystem\Driver\File; use Magento\Framework\ObjectManagerInterface; use Magento\Framework\Shell\ComplexParameter; +use Magento\Setup\Application; use Magento\Setup\Console\CompilerPreparation; use Magento\Setup\Model\ObjectManagerProvider; use Symfony\Component\Console; @@ -68,8 +69,10 @@ class Cli extends Console\Application */ public function __construct($name = 'UNKNOWN', $version = 'UNKNOWN') { - $this->serviceManager = \Zend\Mvc\Application::init(require BP . '/setup/config/application.config.php') - ->getServiceManager(); + $configuration = require BP . '/setup/config/application.config.php'; + $bootstrapApplication = new Application(); + $application = $bootstrapApplication->bootstrap($configuration); + $this->serviceManager = $application->getServiceManager(); $this->assertCompilerPreparation(); $this->initObjectManager(); diff --git a/lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php b/lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php index 15e59fb4e8931..b994271f0d0fd 100644 --- a/lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php +++ b/lib/internal/Magento/Framework/Interception/Code/Generator/Interceptor.php @@ -120,6 +120,7 @@ protected function _getMethodInfo(\ReflectionMethod $method) "} else {\n" . " return \$this->___callPlugins('{$method->getName()}', func_get_args(), \$pluginInfo);\n" . "}", + 'returnType' => $method->getReturnType(), 'docblock' => ['shortDescription' => '{@inheritdoc}'], ]; diff --git a/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/InterceptorTest.php b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/InterceptorTest.php index ad8556f096ccc..998f6e2561a7a 100644 --- a/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/InterceptorTest.php +++ b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/InterceptorTest.php @@ -3,61 +3,92 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ - -// @codingStandardsIgnoreFile - namespace Magento\Framework\Interception\Test\Unit\Code\Generator; +use Composer\Autoload\ClassLoader; +use Magento\Framework\Code\Generator\Io; +use Magento\Framework\Interception\Code\Generator\Interceptor; +use PHPUnit_Framework_MockObject_MockObject as MockObject; + class InterceptorTest extends \PHPUnit_Framework_TestCase { /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var Io|MockObject */ - protected $ioObjectMock; + private $ioGenerator; /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @inheritdoc */ - protected $classGeneratorMock; - protected function setUp() { - $this->ioObjectMock = $this->getMock(\Magento\Framework\Code\Generator\Io::class, [], [], '', false); - $this->classGeneratorMock = $this->getMock( - \Magento\Framework\Code\Generator\CodeGeneratorInterface::class, - [], - [], - '', - false + $this->ioGenerator = $this->getMockBuilder(Io::class) + ->disableOriginalConstructor() + ->getMock(); + + $loader = new ClassLoader(); + $loader->addPsr4( + 'Magento\\Framework\\Interception\\Code\\Generator\\', + __DIR__ . '/_files' ); + $loader->register(); + + } + + /** + * Checks a test case when interceptor generates code for the specified class. + * + * @param string $className + * @param string $resultClassName + * @param string $fileName + * @dataProvider interceptorDataProvider + */ + public function testGenerate($className, $resultClassName, $fileName) + { + /** @var Interceptor|MockObject $interceptor */ + $interceptor = $this->getMockBuilder(Interceptor::class) + ->setMethods(['_validateData']) + ->setConstructorArgs([ + $className, + $resultClassName, + $this->ioGenerator, + ]) + ->getMock(); + + $this->ioGenerator + ->method('generateResultFileName') + ->with('\\' . $resultClassName) + ->willReturn($fileName . '.php'); + + $code = file_get_contents(__DIR__ . '/_files/' . $fileName . '.txt'); + $this->ioGenerator->method('writeResultFile') + ->with($fileName . '.php', $code); + + $interceptor->method('_validateData') + ->willReturn(true); + + $generated = $interceptor->generate(); + $this->assertEquals($fileName . '.php', $generated, 'Generated interceptor is invalid.'); } - public function testGetDefaultResultClassName() + /** + * Gets list of interceptor samples. + * + * @return array + */ + public function interceptorDataProvider() { - // resultClassName should be stdClass_Interceptor - $model = $this->getMock( - \Magento\Framework\Interception\Code\Generator\Interceptor::class, - ['_validateData'], + return [ + [ + \Magento\Framework\Interception\Code\Generator\Sample::class, + \Magento\Framework\Interception\Code\Generator\Sample\Interceptor::class, + 'Interceptor' + ], [ - 'Exception', - null, - $this->ioObjectMock, - $this->classGeneratorMock, + \Magento\Framework\Interception\Code\Generator\TSample::class, + \Magento\Framework\Interception\Code\Generator\TSample\Interceptor::class, + 'TInterceptor' ] - ); - - $this->classGeneratorMock->expects($this->once())->method('setName') - ->willReturnSelf(); - $this->classGeneratorMock->expects($this->once())->method('addProperties') - ->willReturnSelf(); - $this->classGeneratorMock->expects($this->once())->method('addMethods') - ->willReturnSelf(); - $this->classGeneratorMock->expects($this->once())->method('setClassDocBlock') - ->willReturnSelf(); - $this->classGeneratorMock->expects($this->once())->method('generate') - ->will($this->returnValue('source code example')); - $model->expects($this->once())->method('_validateData')->will($this->returnValue(true)); - $this->ioObjectMock->expects($this->any())->method('generateResultFileName')->with('Exception_Interceptor'); - $this->assertEquals('', $model->generate()); + ]; } } diff --git a/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/Interceptor.txt b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/Interceptor.txt new file mode 100644 index 0000000000000..addffbab334b8 --- /dev/null +++ b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/Interceptor.txt @@ -0,0 +1,40 @@ +namespace Magento\Framework\Interception\Code\Generator\Sample; + +/** + * Interceptor class for @see \Magento\Framework\Interception\Code\Generator\Sample + */ +class Interceptor extends \Magento\Framework\Interception\Code\Generator\Sample implements \Magento\Framework\Interception\InterceptorInterface +{ + use \Magento\Framework\Interception\Interceptor; + + public function __construct() + { + $this->___init(); + } + + /** + * {@inheritdoc} + */ + public function getValue() + { + $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getValue'); + if (!$pluginInfo) { + return parent::getValue(); + } else { + return $this->___callPlugins('getValue', func_get_args(), $pluginInfo); + } + } + + /** + * {@inheritdoc} + */ + public function setValue($value) + { + $pluginInfo = $this->pluginList->getNext($this->subjectType, 'setValue'); + if (!$pluginInfo) { + return parent::setValue($value); + } else { + return $this->___callPlugins('setValue', func_get_args(), $pluginInfo); + } + } +} diff --git a/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/Sample.php b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/Sample.php new file mode 100644 index 0000000000000..d6eea83a42ce5 --- /dev/null +++ b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/Sample.php @@ -0,0 +1,21 @@ +attribute; + } + + public function setValue($value) + { + $this->attribute = $value; + } +} diff --git a/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TInterceptor.txt b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TInterceptor.txt new file mode 100644 index 0000000000000..b8cf751150536 --- /dev/null +++ b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TInterceptor.txt @@ -0,0 +1,40 @@ +namespace Magento\Framework\Interception\Code\Generator\TSample; + +/** + * Interceptor class for @see \Magento\Framework\Interception\Code\Generator\TSample + */ +class Interceptor extends \Magento\Framework\Interception\Code\Generator\TSample implements \Magento\Framework\Interception\InterceptorInterface +{ + use \Magento\Framework\Interception\Interceptor; + + public function __construct() + { + $this->___init(); + } + + /** + * {@inheritdoc} + */ + public function getValue() : string + { + $pluginInfo = $this->pluginList->getNext($this->subjectType, 'getValue'); + if (!$pluginInfo) { + return parent::getValue(); + } else { + return $this->___callPlugins('getValue', func_get_args(), $pluginInfo); + } + } + + /** + * {@inheritdoc} + */ + public function setValue(string $value) + { + $pluginInfo = $this->pluginList->getNext($this->subjectType, 'setValue'); + if (!$pluginInfo) { + return parent::setValue($value); + } else { + return $this->___callPlugins('setValue', func_get_args(), $pluginInfo); + } + } +} diff --git a/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TSample.php b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TSample.php new file mode 100644 index 0000000000000..f751424e59103 --- /dev/null +++ b/lib/internal/Magento/Framework/Interception/Test/Unit/Code/Generator/_files/TSample.php @@ -0,0 +1,21 @@ +value; + } + + public function setValue(string $value) + { + $this->value = $value; + } +} diff --git a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php index c3cbce384b9f4..c4e54c6395762 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php +++ b/lib/internal/Magento/Framework/ObjectManager/Code/Generator/Repository.php @@ -10,6 +10,8 @@ use Magento\Framework\Api\ExtensionAttribute\JoinProcessorInterface; use Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface; +use Zend\Code\Reflection\MethodReflection; +use Zend\Code\Reflection\ParameterReflection; /** * Class Repository @@ -28,6 +30,19 @@ class Repository extends \Magento\Framework\Code\Generator\EntityAbstract const INPUT_EXCEPTION = '\\Magento\Framework\Exception\InputException'; const SEARCH_CRITERIA = '\\Magento\Framework\Api\SearchCriteriaInterface'; + /** + * The namespace of repository interface + * @var string + */ + private $interfaceName; + + /** + * List of interface methods. + * + * @var array + */ + private $methodList = []; + /** * Retrieve class properties * @@ -209,6 +224,10 @@ protected function _getDefaultConstructorDefinition() */ protected function _getGetMethod() { + $interfaceName = $this->getInterfaceName(); + $methodReflection = new MethodReflection($interfaceName, 'get'); + /** @var ParameterReflection $parameterReflection */ + $parameterReflection = $methodReflection->getParameters()[0]; $body = "if (!\$id) {\n" . " throw new " . self::INPUT_EXCEPTION . "('ID required');\n" . "}\n" @@ -226,10 +245,11 @@ protected function _getGetMethod() 'parameters' => [ [ 'name' => 'id', - 'type' => 'int', + 'type' => $parameterReflection->getType(), ], ], 'body' => $body, + 'returnType' => $methodReflection->getReturnType(), 'docblock' => [ 'shortDescription' => 'load entity', 'tags' => [ @@ -349,6 +369,7 @@ protected function _getFlushMethod() */ protected function _getSaveMethod() { + $info = $this->getMethodParamAndReturnType('save'); $body = "\$this->{$this->_getSourcePersistorPropertyName()}->doPersistEntity(\$entity);\n" . "return \$entity;"; return [ @@ -360,6 +381,7 @@ protected function _getSaveMethod() ], ], 'body' => $body, + 'returnType' => $info['returnType'], 'docblock' => [ 'shortDescription' => 'Perform persist operations for one entity', 'tags' => [ @@ -383,6 +405,7 @@ protected function _getSaveMethod() */ protected function _getDeleteMethod() { + $info = $this->getMethodParamAndReturnType('delete'); $body = "\$this->{$this->_getSourcePersistorPropertyName()}->registerDeleted(\$entity);\n" . "return \$this->{$this->_getSourcePersistorPropertyName()}->doPersistEntity(\$entity);"; return [ @@ -393,6 +416,7 @@ protected function _getDeleteMethod() 'type' => $this->getSourceClassName(), ], ], + 'returnType' => $info['returnType'], 'body' => $body, 'docblock' => [ 'shortDescription' => 'Register entity to delete', @@ -417,6 +441,7 @@ protected function _getDeleteMethod() */ protected function _getDeleteByIdMethod() { + $info = $this->getMethodParamAndReturnType('deleteById'); $body = "\$entity = \$this->get(\$id);\n" . "\$this->{$this->_getSourcePersistorPropertyName()}->registerDeleted(\$entity);\n" . "return \$this->{$this->_getSourcePersistorPropertyName()}->doPersistEntity(\$entity);"; @@ -425,10 +450,11 @@ protected function _getDeleteByIdMethod() 'parameters' => [ [ 'name' => 'id', - 'type' => 'int', + 'type' => $info['paramType'], ], ], 'body' => $body, + 'returnType' => $info['returnType'], 'docblock' => [ 'shortDescription' => 'Delete entity by Id', 'tags' => [ @@ -593,20 +619,11 @@ protected function _validateData() */ protected function _generateCode() { - $className = str_replace('Interface', '', str_replace('Data\\', '', $this->getSourceClassName())); - $this->_classGenerator->setName( - $this->_getResultClassName() - )->addProperties( - $this->_getClassProperties() - )->addMethods( - $this->_getClassMethods() - )->setClassDocBlock( - $this->_getClassDocBlock() - )->setImplementedInterfaces( - [ - $className . 'RepositoryInterface', - ] - ); + $this->_classGenerator->setName($this->_getResultClassName()) + ->addProperties($this->_getClassProperties()) + ->addMethods($this->_getClassMethods()) + ->setClassDocBlock($this->_getClassDocBlock()) + ->setImplementedInterfaces([$this->getInterfaceName()]); return $this->_getGeneratedCode(); } @@ -619,4 +636,68 @@ public function getSourceClassName() { return parent::getSourceClassName() . 'Interface'; } + + /** + * Gets name of implementation interface. + * + * @return string + */ + private function getInterfaceName() + { + if ($this->interfaceName === null) { + $this->interfaceName = str_replace( + 'Interface', + 'RepositoryInterface', + str_replace('Data\\', '', $this->getSourceClassName()) + ); + } + + return $this->interfaceName; + } + + /** + * Gets reflection method's first parameter type and return type from implementation interface. + * Method returns only first parameter because Magento repository interfaces by design have only one parameter + * in methods. + * + * @param string $methodName + * @return array in ['paramType' => ..., 'returnType' => ...] format + */ + private function getMethodParamAndReturnType($methodName) + { + $result = [ + 'paramType' => null, + 'returnType' => null + ]; + $interfaceName = $this->getInterfaceName(); + $methods = $this->getClassMethods($interfaceName); + if (!in_array($methodName, $methods)) { + return $result; + } + + $methodReflection = new MethodReflection($this->getInterfaceName(), $methodName); + $params = $methodReflection->getParameters(); + if (!empty($params[0])) { + /** @var ParameterReflection $parameterReflection */ + $parameterReflection = $params[0]; + $result['paramType'] = $parameterReflection->getType(); + } + $result['returnType'] = $methodReflection->getReturnType(); + + return $result; + } + + /** + * Gets list of class methods. + * + * @param string $name the class namespace + * @return array + */ + private function getClassMethods($name) + { + if (empty($this->methodList)) { + $this->methodList = get_class_methods($name); + } + return $this->methodList; + } } diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/FactoryTest.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/FactoryTest.php index 56f5de472a7dd..e0ae30f982f2d 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/FactoryTest.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/FactoryTest.php @@ -6,42 +6,58 @@ namespace Magento\Framework\ObjectManager\Test\Unit\Code\Generator; +use Magento\Framework\Code\Generator\Io; +use Magento\Framework\ObjectManager\Code\Generator\Factory; +use Magento\Framework\ObjectManager\Code\Generator\Sample; +use PHPUnit_Framework_MockObject_MockObject as MockObject; + class FactoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var Io|MockObject; */ - protected $ioObjectMock; + private $ioGenerator; + /** + * @inheritdoc + */ protected function setUp() { - $this->ioObjectMock = $this->getMock(\Magento\Framework\Code\Generator\Io::class, [], [], '', false); + $this->ioGenerator = $this->getMockBuilder(Io::class) + ->disableOriginalConstructor() + ->getMock(); } + /** + * Checks a test case when factory generator creates auto-generated factories. + */ public function testGenerate() { require_once __DIR__ . '/_files/Sample.php'; - $model = $this->getMock( - \Magento\Framework\ObjectManager\Code\Generator\Factory::class, - ['_validateData'], - [ - \Magento\Framework\ObjectManager\Code\Generator\Sample::class, - null, - $this->ioObjectMock, - null, - null, - $this->getMock(\Magento\Framework\Filesystem\FileResolver::class) - ] - ); - - $this->ioObjectMock->expects($this->once())->method('generateResultFileName') + + /** @var Factory|MockObject $generator */ + $generator = $this->getMockBuilder(Factory::class) + ->setMethods(['_validateData']) + ->setConstructorArgs( + [ + Sample::class, + null, + $this->ioGenerator + ] + ) + ->getMock(); + + $this->ioGenerator + ->method('generateResultFileName') ->with('\\' . \Magento\Framework\ObjectManager\Code\Generator\SampleFactory::class) - ->will($this->returnValue('sample_file.php')); + ->willReturn('sample_file.php'); $factoryCode = file_get_contents(__DIR__ . '/_files/SampleFactory.txt'); - $this->ioObjectMock->expects($this->once())->method('writeResultFile') + $this->ioGenerator->method('writeResultFile') ->with('sample_file.php', $factoryCode); - $model->expects($this->once())->method('_validateData')->will($this->returnValue(true)); - $this->assertEquals('sample_file.php', $model->generate()); + $generator->method('_validateData') + ->willReturn(true); + $generated = $generator->generate(); + $this->assertEquals('sample_file.php', $generated); } } diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/GenerateRepositoryTest.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/GenerateRepositoryTest.php index 8735579fdd5c7..f25c4ead0629a 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/GenerateRepositoryTest.php +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/GenerateRepositoryTest.php @@ -5,7 +5,10 @@ */ namespace Magento\Framework\ObjectManager\Test\Unit\Code\Generator; +use Composer\Autoload\ClassLoader; +use Magento\Framework\Code\Generator\Io; use Magento\Framework\ObjectManager\Code\Generator\Repository; +use PHPUnit_Framework_MockObject_MockObject as MockObject; /** * Class RepositoryTest @@ -13,57 +16,83 @@ class GenerateRepositoryTest extends \PHPUnit_Framework_TestCase { /** - * @var \PHPUnit_Framework_MockObject_MockObject + * @var Io|MockObject */ - protected $ioObjectMock; + private $ioGenerator; /** - * test setUp + * @inheritdoc */ protected function setUp() { - $this->ioObjectMock = $this->getMock( - \Magento\Framework\Code\Generator\Io::class, - [], - [], - '', - false + $this->ioGenerator = $this->getMockBuilder(Io::class) + ->disableOriginalConstructor() + ->getMock(); + + $loader = new ClassLoader(); + $loader->addPsr4( + 'Magento\\Framework\\ObjectManager\\Code\\Generator\\', + __DIR__ . '/_files' ); + $loader->register(); } /** - * generate repository name + * Checks a case when repository generator uses interface. + * + * @param string $className + * @param string $sourceClassName + * @param string $fileName + * @dataProvider interfaceListDataProvider */ - public function testGenerate() + public function testGenerate($className, $sourceClassName, $fileName) { - require_once __DIR__ . '/_files/Sample.php'; - /** @var \PHPUnit_Framework_MockObject_MockObject $model */ - $model = $this->getMock( - \Magento\Framework\ObjectManager\Code\Generator\Repository::class, - [ - '_validateData' - ], - [ - \Magento\Framework\ObjectManager\Code\Generator\Sample::class, + /** @var Repository|MockObject $repository */ + $repository = $this->getMockBuilder(Repository::class) + ->setMethods(['_validateData']) + ->setConstructorArgs([ + $sourceClassName, null, - $this->ioObjectMock, - null, - null, - $this->getMock(\Magento\Framework\Filesystem\FileResolver::class) - ] - ); + $this->ioGenerator + ]) + ->getMock(); - $this->ioObjectMock->expects($this->once()) + $this->ioGenerator ->method('generateResultFileName') - ->with('\\' . \Magento\Framework\ObjectManager\Code\Generator\SampleRepository::class) - ->willReturn('SampleRepository.php'); + ->with('\\' . $className) + ->willReturn($fileName . '.php'); - $repositoryCode = file_get_contents(__DIR__ . '/_files/SampleRepository.txt'); - $this->ioObjectMock->expects($this->once())->method('writeResultFile') - ->with('SampleRepository.php', $repositoryCode); + $repositoryCode = file_get_contents(__DIR__ . '/_files/' . $fileName . '.txt'); + $this->ioGenerator->method('writeResultFile') + ->with($fileName . '.php', $repositoryCode); - $model->expects($this->once())->method('_validateData')->willReturn(true); - $this->assertEquals('SampleRepository.php', $model->generate(), "Generated repository is invalid."); + $repository->method('_validateData') + ->willReturn(true); + $generated = $repository->generate(); + + $this->assertEquals($fileName . '.php', $generated, 'Generated repository is invalid.'); + } + + /** + * Get list of different repository interfaces. + * Some of them use PHP 7.0 syntax features. + * + * @return array + */ + public function interfaceListDataProvider() + { + return [ + [ + \Magento\Framework\ObjectManager\Code\Generator\SampleRepository::class, + \Magento\Framework\ObjectManager\Code\Generator\Sample::class, + 'SampleRepository' + ], + [ + \Magento\Framework\ObjectManager\Code\Generator\TSampleRepository::class, + \Magento\Framework\ObjectManager\Code\Generator\TSample::class, + 'TSampleRepository' + ], + ]; } /** diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleProxy.txt b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleProxy.txt index 43c99aa5e6843..7dd1265044846 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleProxy.txt +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleProxy.txt @@ -3,7 +3,7 @@ namespace Magento\Framework\ObjectManager\Code\Generator; /** * Proxy class for @see \Magento\Framework\ObjectManager\Code\Generator\Sample */ -class Sample_Proxy extends \Magento\Framework\ObjectManager\Code\Generator\Sample implements \Magento\Framework\ObjectManager\NoninterceptableInterface +class Sample_Proxy extends Sample implements \Magento\Framework\ObjectManager\NoninterceptableInterface { /** * Object Manager instance diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepository.txt b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepository.txt index 6742795930307..1f1153c1262b0 100644 --- a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepository.txt +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepository.txt @@ -3,7 +3,7 @@ namespace Magento\Framework\ObjectManager\Code\Generator; /** * Repository class for @see \Magento\Framework\ObjectManager\Code\Generator\SampleInterface */ -class SampleRepository implements \Magento\Framework\ObjectManager\Code\Generator\SampleRepositoryInterface +class SampleRepository implements SampleRepositoryInterface { /** * sampleInterfacePersistor diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepositoryInterface.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepositoryInterface.php new file mode 100644 index 0000000000000..0bc899f580071 --- /dev/null +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/SampleRepositoryInterface.php @@ -0,0 +1,17 @@ +tSampleInterfacePersistor = $tSampleInterfacePersistor; + $this->tSampleInterfaceSearchResultFactory = $tSampleInterfaceSearchResultFactory; + $this->extensionAttributesJoinProcessor = $extensionAttributesJoinProcessor; + } + + /** + * load entity + * + * @param int $id + * @return \Magento\Framework\ObjectManager\Code\Generator\TSampleInterface + * @throws \Magento\Framework\Exception\InputException + * @throws \Magento\Framework\Exception\NoSuchEntityException + */ + public function get(int $id) : \Magento\Framework\ObjectManager\Code\Generator\TSampleInterface + { + if (!$id) { + throw new \Magento\Framework\Exception\InputException('ID required'); + } + if (!isset($this->registry[$id])) { + $entity = $this->tSampleInterfacePersistor->loadEntity($id); + if (!$entity->getId()) { + throw new \Magento\Framework\Exception\NoSuchEntityException('Requested entity doesn\'t exist'); + } + $this->registry[$id] = $entity; + } + return $this->registry[$id]; + } + + /** + * Register entity to create + * + * @param array $data + * @return \Magento\Framework\ObjectManager\Code\Generator\TSampleInterface + */ + public function create(\Magento\Framework\ObjectManager\Code\Generator\TSampleInterface $entity) + { + return $this->tSampleInterfacePersistor->registerNew($entity); + } + + /** + * Register entity to create + * + * @param array $data + * @return \Magento\Framework\ObjectManager\Code\Generator\TSampleRepository + */ + public function createFromArray(array $data) + { + return $this->tSampleInterfacePersistor->registerFromArray($data); + } + + /** + * Find entities by criteria + * + * @param \Magento\Framework\Api\SearchCriteriaInterface $searchCriteria + * @return \Magento\Framework\ObjectManager\Code\Generator\TSampleInterface[] + */ + public function getList(\Magento\Framework\Api\SearchCriteriaInterface $searchCriteria) + { + $collection = $this->tSampleInterfaceSearchResultFactory->create(); + $this->extensionAttributesJoinProcessor->process($collection); + $this->getCollectionProcessor()->process($searchCriteria, $collection); + return $collection; + } + + /** + * Register entity to delete + * + * @param \Magento\Framework\ObjectManager\Code\Generator\TSampleInterface $entity + */ + public function remove(\Magento\Framework\ObjectManager\Code\Generator\TSampleInterface $entity) + { + $this->tSampleInterfacePersistor->registerDeleted($entity); + } + + /** + * Register entity to delete + * + * @param \Magento\Framework\ObjectManager\Code\Generator\TSampleInterface $entity + * @return bool + */ + public function delete(\Magento\Framework\ObjectManager\Code\Generator\TSampleInterface $entity) : bool + { + $this->tSampleInterfacePersistor->registerDeleted($entity); + return $this->tSampleInterfacePersistor->doPersistEntity($entity); + } + + /** + * Delete entity by Id + * + * @param int $id + * @return bool + */ + public function deleteById($id) + { + $entity = $this->get($id); + $this->tSampleInterfacePersistor->registerDeleted($entity); + return $this->tSampleInterfacePersistor->doPersistEntity($entity); + } + + /** + * Perform persist operations + */ + public function flush() + { + $ids = $this->tSampleInterfacePersistor->doPersist(); + foreach ($ids as $id) { + unset($this->registry[$id]); + } + } + + /** + * Perform persist operations for one entity + * + * @param \Magento\Framework\ObjectManager\Code\Generator\TSampleInterface $entity + * @return \Magento\Framework\ObjectManager\Code\Generator\TSampleInterface + */ + public function save(\Magento\Framework\ObjectManager\Code\Generator\TSampleInterface $entity) : \Magento\Framework\ObjectManager\Code\Generator\TSampleInterface + { + $this->tSampleInterfacePersistor->doPersistEntity($entity); + return $entity; + } + + /** + * Retrieve collection processor + * + * @deprecated + * @return \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface + */ + private function getCollectionProcessor() + { + if (!$this->collectionProcessor) { + $this->collectionProcessor = \Magento\Framework\App\ObjectManager::getInstance()->get( + \Magento\Framework\Api\SearchCriteria\CollectionProcessorInterface::class + ); + } + return $this->collectionProcessor; + } +} diff --git a/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/TSampleRepositoryInterface.php b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/TSampleRepositoryInterface.php new file mode 100644 index 0000000000000..99ab4ecadcd41 --- /dev/null +++ b/lib/internal/Magento/Framework/ObjectManager/Test/Unit/Code/Generator/_files/TSampleRepositoryInterface.php @@ -0,0 +1,16 @@ +getType(); - if ($param->getType() == 'null') { + $type = $param->detectType(); + if ($type == 'null') { throw new \LogicException(sprintf( '@param annotation is incorrect for the parameter "%s" in the method "%s:%s".' . ' First declared type should not be null. E.g. string|null', diff --git a/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php b/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php index bd930a3d3829e..12d538aeb9e67 100644 --- a/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php +++ b/lib/internal/Magento/Framework/Webapi/ServiceInputProcessor.php @@ -146,6 +146,9 @@ public function process($serviceClassName, $serviceMethodName, array $inputArray protected function _createFromArray($className, $data) { $data = is_array($data) ? $data : []; + // convert to string directly to avoid situations when $className is object + // which implements __toString method like \ReflectionObject + $className = (string) $className; $class = new ClassReflection($className); if (is_subclass_of($className, self::EXTENSION_ATTRIBUTES_TYPE)) { $className = substr($className, 0, -strlen('Interface')); diff --git a/setup/config/application.config.php b/setup/config/application.config.php index fe2d94e2a2326..e7efd12023df4 100644 --- a/setup/config/application.config.php +++ b/setup/config/application.config.php @@ -5,6 +5,8 @@ */ use Magento\Setup\Mvc\Bootstrap\InitParamListener; +use Zend\Mvc\Service\DiAbstractServiceFactoryFactory; +use Zend\ServiceManager\Di\DiAbstractServiceFactory; return [ 'modules' => [ @@ -18,10 +20,17 @@ __DIR__ . '/autoload/{,*.}{global,local}.php', ], ], - 'listeners' => [\Magento\Setup\Mvc\Bootstrap\InitParamListener::class], + 'listeners' => [ + InitParamListener::class + ], 'service_manager' => [ 'factories' => [ - InitParamListener::BOOTSTRAP_PARAM => \Magento\Setup\Mvc\Bootstrap\InitParamListener::class, + DiAbstractServiceFactory::class => DiAbstractServiceFactoryFactory::class, + InitParamListener::BOOTSTRAP_PARAM => InitParamListener::class, ], ], + // list of Magento specific required services, like default abstract factory + 'required_services' => [ + DiAbstractServiceFactory::class + ] ]; diff --git a/setup/config/di.config.php b/setup/config/di.config.php index 7237f8fdebcd7..d43a1e569c204 100644 --- a/setup/config/di.config.php +++ b/setup/config/di.config.php @@ -48,7 +48,7 @@ 'instance' => [ 'preference' => [ \Zend\EventManager\EventManagerInterface::class => 'EventManager', - \Zend\ServiceManager\ServiceLocatorInterface::class => 'ServiceManager', + \Zend\ServiceManager\ServiceLocatorInterface::class => \Zend\ServiceManager\ServiceManager::class, \Magento\Framework\DB\LoggerInterface::class => \Magento\Framework\DB\Logger\Quiet::class, \Magento\Framework\Locale\ConfigInterface::class => \Magento\Framework\Locale\Config::class, \Magento\Framework\Filesystem\DriverInterface::class => diff --git a/setup/index.php b/setup/index.php index cf74b2319c6c5..108069395e079 100644 --- a/setup/index.php +++ b/setup/index.php @@ -3,6 +3,7 @@ * Copyright © Magento, Inc. All rights reserved. * See COPYING.txt for license details. */ +use Magento\Setup\Application; if (PHP_SAPI == 'cli') { echo "You cannot run this from the command line." . PHP_EOL . @@ -28,4 +29,7 @@ $handler = new \Magento\Framework\App\ErrorHandler(); set_error_handler([$handler, 'handler']); -\Zend\Mvc\Application::init(require __DIR__ . '/config/application.config.php')->run(); +$configuration = require __DIR__ . '/config/application.config.php'; +$bootstrap = new Application(); +$application = $bootstrap->bootstrap($configuration); +$application->run(); diff --git a/setup/src/Magento/Setup/Application.php b/setup/src/Magento/Setup/Application.php new file mode 100644 index 0000000000000..c5b0d3afbc217 --- /dev/null +++ b/setup/src/Magento/Setup/Application.php @@ -0,0 +1,79 @@ +configureServiceManager($serviceManager); + $serviceManager->setService('ApplicationConfig', $configuration); + + $serviceManager->get('ModuleManager')->loadModules(); + + // load specific services + if (!empty($configuration['required_services'])) { + $this->loadServices($serviceManager, $configuration['required_services']); + } + + $listeners = $this->getListeners($serviceManager, $configuration); + $application = new ZendApplication($configuration, $serviceManager); + $application->bootstrap($listeners); + return $application; + } + + /** + * Uses \Zend\ServiceManager\ServiceManager::get method to load different kind of services. + * Some services cannot be loaded via configuration like \Zend\ServiceManager\Di\DiAbstractServiceFactory and + * should be initialized via corresponding factory. + * + * @param ServiceManager $serviceManager + * @param array $services + * @return void + */ + private function loadServices(ServiceManager $serviceManager, array $services) + { + foreach ($services as $serviceName) { + $serviceManager->get($serviceName); + } + } + + /** + * Gets list of application listeners. + * + * @param ServiceManager $serviceManager + * @param array $configuration + * @return array + */ + private function getListeners(ServiceManager $serviceManager, array $configuration) + { + $appConfigListeners = isset($configuration['listeners']) ? $configuration['listeners'] : []; + $config = $serviceManager->get('config'); + $serviceConfigListeners = isset($config['listeners']) ? $config['listeners'] : []; + + return array_unique(array_merge($serviceConfigListeners, $appConfigListeners)); + } +} diff --git a/setup/src/Magento/Setup/Console/CommandList.php b/setup/src/Magento/Setup/Console/CommandList.php index 469a66bf5d798..39f383806c6c4 100644 --- a/setup/src/Magento/Setup/Console/CommandList.php +++ b/setup/src/Magento/Setup/Console/CommandList.php @@ -88,7 +88,7 @@ public function getCommands() foreach ($this->getCommandsClasses() as $class) { if (class_exists($class)) { - $commands[] = $this->serviceManager->create($class); + $commands[] = $this->serviceManager->get($class); } else { throw new \Exception('Class ' . $class . ' does not exist'); } diff --git a/setup/src/Magento/Setup/Module.php b/setup/src/Magento/Setup/Module.php index 467fd5eec317a..6bccf8b3622b2 100644 --- a/setup/src/Magento/Setup/Module.php +++ b/setup/src/Magento/Setup/Module.php @@ -52,7 +52,8 @@ public function onBootstrap(EventInterface $e) $headers->addHeaderLine('Expires', '1970-01-01'); $headers->addHeaderLine('X-Frame-Options: SAMEORIGIN'); $headers->addHeaderLine('X-Content-Type-Options: nosniff'); - $xssHeaderValue = strpos($_SERVER['HTTP_USER_AGENT'], XssProtection::IE_8_USER_AGENT) === false + $xssHeaderValue = !empty($_SERVER['HTTP_USER_AGENT']) + && strpos($_SERVER['HTTP_USER_AGENT'], XssProtection::IE_8_USER_AGENT) === false ? XssProtection::HEADER_ENABLED : XssProtection::HEADER_DISABLED; $headers->addHeaderLine('X-XSS-Protection: ' . $xssHeaderValue); } diff --git a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php index 6b22a81c02569..a773e16ba7558 100644 --- a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php +++ b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php @@ -6,6 +6,8 @@ namespace Magento\Setup\Mvc\Bootstrap; +use Interop\Container\ContainerInterface; +use Interop\Container\Exception\ContainerException; use Magento\Framework\App\Bootstrap as AppBootstrap; use Magento\Framework\App\Filesystem\DirectoryList; use Magento\Framework\App\Request\Http; @@ -17,7 +19,9 @@ use Zend\EventManager\ListenerAggregateInterface; use Zend\Mvc\Application; use Zend\Mvc\MvcEvent; -use Zend\Mvc\Router\Http\RouteMatch; +use Zend\Router\Http\RouteMatch; +use Zend\ServiceManager\Exception\ServiceNotCreatedException; +use Zend\ServiceManager\Exception\ServiceNotFoundException; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; use Zend\Stdlib\RequestInterface; @@ -54,11 +58,11 @@ class InitParamListener implements ListenerAggregateInterface, FactoryInterface /** * {@inheritdoc} */ - public function attach(EventManagerInterface $events) + public function attach(EventManagerInterface $events, $priority = 1) { $sharedEvents = $events->getSharedManager(); $this->listeners[] = $sharedEvents->attach( - \Zend\Mvc\Application::class, + Application::class, MvcEvent::EVENT_BOOTSTRAP, [$this, 'onBootstrap'] ); diff --git a/setup/src/Magento/Setup/Test/Unit/Console/CommandListTest.php b/setup/src/Magento/Setup/Test/Unit/Console/CommandListTest.php index f39a833915d23..621a5a547b970 100644 --- a/setup/src/Magento/Setup/Test/Unit/Console/CommandListTest.php +++ b/setup/src/Magento/Setup/Test/Unit/Console/CommandListTest.php @@ -29,7 +29,7 @@ public function setUp() public function testGetCommands() { $this->serviceManager->expects($this->atLeastOnce()) - ->method('create'); + ->method('get'); $this->commandList->getCommands(); } From 502c95690f66513dff90afb54bdce0225706782c Mon Sep 17 00:00:00 2001 From: Ievgen Sentiabov Date: Thu, 27 Apr 2017 13:50:42 +0300 Subject: [PATCH 2/3] MAGETWO-59661: [Github] PHP7 returns types incompatible with generate code #6106 - Updated reference blacklist - Added method description for event listener --- .../Magento/Test/Integrity/_files/blacklist/reference.txt | 3 --- .../src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php | 7 ++++++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt index 92c996a50714f..8c1d69957636a 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt @@ -104,9 +104,6 @@ DoubleColon \Magento\Framework\ObjectManager\Code\Generator\Sample\Repository \Magento\Framework\ObjectManager\Code\Generator\SampleConverter \Magento\Observer -\Magento\Framework\MessageQueue\Model\TestConsumer -\Magento\Framework\MessageQueue\Code\Generator\TInterface -\Magento\Framework\MessageQueue\Code\Generator\TSearchResultsInterface \Magento\Catalog\Api\Data\Product \Magento\Framework\ObjectManager\Code\Generator\Sample \Magento\Framework\ObjectManager\Code\Generator\Sample diff --git a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php index a773e16ba7558..f18a683d631d2 100644 --- a/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php +++ b/setup/src/Magento/Setup/Mvc/Bootstrap/InitParamListener.php @@ -57,6 +57,10 @@ class InitParamListener implements ListenerAggregateInterface, FactoryInterface /** * {@inheritdoc} + * + * The $priority argument is added to support latest versions of Zend Event Manager. + * Starting from Zend Event Manager 3.0.0 release the ListenerAggregateInterface::attach() + * supports the `priority` argument. */ public function attach(EventManagerInterface $events, $priority = 1) { @@ -64,7 +68,8 @@ public function attach(EventManagerInterface $events, $priority = 1) $this->listeners[] = $sharedEvents->attach( Application::class, MvcEvent::EVENT_BOOTSTRAP, - [$this, 'onBootstrap'] + [$this, 'onBootstrap'], + $priority ); } From 431820d5dcb6aefd3abf15f2c9d8195efef5f1b6 Mon Sep 17 00:00:00 2001 From: Ievgen Sentiabov Date: Thu, 27 Apr 2017 14:12:53 +0300 Subject: [PATCH 3/3] MAGETWO-59661: [Github] PHP7 returns types incompatible with generate code #6106 - Reverted blacklist changes --- .../Magento/Test/Integrity/_files/blacklist/reference.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt index 8c1d69957636a..92c996a50714f 100644 --- a/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt +++ b/dev/tests/static/testsuite/Magento/Test/Integrity/_files/blacklist/reference.txt @@ -104,6 +104,9 @@ DoubleColon \Magento\Framework\ObjectManager\Code\Generator\Sample\Repository \Magento\Framework\ObjectManager\Code\Generator\SampleConverter \Magento\Observer +\Magento\Framework\MessageQueue\Model\TestConsumer +\Magento\Framework\MessageQueue\Code\Generator\TInterface +\Magento\Framework\MessageQueue\Code\Generator\TSearchResultsInterface \Magento\Catalog\Api\Data\Product \Magento\Framework\ObjectManager\Code\Generator\Sample \Magento\Framework\ObjectManager\Code\Generator\Sample