diff --git a/Module.php b/Module.php index 1d540cb5e06e683237ca6a8145e919c343d4cba3..66d741736b3ebcd1bb55315688b74d98a08f9cf4 100644 --- a/Module.php +++ b/Module.php @@ -90,7 +90,7 @@ class Module implements AutoloaderProviderInterface, ConfigProviderInterface, Se */ private function reconfigureRoutesForAuth(ServiceLocatorInterface $sl) { - /* @var $router \Zend\Mvc\Router\Http\TreeRouteStack */ + /* @var $router \Zend\Router\Http\TreeRouteStack */ $router = $sl->get('router'); // si l'auth CAS est activée, modif de la route de connexion pour zapper le formulaire d'auth maison. @@ -118,7 +118,21 @@ class Module implements AutoloaderProviderInterface, ConfigProviderInterface, Se public function getServiceConfig() { return [ + //========== repris du module zf-commons/zfc-user-doctrine-orm abandonné ========= + 'aliases' => array( + 'zfcuser_doctrine_em' => 'Doctrine\ORM\EntityManager', + ), + //=========================================== + + 'factories' => [ + //========== repris du module zf-commons/zfc-user-doctrine-orm abandonné ========= + 'zfcuser_module_options' => function ($sm) { + $config = $sm->get('Configuration'); + return new Options\ModuleOptions(isset($config['zfcuser']) ? $config['zfcuser'] : array()); + }, + //=========================================== + // verrue pour forcer le label de l'identifiant qqsoit l'options 'auth_identity_fields' 'zfcuser_login_form' => function ($sm) { $options = $sm->get('zfcuser_module_options'); diff --git a/composer.json b/composer.json index 1ca73c4a0d7d0ddf5436c1b0ad1e7ed8a58dc3f9..6181042eac84a087e23024496da56feba40bd1a2 100644 --- a/composer.json +++ b/composer.json @@ -8,18 +8,16 @@ } ], "require": { - "unicaen/app": "^1.3", - "zf-commons/zfc-user-doctrine-orm": ">=0.1", - "jasig/phpcas": ">=1.3.3", - "bjyoungblood/bjy-authorize": ">=1.4", - "ramsey/uuid": "^3.7", - "beberlei/assert": "^2.9" + "unicaen/app": "dev-zf-3.x", + "unicaen/bjy-authorize": "dev-zf-3.x", + "jasig/phpcas": "^1.3", + "ramsey/uuid": "^3.7" }, "require-dev": { - "phpunit/PHPUnit": ">=3.7" + "phpunit/phpunit": "^5.6" }, "autoload": { - "psr-0": { + "psr-0": { "UnicaenAuth": "src/", "UnicaenAuthTest": "tests/" }, diff --git a/composer.lock b/composer.lock index d77d27407bc52e6aa64498c441d1a63bb7672128..8076f855ae8a4680a4359794a1ddfd7cf727b5e8 100644 --- a/composer.lock +++ b/composer.lock @@ -4,160 +4,65 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "44f1489d620f9c9ce80c22ec19908180", + "content-hash": "645905181831845b2ea4799ccdd6e7d1", "packages": [ { - "name": "beberlei/assert", - "version": "v2.9.6", + "name": "container-interop/container-interop", + "version": "1.2.0", "source": { "type": "git", - "url": "https://github.com/beberlei/assert.git", - "reference": "ec9e4cf0b63890edce844ee3922e2b95a526e936" + "url": "https://github.com/container-interop/container-interop.git", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/beberlei/assert/zipball/ec9e4cf0b63890edce844ee3922e2b95a526e936", - "reference": "ec9e4cf0b63890edce844ee3922e2b95a526e936", + "url": "https://api.github.com/repos/container-interop/container-interop/zipball/79cbf1341c22ec75643d841642dd5d6acd83bdb8", + "reference": "79cbf1341c22ec75643d841642dd5d6acd83bdb8", "shasum": "" }, "require": { - "ext-mbstring": "*", - "php": ">=5.3" - }, - "require-dev": { - "friendsofphp/php-cs-fixer": "^2.1.1", - "phpunit/phpunit": "^4.8.35|^5.7" + "psr/container": "^1.0" }, "type": "library", "autoload": { "psr-4": { - "Assert\\": "lib/Assert" - }, - "files": [ - "lib/Assert/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de", - "role": "Lead Developer" - }, - { - "name": "Richard Quadling", - "email": "rquadling@gmail.com", - "role": "Collaborator" - } - ], - "description": "Thin assertion library for input validation in business models.", - "keywords": [ - "assert", - "assertion", - "validation" - ], - "time": "2018-06-11T17:15:25+00:00" - }, - { - "name": "bjyoungblood/bjy-authorize", - "version": "1.4.0", - "source": { - "type": "git", - "url": "https://github.com/bjyoungblood/BjyAuthorize.git", - "reference": "02723bd19f0bba33649d708022f8d0e0b795f57a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/bjyoungblood/BjyAuthorize/zipball/02723bd19f0bba33649d708022f8d0e0b795f57a", - "reference": "02723bd19f0bba33649d708022f8d0e0b795f57a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "zendframework/zend-cache": "~2.1", - "zendframework/zend-eventmanager": "~2.1", - "zendframework/zend-http": "~2.1", - "zendframework/zend-mvc": "~2.1", - "zendframework/zend-permissions-acl": "~2.1", - "zendframework/zend-servicemanager": "~2.1", - "zendframework/zend-view": "~2.1" - }, - "require-dev": { - "doctrine/common": ">=2.3,<2.5-dev", - "phpunit/phpunit": "~3.7", - "satooshi/php-coveralls": "~0.6", - "squizlabs/php_codesniffer": "1.4.*", - "zendframework/zend-developer-tools": "0.*", - "zf-commons/zfc-user": "0.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4-dev" - } - }, - "autoload": { - "psr-0": { - "BjyAuthorize\\": "src/" + "Interop\\Container\\": "src/Interop/Container/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/", - "role": "Developer" - }, - { - "name": "Ben Youngblood", - "email": "bx.youngblood@gmail.com", - "homepage": "http://bjyoungblood.com/", - "role": "Developer" - } - ], - "description": "Zend\\Acl based firewall system for ZF2 dispatch protection", - "homepage": "https://github.com/bjyoungblood/BjyAuthorize", - "keywords": [ - "acl", - "zf2", - "zfc-user" + "MIT" ], - "abandoned": true, - "time": "2013-07-05T11:59:46+00:00" + "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", + "homepage": "https://github.com/container-interop/container-interop", + "time": "2017-02-14T19:40:03+00:00" }, { "name": "doctrine/annotations", - "version": "v1.4.0", + "version": "v1.6.0", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "54cacc9b81758b14e3ce750f205a393d52339e97" + "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/54cacc9b81758b14e3ce750f205a393d52339e97", - "reference": "54cacc9b81758b14e3ce750f205a393d52339e97", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", + "reference": "c7f2050c68a9ab0bdb0f98567ec08d80ea7d24d5", "shasum": "" }, "require": { "doctrine/lexer": "1.*", - "php": "^5.6 || ^7.0" + "php": "^7.1" }, "require-dev": { "doctrine/cache": "1.*", - "phpunit/phpunit": "^5.7" + "phpunit/phpunit": "^6.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "1.6.x-dev" } }, "autoload": { @@ -198,37 +103,42 @@ "docblock", "parser" ], - "time": "2017-02-24T16:22:25+00:00" + "time": "2017-12-06T07:11:42+00:00" }, { "name": "doctrine/cache", - "version": "v1.6.2", + "version": "v1.8.0", "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b" + "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/eb152c5100571c7a45470ff2a35095ab3f3b900b", - "reference": "eb152c5100571c7a45470ff2a35095ab3f3b900b", + "url": "https://api.github.com/repos/doctrine/cache/zipball/d768d58baee9a4862ca783840eca1b9add7a7f57", + "reference": "d768d58baee9a4862ca783840eca1b9add7a7f57", "shasum": "" }, "require": { - "php": "~5.5|~7.0" + "php": "~7.1" }, "conflict": { "doctrine/common": ">2.2,<2.4" }, "require-dev": { - "phpunit/phpunit": "~4.8|~5.0", - "predis/predis": "~1.0", - "satooshi/php-coveralls": "~0.6" + "alcaeus/mongo-php-adapter": "^1.1", + "doctrine/coding-standard": "^4.0", + "mongodb/mongodb": "^1.1", + "phpunit/phpunit": "^7.0", + "predis/predis": "~1.0" + }, + "suggest": { + "alcaeus/mongo-php-adapter": "Required to use legacy MongoDB driver" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.6.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -263,29 +173,29 @@ } ], "description": "Caching library offering an object-oriented API for many cache backends", - "homepage": "http://www.doctrine-project.org", + "homepage": "https://www.doctrine-project.org", "keywords": [ "cache", "caching" ], - "time": "2017-07-22T12:49:21+00:00" + "time": "2018-08-21T18:01:43+00:00" }, { "name": "doctrine/collections", - "version": "v1.4.0", + "version": "v1.5.0", "source": { "type": "git", "url": "https://github.com/doctrine/collections.git", - "reference": "1a4fb7e902202c33cce8c55989b945612943c2ba" + "reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/1a4fb7e902202c33cce8c55989b945612943c2ba", - "reference": "1a4fb7e902202c33cce8c55989b945612943c2ba", + "url": "https://api.github.com/repos/doctrine/collections/zipball/a01ee38fcd999f34d9bfbcee59dbda5105449cbf", + "reference": "a01ee38fcd999f34d9bfbcee59dbda5105449cbf", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.1" }, "require-dev": { "doctrine/coding-standard": "~0.1@dev", @@ -335,37 +245,43 @@ "collections", "iterator" ], - "time": "2017-01-03T10:49:41+00:00" + "time": "2017-07-22T10:37:32+00:00" }, { "name": "doctrine/common", - "version": "v2.7.3", + "version": "v2.10.0", "source": { "type": "git", "url": "https://github.com/doctrine/common.git", - "reference": "4acb8f89626baafede6ee5475bc5844096eba8a9" + "reference": "30e33f60f64deec87df728c02b107f82cdafad9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/4acb8f89626baafede6ee5475bc5844096eba8a9", - "reference": "4acb8f89626baafede6ee5475bc5844096eba8a9", + "url": "https://api.github.com/repos/doctrine/common/zipball/30e33f60f64deec87df728c02b107f82cdafad9d", + "reference": "30e33f60f64deec87df728c02b107f82cdafad9d", "shasum": "" }, "require": { - "doctrine/annotations": "1.*", - "doctrine/cache": "1.*", - "doctrine/collections": "1.*", - "doctrine/inflector": "1.*", - "doctrine/lexer": "1.*", - "php": "~5.6|~7.0" + "doctrine/annotations": "^1.0", + "doctrine/cache": "^1.0", + "doctrine/collections": "^1.0", + "doctrine/event-manager": "^1.0", + "doctrine/inflector": "^1.0", + "doctrine/lexer": "^1.0", + "doctrine/persistence": "^1.1", + "doctrine/reflection": "^1.0", + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "^5.4.6" + "doctrine/coding-standard": "^1.0", + "phpunit/phpunit": "^6.3", + "squizlabs/php_codesniffer": "^3.0", + "symfony/phpunit-bridge": "^4.0.5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.7.x-dev" + "dev-master": "2.10.x-dev" } }, "autoload": { @@ -397,40 +313,48 @@ { "name": "Johannes Schmitt", "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" } ], - "description": "Common Library for Doctrine projects", - "homepage": "http://www.doctrine-project.org", + "description": "PHP Doctrine Common project is a library that provides additional functionality that other Doctrine projects depend on such as better reflection support, persistence interfaces, proxies, event system and much more.", + "homepage": "https://www.doctrine-project.org/projects/common.html", "keywords": [ - "annotations", - "collections", - "eventmanager", - "persistence", - "spl" + "common", + "doctrine", + "php" ], - "time": "2017-07-22T08:35:12+00:00" + "time": "2018-11-21T01:24:55+00:00" }, { "name": "doctrine/dbal", - "version": "v2.5.13", + "version": "v2.9.2", "source": { "type": "git", "url": "https://github.com/doctrine/dbal.git", - "reference": "729340d8d1eec8f01bff708e12e449a3415af873" + "reference": "22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/729340d8d1eec8f01bff708e12e449a3415af873", - "reference": "729340d8d1eec8f01bff708e12e449a3415af873", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9", + "reference": "22800bd651c1d8d2a9719e2a3dc46d5108ebfcc9", "shasum": "" }, "require": { - "doctrine/common": ">=2.4,<2.8-dev", - "php": ">=5.3.2" + "doctrine/cache": "^1.0", + "doctrine/event-manager": "^1.0", + "ext-pdo": "*", + "php": "^7.1" }, "require-dev": { - "phpunit/phpunit": "4.*", - "symfony/console": "2.*||^3.0" + "doctrine/coding-standard": "^5.0", + "jetbrains/phpstorm-stubs": "^2018.1.2", + "phpstan/phpstan": "^0.10.1", + "phpunit/phpunit": "^7.4", + "symfony/console": "^2.0.5|^3.0|^4.0", + "symfony/phpunit-bridge": "^3.4.5|^4.0.5" }, "suggest": { "symfony/console": "For helpful console commands such as SQL execution and import of files." @@ -441,12 +365,13 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5.x-dev" + "dev-master": "2.9.x-dev", + "dev-develop": "3.0.x-dev" } }, "autoload": { - "psr-0": { - "Doctrine\\DBAL\\": "lib/" + "psr-4": { + "Doctrine\\DBAL\\": "lib/Doctrine/DBAL" } }, "notification-url": "https://packagist.org/downloads/", @@ -471,55 +396,73 @@ "email": "jonwage@gmail.com" } ], - "description": "Database Abstraction Layer", - "homepage": "http://www.doctrine-project.org", + "description": "Powerful PHP database abstraction layer (DBAL) with many features for database schema introspection and management.", + "homepage": "https://www.doctrine-project.org/projects/dbal.html", "keywords": [ + "abstraction", "database", "dbal", + "mysql", "persistence", + "pgsql", + "php", "queryobject" ], - "time": "2017-07-22T20:44:48+00:00" + "time": "2018-12-31T03:27:51+00:00" }, { "name": "doctrine/doctrine-module", - "version": "1.0.1", + "version": "1.2.0", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineModule.git", - "reference": "ade6c1667283e3d8131d40e79c427b8a8100e7d3" + "reference": "9407d04d0b08e7071dab05c9d068cefda9dc5a6f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineModule/zipball/ade6c1667283e3d8131d40e79c427b8a8100e7d3", - "reference": "ade6c1667283e3d8131d40e79c427b8a8100e7d3", + "url": "https://api.github.com/repos/doctrine/DoctrineModule/zipball/9407d04d0b08e7071dab05c9d068cefda9dc5a6f", + "reference": "9407d04d0b08e7071dab05c9d068cefda9dc5a6f", "shasum": "" }, "require": { - "doctrine/cache": "~1.5", - "doctrine/common": "~2.6", - "php": "^5.5 || ^7.0", - "symfony/console": "~2.3|~3.0", - "zendframework/zend-authentication": "~2.3", - "zendframework/zend-cache": "~2.3", - "zendframework/zend-mvc": "~2.3", - "zendframework/zend-paginator": "~2.3", - "zendframework/zend-servicemanager": "~2.3", - "zendframework/zend-stdlib": "~2.3", - "zendframework/zend-validator": "~2.3" + "doctrine/cache": "^1.6", + "doctrine/common": "^2.6.1", + "php": "^5.6 || ^7.0", + "symfony/console": "^2.3 || ^3.0", + "zendframework/zend-authentication": "^2.5.3", + "zendframework/zend-cache": "^2.7.1", + "zendframework/zend-form": "^2.9", + "zendframework/zend-hydrator": "^1.1 || ^2.2.1", + "zendframework/zend-mvc": "^2.7.10 || ^3.0.1", + "zendframework/zend-paginator": "^2.7", + "zendframework/zend-servicemanager": "^2.7.6 || ^3.1", + "zendframework/zend-stdlib": "^2.7.7 || ^3.0.1", + "zendframework/zend-validator": "^2.8.1" }, "require-dev": { - "doctrine/coding-standard": "dev-master", - "phpunit/phpunit": "~4.0", - "zendframework/zendframework": "~2.3" + "phpunit/phpunit": "^4.8", + "squizlabs/php_codesniffer": "^2.6.2", + "zendframework/zend-i18n": "^2.7.3", + "zendframework/zend-log": "^2.9", + "zendframework/zend-modulemanager": "^2.7.2", + "zendframework/zend-serializer": "^2.8", + "zendframework/zend-session": "^2.7.3", + "zendframework/zend-test": "^2.6.1 || ^3.0.1", + "zendframework/zend-version": "^2.5.1" }, "suggest": { - "doctrine/data-fixtures": "Data Fixtures if you want to generate test data or bootstrap data for your deployments" + "doctrine/data-fixtures": "Data Fixtures if you want to generate test data or bootstrap data for your deployments", + "zendframework/zend-mvc-console": "^1.1.10 if you are using ZF3" }, "bin": [ "bin/doctrine-module" ], "type": "library", + "extra": { + "zf": { + "module": "DoctrineModule" + } + }, "autoload": { "psr-0": { "DoctrineModule\\": "src/" @@ -550,46 +493,51 @@ "homepage": "http://marco-pivetta.com/" } ], - "description": "Zend Framework 2 Module that provides Doctrine basic functionality required for ORM and ODM modules", + "description": "Zend Framework Module that provides Doctrine basic functionality required for ORM and ODM modules", "homepage": "http://www.doctrine-project.org/", "keywords": [ "doctrine", "module", - "zf2" + "zf" ], - "time": "2016-03-21T22:50:01+00:00" + "time": "2016-10-03T19:40:55+00:00" }, { "name": "doctrine/doctrine-orm-module", - "version": "0.10.0", + "version": "1.1.8", "source": { "type": "git", "url": "https://github.com/doctrine/DoctrineORMModule.git", - "reference": "50808eb795d00aac6a551023b1bb379de054f9b5" + "reference": "d0ff7aaa1c4eabf4bab2a6ae73317c34330467c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/DoctrineORMModule/zipball/50808eb795d00aac6a551023b1bb379de054f9b5", - "reference": "50808eb795d00aac6a551023b1bb379de054f9b5", + "url": "https://api.github.com/repos/doctrine/DoctrineORMModule/zipball/d0ff7aaa1c4eabf4bab2a6ae73317c34330467c3", + "reference": "d0ff7aaa1c4eabf4bab2a6ae73317c34330467c3", "shasum": "" }, "require": { - "doctrine/dbal": ">=2.4,<2.7", - "doctrine/doctrine-module": "~1.0", - "doctrine/orm": ">=2.5,<2.7", - "php": "^5.5 || ^7.0", - "symfony/console": "~2.5|~3.0", - "zendframework/zend-mvc": "~2.3", - "zendframework/zend-servicemanager": "~2.3", - "zendframework/zend-stdlib": "~2.3" + "doctrine/dbal": "^2.6.0", + "doctrine/doctrine-module": "^1.2", + "doctrine/orm": "^2.6.0", + "php": "^7.1", + "symfony/console": "^2.3 || ^3.0 || ^4.0", + "zendframework/zend-hydrator": "^1.1 || ^2.2.1", + "zendframework/zend-mvc": "^2.7.10 || ^3.0.1", + "zendframework/zend-servicemanager": "^2.7.6 || ^3.1", + "zendframework/zend-stdlib": "^2.7.7 || ^3.0.1" }, "require-dev": { - "doctrine/data-fixtures": "1.0.*", - "doctrine/migrations": "1.0.*@dev", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2", - "zendframework/zend-developer-tools": "*", - "zendframework/zendframework": "~2.3" + "doctrine/data-fixtures": "^1.2.1", + "doctrine/migrations": "^1.4.1", + "phpunit/phpunit": "^6.5", + "squizlabs/php_codesniffer": "^2.7", + "zendframework/zend-console": "^2.6", + "zendframework/zend-developer-tools": "^1.1", + "zendframework/zend-i18n": "^2.7.3", + "zendframework/zend-log": "^2.9", + "zendframework/zend-modulemanager": "^2.7.2", + "zendframework/zend-serializer": "^2.8" }, "suggest": { "doctrine/migrations": "doctrine migrations if you want to keep your schema definitions versioned", @@ -597,6 +545,11 @@ "zendframework/zend-form": "if you want to use form elements backed by Doctrine" }, "type": "library", + "extra": { + "zf": { + "module": "DoctrineORMModule" + } + }, "autoload": { "psr-0": { "DoctrineORMModule\\": "src/" @@ -627,32 +580,106 @@ "homepage": "http://marco-pivetta.com/" } ], - "description": "Zend Framework 2 Module that provides Doctrine ORM functionality", + "description": "Zend Framework Module that provides Doctrine ORM functionality", "homepage": "http://www.doctrine-project.org/", "keywords": [ "doctrine", "module", "orm", - "zf2" + "zf" + ], + "time": "2018-04-15T22:58:02+00:00" + }, + { + "name": "doctrine/event-manager", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/event-manager.git", + "reference": "a520bc093a0170feeb6b14e9d83f3a14452e64b3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/event-manager/zipball/a520bc093a0170feeb6b14e9d83f3a14452e64b3", + "reference": "a520bc093a0170feeb6b14e9d83f3a14452e64b3", + "shasum": "" + }, + "require": { + "php": "^7.1" + }, + "conflict": { + "doctrine/common": "<2.9@dev" + }, + "require-dev": { + "doctrine/coding-standard": "^4.0", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "Doctrine Event Manager component", + "homepage": "https://www.doctrine-project.org/projects/event-manager.html", + "keywords": [ + "event", + "eventdispatcher", + "eventmanager" ], - "time": "2016-03-22T00:43:08+00:00" + "time": "2018-06-11T11:59:03+00:00" }, { "name": "doctrine/inflector", - "version": "v1.2.0", + "version": "v1.3.0", "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462" + "reference": "5527a48b7313d15261292c149e55e26eae771b0a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/e11d84c6e018beedd929cff5220969a3c6d1d462", - "reference": "e11d84c6e018beedd929cff5220969a3c6d1d462", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/5527a48b7313d15261292c149e55e26eae771b0a", + "reference": "5527a48b7313d15261292c149e55e26eae771b0a", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^7.1" }, "require-dev": { "phpunit/phpunit": "^6.2" @@ -660,7 +687,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -702,36 +729,36 @@ "singularize", "string" ], - "time": "2017-07-22T12:18:28+00:00" + "time": "2018-01-09T20:05:19+00:00" }, { "name": "doctrine/instantiator", - "version": "1.0.5", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", - "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", + "reference": "185b8868aa9bf7159f5f953ed5afb2d7fcdc3bda", "shasum": "" }, "require": { - "php": ">=5.3,<8.0-DEV" + "php": "^7.1" }, "require-dev": { "athletic/athletic": "~0.1.8", "ext-pdo": "*", "ext-phar": "*", - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "~2.0" + "phpunit/phpunit": "^6.2.3", + "squizlabs/php_codesniffer": "^3.0.2" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -756,7 +783,7 @@ "constructor", "instantiate" ], - "time": "2015-06-14T21:17:01+00:00" + "time": "2017-07-22T11:58:36+00:00" }, { "name": "doctrine/lexer", @@ -814,38 +841,40 @@ }, { "name": "doctrine/orm", - "version": "v2.5.14", + "version": "v2.6.3", "source": { "type": "git", "url": "https://github.com/doctrine/orm.git", - "reference": "810a7baf81462a5ddf10e8baa8cb94b6eec02754" + "reference": "434820973cadf2da2d66e7184be370084cc32ca8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/orm/zipball/810a7baf81462a5ddf10e8baa8cb94b6eec02754", - "reference": "810a7baf81462a5ddf10e8baa8cb94b6eec02754", + "url": "https://api.github.com/repos/doctrine/orm/zipball/434820973cadf2da2d66e7184be370084cc32ca8", + "reference": "434820973cadf2da2d66e7184be370084cc32ca8", "shasum": "" }, "require": { - "doctrine/cache": "~1.4", - "doctrine/collections": "~1.2", - "doctrine/common": ">=2.5-dev,<2.9-dev", - "doctrine/dbal": ">=2.5-dev,<2.7-dev", - "doctrine/instantiator": "^1.0.1", + "doctrine/annotations": "~1.5", + "doctrine/cache": "~1.6", + "doctrine/collections": "^1.4", + "doctrine/common": "^2.7.1", + "doctrine/dbal": "^2.6", + "doctrine/instantiator": "~1.1", "ext-pdo": "*", - "php": ">=5.4", - "symfony/console": "~2.5|~3.0|~4.0" + "php": "^7.1", + "symfony/console": "~3.0|~4.0" }, "require-dev": { - "phpunit/phpunit": "~4.0", - "symfony/yaml": "~2.3|~3.0|~4.0" + "doctrine/coding-standard": "^1.0", + "phpunit/phpunit": "^6.5", + "squizlabs/php_codesniffer": "^3.2", + "symfony/yaml": "~3.4|~4.0" }, "suggest": { "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" }, "bin": [ - "bin/doctrine", - "bin/doctrine.php" + "bin/doctrine" ], "type": "library", "extra": { @@ -854,8 +883,8 @@ } }, "autoload": { - "psr-0": { - "Doctrine\\ORM\\": "lib/" + "psr-4": { + "Doctrine\\ORM\\": "lib/Doctrine/ORM" } }, "notification-url": "https://packagist.org/downloads/", @@ -878,6 +907,10 @@ { "name": "Jonathan Wage", "email": "jonwage@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" } ], "description": "Object-Relational-Mapper for PHP", @@ -886,115 +919,127 @@ "database", "orm" ], - "time": "2017-12-17T02:57:51+00:00" + "time": "2018-11-20T23:46:46+00:00" }, { - "name": "jasig/phpcas", - "version": "1.3.5", + "name": "doctrine/persistence", + "version": "v1.1.0", "source": { "type": "git", - "url": "https://github.com/apereo/phpCAS.git", - "reference": "61c8899c8f91204e8b9135d795461e50fe5c2db0" + "url": "https://github.com/doctrine/persistence.git", + "reference": "c0f1c17602afc18b4cbd8e1c8125f264c9cf7d38" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/apereo/phpCAS/zipball/61c8899c8f91204e8b9135d795461e50fe5c2db0", - "reference": "61c8899c8f91204e8b9135d795461e50fe5c2db0", + "url": "https://api.github.com/repos/doctrine/persistence/zipball/c0f1c17602afc18b4cbd8e1c8125f264c9cf7d38", + "reference": "c0f1c17602afc18b4cbd8e1c8125f264c9cf7d38", "shasum": "" }, "require": { - "ext-curl": "*", - "php": ">=5.4.0" + "doctrine/annotations": "^1.0", + "doctrine/cache": "^1.0", + "doctrine/collections": "^1.0", + "doctrine/event-manager": "^1.0", + "doctrine/reflection": "^1.0", + "php": "^7.1" + }, + "conflict": { + "doctrine/common": "<2.10@dev" }, "require-dev": { - "phpunit/phpunit": "~3.7.10" + "doctrine/coding-standard": "^5.0", + "phpstan/phpstan": "^0.8", + "phpunit/phpunit": "^7.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { - "classmap": [ - "source/" - ] + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "Apache-2.0" + "MIT" ], "authors": [ { - "name": "Joachim Fritschi", - "homepage": "https://wiki.jasig.org/display/~fritschi" + "name": "Roman Borschel", + "email": "roman@code-factory.org" }, { - "name": "Adam Franco", - "homepage": "https://wiki.jasig.org/display/~adamfranco" + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" } ], - "description": "Provides a simple API for authenticating users against a CAS server", - "homepage": "https://wiki.jasig.org/display/CASC/phpCAS", + "description": "The Doctrine Persistence project is a set of shared interfaces and functionality that the different Doctrine object mappers share.", + "homepage": "https://doctrine-project.org/projects/persistence.html", "keywords": [ - "cas", - "jasig" + "mapper", + "object", + "odm", + "orm", + "persistence" ], - "time": "2017-04-10T19:12:45+00:00" + "time": "2018-11-21T00:33:13+00:00" }, { - "name": "kriswallsmith/assetic", - "version": "v1.2.1", + "name": "doctrine/reflection", + "version": "v1.0.0", "source": { "type": "git", - "url": "https://github.com/kriswallsmith/assetic.git", - "reference": "b20efe38845d20458702f97f3ff625d80805897b" + "url": "https://github.com/doctrine/reflection.git", + "reference": "02538d3f95e88eb397a5f86274deb2c6175c2ab6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/kriswallsmith/assetic/zipball/b20efe38845d20458702f97f3ff625d80805897b", - "reference": "b20efe38845d20458702f97f3ff625d80805897b", + "url": "https://api.github.com/repos/doctrine/reflection/zipball/02538d3f95e88eb397a5f86274deb2c6175c2ab6", + "reference": "02538d3f95e88eb397a5f86274deb2c6175c2ab6", "shasum": "" }, "require": { - "php": ">=5.3.1", - "symfony/process": "~2.1" + "doctrine/annotations": "^1.0", + "ext-tokenizer": "*", + "php": "^7.1" }, "require-dev": { - "cssmin/cssmin": "*", - "joliclic/javascript-packer": "*", - "kamicane/packager": "*", - "leafo/lessphp": "*", - "leafo/scssphp": "*", - "leafo/scssphp-compass": "*", - "mrclay/minify": "*", - "patchwork/jsqueeze": "~1.0", - "phpunit/phpunit": "~4", - "psr/log": "~1.0", - "ptachoire/cssembed": "*", - "twig/twig": "~1.6" - }, - "suggest": { - "leafo/lessphp": "Assetic provides the integration with the lessphp LESS compiler", - "leafo/scssphp": "Assetic provides the integration with the scssphp SCSS compiler", - "leafo/scssphp-compass": "Assetic provides the integration with the SCSS compass plugin", - "patchwork/jsqueeze": "Assetic provides the integration with the JSqueeze JavaScript compressor", - "ptachoire/cssembed": "Assetic provides the integration with phpcssembed to embed data uris", - "twig/twig": "Assetic provides the integration with the Twig templating engine" + "doctrine/coding-standard": "^4.0", + "doctrine/common": "^2.8", + "phpstan/phpstan": "^0.9.2", + "phpstan/phpstan-phpunit": "^0.9.4", + "phpunit/phpunit": "^7.0", + "squizlabs/php_codesniffer": "^3.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { - "psr-0": { - "Assetic": "src/" - }, - "files": [ - "src/functions.php" - ] + "psr-4": { + "Doctrine\\Common\\": "lib/Doctrine/Common" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1002,27 +1047,99 @@ ], "authors": [ { - "name": "Kris Wallsmith", - "email": "kris.wallsmith@gmail.com", - "homepage": "http://kriswallsmith.net/" - } - ], - "description": "Asset Management for PHP", - "homepage": "https://github.com/kriswallsmith/assetic", - "keywords": [ - "assets", - "compression", - "minification" - ], - "time": "2014-12-12T05:04:05+00:00" - }, - { - "name": "mpdf/mpdf", - "version": "v6.1.3", - "source": { - "type": "git", - "url": "https://github.com/mpdf/mpdf.git", - "reference": "7f138bf7508eac895ac2c13d2509b056ac7e7e97" + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Jonathan Wage", + "email": "jonwage@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com" + } + ], + "description": "Doctrine Reflection component", + "homepage": "https://www.doctrine-project.org/projects/reflection.html", + "keywords": [ + "reflection" + ], + "time": "2018-06-14T14:45:07+00:00" + }, + { + "name": "jasig/phpcas", + "version": "1.3.6", + "source": { + "type": "git", + "url": "https://github.com/apereo/phpCAS.git", + "reference": "7972833e84f6ee5fa41f1479eab5d855109627f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/apereo/phpCAS/zipball/7972833e84f6ee5fa41f1479eab5d855109627f5", + "reference": "7972833e84f6ee5fa41f1479eab5d855109627f5", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.4.0" + }, + "require-dev": { + "phpunit/phpunit": "~3.7.10" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "source/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "Apache-2.0" + ], + "authors": [ + { + "name": "Joachim Fritschi", + "homepage": "https://wiki.jasig.org/display/~fritschi" + }, + { + "name": "Adam Franco", + "homepage": "https://wiki.jasig.org/display/~adamfranco" + } + ], + "description": "Provides a simple API for authenticating users against a CAS server", + "homepage": "https://wiki.jasig.org/display/CASC/phpCAS", + "keywords": [ + "apereo", + "cas", + "jasig" + ], + "time": "2018-10-25T20:22:09+00:00" + }, + { + "name": "mpdf/mpdf", + "version": "v6.1.3", + "source": { + "type": "git", + "url": "https://github.com/mpdf/mpdf.git", + "reference": "7f138bf7508eac895ac2c13d2509b056ac7e7e97" }, "dist": { "type": "zip", @@ -1112,18 +1229,163 @@ ], "time": "2018-07-02T15:55:56+00:00" }, + { + "name": "psr/cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/cache.git", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/cache/zipball/d11b50ad223250cf17b86e38383413f5a6764bf8", + "reference": "d11b50ad223250cf17b86e38383413f5a6764bf8", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Cache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for caching libraries", + "keywords": [ + "cache", + "psr", + "psr-6" + ], + "time": "2016-08-06T20:24:11+00:00" + }, + { + "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-14T16:28:37+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2016-08-06T14:39:51+00:00" + }, { "name": "psr/log", - "version": "1.0.2", + "version": "1.1.0", "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", - "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "url": "https://api.github.com/repos/php-fig/log/zipball/6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", + "reference": "6c001f1daafa3a3ac1d8ff69ee4db8e799a654dd", "shasum": "" }, "require": { @@ -1157,7 +1419,55 @@ "psr", "psr-3" ], - "time": "2016-10-10T12:19:37+00:00" + "time": "2018-11-20T15:27:04+00:00" + }, + { + "name": "psr/simple-cache", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/simple-cache.git", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/simple-cache/zipball/408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "reference": "408d5eafb83c57f6365a3ca330ff23aa4a5fa39b", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\SimpleCache\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interfaces for simple caching", + "keywords": [ + "cache", + "caching", + "psr", + "psr-16", + "simple-cache" + ], + "time": "2017-10-23T01:57:42+00:00" }, { "name": "ramsey/uuid", @@ -1241,67 +1551,6 @@ ], "time": "2018-07-19T23:38:55+00:00" }, - { - "name": "rwoverdijk/assetmanager", - "version": "1.6.0", - "source": { - "type": "git", - "url": "https://github.com/RWOverdijk/AssetManager.git", - "reference": "3068ea0fe1aab593ec343b0f00f13e12e369ff8e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/RWOverdijk/AssetManager/zipball/3068ea0fe1aab593ec343b0f00f13e12e369ff8e", - "reference": "3068ea0fe1aab593ec343b0f00f13e12e369ff8e", - "shasum": "" - }, - "require": { - "kriswallsmith/assetic": "~1.2.1", - "php": ">=5.3.3", - "zendframework/zend-eventmanager": "2.*", - "zendframework/zend-loader": "2.*", - "zendframework/zend-modulemanager": "2.*", - "zendframework/zend-mvc": "2.*", - "zendframework/zend-servicemanager": "2.*", - "zendframework/zend-stdlib": "2.*" - }, - "require-dev": { - "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "1.5.*", - "zendframework/zendframework": "2.*" - }, - "type": "library", - "autoload": { - "psr-0": { - "AssetManager": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Wesley Overdijk", - "email": "r.w.overdijk@gmail.com", - "homepage": "http://blog.spoonx.nl/" - }, - { - "name": "Marco Pivetta", - "email": "ocramius@gmail.com", - "homepage": "http://ocramius.github.com/" - } - ], - "description": "An assetmanager module for Zend Framework 2.", - "homepage": "https://github.com/RWOverdijk/AssetManager", - "keywords": [ - "asset", - "asset manager", - "zend framework 2", - "zf2" - ], - "time": "2016-03-31T09:19:26+00:00" - }, { "name": "setasign/fpdi", "version": "1.6.2", @@ -1353,44 +1602,48 @@ }, { "name": "symfony/console", - "version": "v3.3.16", + "version": "v3.4.22", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "af7ec995de93671c03cc1b4e3176c8588bc79dcc" + "reference": "069bf3f0e8f871a2169a06e43d9f3f03f355e9be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/af7ec995de93671c03cc1b4e3176c8588bc79dcc", - "reference": "af7ec995de93671c03cc1b4e3176c8588bc79dcc", + "url": "https://api.github.com/repos/symfony/console/zipball/069bf3f0e8f871a2169a06e43d9f3f03f355e9be", + "reference": "069bf3f0e8f871a2169a06e43d9f3f03f355e9be", "shasum": "" }, "require": { "php": "^5.5.9|>=7.0.8", - "symfony/debug": "~2.8|~3.0", + "symfony/debug": "~2.8|~3.0|~4.0", "symfony/polyfill-mbstring": "~1.0" }, "conflict": { - "symfony/dependency-injection": "<3.3" + "symfony/dependency-injection": "<3.4", + "symfony/process": "<3.3" + }, + "provide": { + "psr/log-implementation": "1.0" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~3.3", - "symfony/dependency-injection": "~3.3", - "symfony/event-dispatcher": "~2.8|~3.0", - "symfony/filesystem": "~2.8|~3.0", - "symfony/process": "~2.8|~3.0" + "symfony/config": "~3.3|~4.0", + "symfony/dependency-injection": "~3.4|~4.0", + "symfony/event-dispatcher": "~2.8|~3.0|~4.0", + "symfony/lock": "~3.4|~4.0", + "symfony/process": "~3.3|~4.0" }, "suggest": { "psr/log": "For using the console logger", "symfony/event-dispatcher": "", - "symfony/filesystem": "", + "symfony/lock": "", "symfony/process": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.3-dev" + "dev-master": "3.4-dev" } }, "autoload": { @@ -1417,36 +1670,36 @@ ], "description": "Symfony Console Component", "homepage": "https://symfony.com", - "time": "2018-01-29T09:02:23+00:00" + "time": "2019-01-25T10:42:12+00:00" }, { "name": "symfony/debug", - "version": "v3.4.4", + "version": "v4.2.3", "source": { "type": "git", "url": "https://github.com/symfony/debug.git", - "reference": "53f6af2805daf52a43b393b93d2f24925d35c937" + "reference": "cf9b2e33f757deb884ce474e06d2647c1c769b65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/debug/zipball/53f6af2805daf52a43b393b93d2f24925d35c937", - "reference": "53f6af2805daf52a43b393b93d2f24925d35c937", + "url": "https://api.github.com/repos/symfony/debug/zipball/cf9b2e33f757deb884ce474e06d2647c1c769b65", + "reference": "cf9b2e33f757deb884ce474e06d2647c1c769b65", "shasum": "" }, "require": { - "php": "^5.5.9|>=7.0.8", + "php": "^7.1.3", "psr/log": "~1.0" }, "conflict": { - "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + "symfony/http-kernel": "<3.4" }, "require-dev": { - "symfony/http-kernel": "~2.8|~3.0|~4.0" + "symfony/http-kernel": "~3.4|~4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.4-dev" + "dev-master": "4.2-dev" } }, "autoload": { @@ -1473,20 +1726,20 @@ ], "description": "Symfony Debug Component", "homepage": "https://symfony.com", - "time": "2018-01-18T22:16:57+00:00" + "time": "2019-01-25T14:35:16+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.11.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "82ebae02209c21113908c229e9883c419720738a" + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/82ebae02209c21113908c229e9883c419720738a", - "reference": "82ebae02209c21113908c229e9883c419720738a", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/e3d826245268269cd66f8326bd8bc066687b4a19", + "reference": "e3d826245268269cd66f8326bd8bc066687b4a19", "shasum": "" }, "require": { @@ -1498,7 +1751,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.11-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -1531,20 +1784,20 @@ "polyfill", "portable" ], - "time": "2019-02-06T07:57:58+00:00" + "time": "2018-08-06T14:22:27+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.7.0", + "version": "v1.10.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b" + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/78be803ce01e55d3491c1397cf1c64beb9c1b63b", - "reference": "78be803ce01e55d3491c1397cf1c64beb9c1b63b", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/c79c051f5b3a46be09205c73b80b346e4153e494", + "reference": "c79c051f5b3a46be09205c73b80b346e4153e494", "shasum": "" }, "require": { @@ -1556,7 +1809,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7-dev" + "dev-master": "1.9-dev" } }, "autoload": { @@ -1590,38 +1843,35 @@ "portable", "shim" ], - "time": "2018-01-30T19:27:44+00:00" + "time": "2018-09-21T13:07:52+00:00" }, { - "name": "symfony/process", - "version": "v2.8.34", + "name": "true/punycode", + "version": "v2.1.1", "source": { "type": "git", - "url": "https://github.com/symfony/process.git", - "reference": "905efe90024caa75a2fc93f54e14b26f2a099d96" + "url": "https://github.com/true/php-punycode.git", + "reference": "a4d0c11a36dd7f4e7cd7096076cab6d3378a071e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/905efe90024caa75a2fc93f54e14b26f2a099d96", - "reference": "905efe90024caa75a2fc93f54e14b26f2a099d96", + "url": "https://api.github.com/repos/true/php-punycode/zipball/a4d0c11a36dd7f4e7cd7096076cab6d3378a071e", + "reference": "a4d0c11a36dd7f4e7cd7096076cab6d3378a071e", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.3.0", + "symfony/polyfill-mbstring": "^1.3" }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.8-dev" - } + "require-dev": { + "phpunit/phpunit": "~4.7", + "squizlabs/php_codesniffer": "~2.0" }, + "type": "library", "autoload": { "psr-4": { - "Symfony\\Component\\Process\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "TrueBV\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -1629,47 +1879,46 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Renan Gonçalves", + "email": "renan.saddam@gmail.com" } ], - "description": "Symfony Process Component", - "homepage": "https://symfony.com", - "time": "2018-01-29T08:54:45+00:00" + "description": "A Bootstring encoding of Unicode for Internationalized Domain Names in Applications (IDNA)", + "homepage": "https://github.com/true/php-punycode", + "keywords": [ + "idna", + "punycode" + ], + "time": "2016-11-16T10:37:54+00:00" }, { "name": "unicaen/app", - "version": "1.3.6", + "version": "dev-zf-2.x", "source": { "type": "git", "url": "https://git.unicaen.fr/lib/unicaen/app.git", - "reference": "16dae0de5dd759aba4b1e547d2363f45d106776b" + "reference": "3f4048a2973b4ce689f6e2a93f9410d513158896" }, "require": { - "doctrine/doctrine-orm-module": ">=0.7", + "doctrine/doctrine-orm-module": ">=1.0", "mpdf/mpdf": "v6.1.3", "php": ">=5.6 || >=7.0", - "rwoverdijk/assetmanager": ">=1.3", - "zendframework/zend-config": "2.4.*", - "zendframework/zend-console": "2.4.*", - "zendframework/zend-eventmanager": "2.4.*", - "zendframework/zend-http": "2.4.*", - "zendframework/zend-i18n": "2.4.*", - "zendframework/zend-json": "2.4.*", - "zendframework/zend-ldap": "2.4.*", - "zendframework/zend-log": "2.4.*", - "zendframework/zend-mail": "2.4.*", - "zendframework/zend-mvc": "2.4.*", - "zendframework/zend-navigation": "2.4.*", - "zendframework/zend-serializer": "2.4.*", - "zendframework/zend-servicemanager": "2.4.*", - "zendframework/zend-session": "2.4.*", - "zendframework/zend-version": "2.4.*", - "zendframework/zend-view": "2.4.*" + "zendframework/zend-config": "^2.4", + "zendframework/zend-console": "^2.4", + "zendframework/zend-eventmanager": "^2.4", + "zendframework/zend-http": "^2.4", + "zendframework/zend-i18n": "^2.4", + "zendframework/zend-json": "^2.4", + "zendframework/zend-ldap": "^2.4", + "zendframework/zend-log": "^2.4", + "zendframework/zend-mail": "^2.4", + "zendframework/zend-mvc": "^2.4", + "zendframework/zend-navigation": "^2.4", + "zendframework/zend-serializer": "^2.4", + "zendframework/zend-servicemanager": "^2.4", + "zendframework/zend-session": "^2.4", + "zendframework/zend-version": "^2.4", + "zendframework/zend-view": "^2.4" }, "require-dev": { "phpunit/phpunit": "^5.6", @@ -1690,37 +1939,97 @@ ] }, "description": "Module de base des applications unicaen", - "time": "2018-02-23T17:22:40+00:00" + "time": "2019-02-28T21:20:45+00:00" + }, + { + "name": "unicaen/bjy-authorize", + "version": "dev-zf-2.x", + "source": { + "type": "git", + "url": "https://git.unicaen.fr/lib/unicaen/bjy-authorize.git", + "reference": "5ff84de98b9695f2b2bf27584e946beafed04d82" + }, + "require": { + "doctrine/common": "^2.7", + "php": ">=5.6 || >=7.0", + "zendframework/zend-cache": "^2.2", + "zendframework/zend-eventmanager": "^2.2", + "zendframework/zend-http": "^2.2", + "zendframework/zend-mvc": "^2.2", + "zendframework/zend-permissions-acl": "^2.2", + "zendframework/zend-servicemanager": "^2.2", + "zendframework/zend-view": "^2.2", + "zf-commons/zfc-user": "^1.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0", + "zendframework/zend-developer-tools": "^1.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.5-dev" + } + }, + "autoload": { + "psr-0": { + "BjyAuthorize\\": "src/" + } + }, + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Ben Youngblood", + "email": "bx.youngblood@gmail.com", + "homepage": "http://bjyoungblood.com/", + "role": "Developer" + }, + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/", + "role": "Developer" + } + ], + "description": "Zend\\Acl based firewall system for ZF2 dispatch protection", + "homepage": "https://github.com/bjyoungblood/BjyAuthorize", + "keywords": [ + "acl", + "zf2", + "zfc-user" + ], + "time": "2019-02-28T22:03:58+00:00" }, { "name": "zendframework/zend-authentication", - "version": "2.4.13", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-authentication.git", - "reference": "6868e48c1385e4bee14037b22dddfe11704f9d8c" + "reference": "ebc9464c11a5203e5256439f1079a7d6efe89eec" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-authentication/zipball/6868e48c1385e4bee14037b22dddfe11704f9d8c", - "reference": "6868e48c1385e4bee14037b22dddfe11704f9d8c", + "url": "https://api.github.com/repos/zendframework/zend-authentication/zipball/ebc9464c11a5203e5256439f1079a7d6efe89eec", + "reference": "ebc9464c11a5203e5256439f1079a7d6efe89eec", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" + "php": "^5.6 || ^7.0", + "zendframework/zend-stdlib": "^2.7.7 || ^3.1" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-crypt": "self.version", - "zendframework/zend-db": "self.version", - "zendframework/zend-http": "self.version", - "zendframework/zend-ldap": "self.version", - "zendframework/zend-session": "self.version", - "zendframework/zend-uri": "self.version", - "zendframework/zend-validator": "self.version" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-crypt": "^2.6 || ^3.2.1", + "zendframework/zend-db": "^2.8.2", + "zendframework/zend-http": "^2.7", + "zendframework/zend-ldap": "^2.8", + "zendframework/zend-session": "^2.8", + "zendframework/zend-uri": "^2.5.2", + "zendframework/zend-validator": "^2.10.1" }, "suggest": { "zendframework/zend-crypt": "Zend\\Crypt component", @@ -1734,8 +2043,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.6.x-dev", + "dev-develop": "2.7.x-dev" } }, "autoload": { @@ -1748,46 +2057,59 @@ "BSD-3-Clause" ], "description": "provides an API for authentication and includes concrete authentication adapters for common use case scenarios", - "homepage": "https://github.com/zendframework/zend-authentication", "keywords": [ "Authentication", - "zf2" + "ZendFramework", + "zf" ], - "time": "2015-05-11T16:17:05+00:00" + "time": "2018-04-12T21:09:22+00:00" }, { "name": "zendframework/zend-cache", - "version": "2.4.13", + "version": "2.8.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-cache.git", - "reference": "5c4e6231082f74ab3e4fd58927c867ef4c24d71f" + "reference": "4983dff629956490c78b88adcc8ece4711d7d8a3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-cache/zipball/5c4e6231082f74ab3e4fd58927c867ef4c24d71f", - "reference": "5c4e6231082f74ab3e4fd58927c867ef4c24d71f", + "url": "https://api.github.com/repos/zendframework/zend-cache/zipball/4983dff629956490c78b88adcc8ece4711d7d8a3", + "reference": "4983dff629956490c78b88adcc8ece4711d7d8a3", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-eventmanager": "~2.4.0", - "zendframework/zend-serializer": "~2.4.0", - "zendframework/zend-servicemanager": "~2.4.0", - "zendframework/zend-stdlib": "~2.4.0" + "php": "^5.6 || ^7.0", + "psr/cache": "^1.0", + "psr/simple-cache": "^1.0", + "zendframework/zend-eventmanager": "^2.6.3 || ^3.2", + "zendframework/zend-servicemanager": "^2.7.8 || ^3.3", + "zendframework/zend-stdlib": "^2.7.7 || ^3.1" + }, + "provide": { + "psr/cache-implementation": "1.0", + "psr/simple-cache-implementation": "1.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-session": "~2.4.0" + "cache/integration-tests": "^0.16", + "phpbench/phpbench": "^0.13", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-serializer": "^2.6", + "zendframework/zend-session": "^2.7.4" }, "suggest": { - "ext-apc": "APC >= 3.1.6 to use the APC storage adapter", + "ext-apc": "APC or compatible extension, to use the APC storage adapter", + "ext-apcu": "APCU >= 5.1.0, to use the APCu storage adapter", "ext-dba": "DBA, to use the DBA storage adapter", + "ext-memcache": "Memcache >= 2.0.0 to use the Memcache storage adapter", "ext-memcached": "Memcached >= 1.0.0 to use the Memcached storage adapter", "ext-mongo": "Mongo, to use MongoDb storage adapter", + "ext-mongodb": "MongoDB, to use the ExtMongoDb storage adapter", + "ext-redis": "Redis, to use Redis storage adapter", "ext-wincache": "WinCache, to use the WinCache storage adapter", + "ext-xcache": "XCache, to use the XCache storage adapter", + "mongodb/mongodb": "Required for use with the ext-mongodb adapter", "mongofill/mongofill": "Alternative to ext-mongo - a pure PHP implementation designed as a drop in replacement", "zendframework/zend-serializer": "Zend\\Serializer component", "zendframework/zend-session": "Zend\\Session component" @@ -1795,11 +2117,18 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.8.x-dev", + "dev-develop": "2.9.x-dev" + }, + "zf": { + "component": "Zend\\Cache", + "config-provider": "Zend\\Cache\\ConfigProvider" } }, "autoload": { + "files": [ + "autoload/patternPluginManagerPolyfill.php" + ], "psr-4": { "Zend\\Cache\\": "src/" } @@ -1808,40 +2137,41 @@ "license": [ "BSD-3-Clause" ], - "description": "provides a generic way to cache any data", - "homepage": "https://github.com/zendframework/zend-cache", + "description": "Caching implementation with a variety of storage options, as well as codified caching strategies for callbacks, classes, and output", "keywords": [ + "ZendFramework", "cache", - "zf2" + "psr-16", + "psr-6", + "zf" ], - "time": "2015-09-15T16:23:56+00:00" + "time": "2018-05-01T21:58:00+00:00" }, { "name": "zendframework/zend-config", - "version": "2.4.13", + "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", @@ -1852,8 +2182,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": { @@ -1871,30 +2201,32 @@ "config", "zf2" ], - "time": "2015-05-07T14:55:31+00:00" + "time": "2016-02-04T23:01:10+00:00" }, { "name": "zendframework/zend-console", - "version": "2.4.13", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-console.git", - "reference": "92f9c51bdc42332e63914eec892364594a9b68c8" + "reference": "e8aa08da83de3d265256c40ba45cd649115f0e18" }, "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/e8aa08da83de3d265256c40ba45cd649115f0e18", + "reference": "e8aa08da83de3d265256c40ba45cd649115f0e18", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" + "php": "^5.6 || ^7.0", + "zendframework/zend-stdlib": "^2.7.7 || ^3.1" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-filter": "^2.7.2", + "zendframework/zend-json": "^2.6 || ^3.0", + "zendframework/zend-validator": "^2.10.1" }, "suggest": { "zendframework/zend-filter": "To support DefaultRouteMatcher usage", @@ -1903,8 +2235,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.7.x-dev", + "dev-develop": "2.8.x-dev" } }, "autoload": { @@ -1916,38 +2248,37 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-console", + "description": "Build console applications using getopt syntax or routing, complete with prompts", "keywords": [ + "ZendFramework", "console", - "zf2" + "zf" ], - "time": "2015-05-07T14:55:31+00:00" + "time": "2018-01-25T19:08:04+00:00" }, { "name": "zendframework/zend-crypt", - "version": "2.4.13", + "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" @@ -1955,8 +2286,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": { @@ -1973,43 +2304,47 @@ "crypt", "zf2" ], - "time": "2015-11-23T16:33:27+00:00" + "time": "2016-02-03T23:46:30+00:00" }, { "name": "zendframework/zend-db", - "version": "2.4.13", + "version": "2.10.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-db.git", - "reference": "b78b12c68bdafffaecb87f684426ad446b95204f" + "reference": "77022f06f6ffd384fa86d22ab8d8bbdb925a1e8e" }, "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/77022f06f6ffd384fa86d22ab8d8bbdb925a1e8e", + "reference": "77022f06f6ffd384fa86d22ab8d8bbdb925a1e8e", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" + "php": "^5.6 || ^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" + "phpunit/phpunit": "^5.7.25 || ^6.4.4", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-eventmanager": "^2.6.2 || ^3.0", + "zendframework/zend-hydrator": "^1.1 || ^2.1 || ^3.0", + "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.9-dev", + "dev-develop": "2.10-dev" + }, + "zf": { + "component": "Zend\\Db", + "config-provider": "Zend\\Db\\ConfigProvider" } }, "autoload": { @@ -2021,40 +2356,104 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-db", + "description": "Database abstraction layer, SQL abstraction, result set abstraction, and RowDataGateway and TableDataGateway implementations", "keywords": [ + "ZendFramework", "db", - "zf2" + "zf" + ], + "time": "2019-02-25T11:37:45+00:00" + }, + { + "name": "zendframework/zend-diactoros", + "version": "1.8.6", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-diactoros.git", + "reference": "20da13beba0dde8fb648be3cc19765732790f46e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/20da13beba0dde8fb648be3cc19765732790f46e", + "reference": "20da13beba0dde8fb648be3cc19765732790f46e", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0", + "psr/http-message": "^1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "ext-dom": "*", + "ext-libxml": "*", + "php-http/psr7-integration-tests": "dev-master", + "phpunit/phpunit": "^5.7.16 || ^6.0.8 || ^7.2.7", + "zendframework/zend-coding-standard": "~1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8.x-dev", + "dev-develop": "1.9.x-dev", + "dev-release-2.0": "2.0.x-dev" + } + }, + "autoload": { + "files": [ + "src/functions/create_uploaded_file.php", + "src/functions/marshal_headers_from_sapi.php", + "src/functions/marshal_method_from_sapi.php", + "src/functions/marshal_protocol_version_from_sapi.php", + "src/functions/marshal_uri_from_sapi.php", + "src/functions/normalize_server.php", + "src/functions/normalize_uploaded_files.php", + "src/functions/parse_cookie_header.php" + ], + "psr-4": { + "Zend\\Diactoros\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "description": "PSR HTTP Message implementations", + "homepage": "https://github.com/zendframework/zend-diactoros", + "keywords": [ + "http", + "psr", + "psr-7" ], - "time": "2015-05-07T14:55:31+00:00" + "time": "2018-09-05T19:29:37+00:00" }, { "name": "zendframework/zend-escaper", - "version": "2.4.13", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-escaper.git", - "reference": "13f468ff824f3c83018b90aff892a1b3201383a9" + "reference": "31d8aafae982f9568287cb4dce987e6aff8fd074" }, "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/31d8aafae982f9568287cb4dce987e6aff8fd074", + "reference": "31d8aafae982f9568287cb4dce987e6aff8fd074", "shasum": "" }, "require": { - "php": ">=5.3.23" + "php": "^5.6 || ^7.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", + "zendframework/zend-coding-standard": "~1.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.6.x-dev", + "dev-develop": "2.7.x-dev" } }, "autoload": { @@ -2066,41 +2465,43 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-escaper", + "description": "Securely and safely escape HTML, HTML attributes, JavaScript, CSS, and URLs", "keywords": [ + "ZendFramework", "escaper", - "zf2" + "zf" ], - "time": "2015-05-07T14:55:31+00:00" + "time": "2018-04-25T15:48:53+00:00" }, { "name": "zendframework/zend-eventmanager", - "version": "2.4.13", + "version": "2.6.4", "source": { "type": "git", "url": "https://github.com/zendframework/zend-eventmanager.git", - "reference": "c2c46a7a2809b74ceb66fd79f66d43f97e1747b4" + "reference": "d238c443220dce4b6396579c8ab2200ec25f9108" }, "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/d238c443220dce4b6396579c8ab2200ec25f9108", + "reference": "d238c443220dce4b6396579c8ab2200ec25f9108", "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": { @@ -2112,50 +2513,59 @@ "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-07T14:55:31+00:00" + "time": "2017-12-12T17:48:56+00:00" }, { "name": "zendframework/zend-filter", - "version": "2.4.13", + "version": "2.9.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-filter.git", - "reference": "a3711101850078b2aa69586c71897acaada2e9cb" + "reference": "1c3e6d02f9cd5f6c929c9859498f5efbe216e86f" }, "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/1c3e6d02f9cd5f6c929c9859498f5efbe216e86f", + "reference": "1c3e6d02f9cd5f6c929c9859498f5efbe216e86f", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" + "php": "^5.6 || ^7.0", + "zendframework/zend-stdlib": "^2.7.7 || ^3.1" + }, + "conflict": { + "zendframework/zend-validator": "<2.10.1" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-crypt": "self.version", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-uri": "self.version" + "pear/archive_tar": "^1.4.3", + "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "psr/http-factory": "^1.0", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-crypt": "^3.2.1", + "zendframework/zend-servicemanager": "^2.7.8 || ^3.3", + "zendframework/zend-uri": "^2.6" }, "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" + "psr/http-factory-implementation": "psr/http-factory-implementation, for creating file upload instances when consuming PSR-7 in file upload filters", + "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.9.x-dev", + "dev-develop": "2.10.x-dev" + }, + "zf": { + "component": "Zend\\Filter", + "config-provider": "Zend\\Filter\\ConfigProvider" } }, "autoload": { @@ -2168,116 +2578,125 @@ "BSD-3-Clause" ], "description": "provides a set of commonly needed data filters", - "homepage": "https://github.com/zendframework/zend-filter", "keywords": [ + "ZendFramework", "filter", - "zf2" + "zf" ], - "time": "2015-05-07T14:55:31+00:00" + "time": "2018-12-17T16:00:04+00:00" }, { "name": "zendframework/zend-form", - "version": "2.4.13", + "version": "2.13.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-form.git", - "reference": "779ba5da3dc040c52e632ea340462af2306c7682" + "reference": "c713a12ccbd43148b71c9339e171ca11e3f8a1da" }, "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/c713a12ccbd43148b71c9339e171ca11e3f8a1da", + "reference": "c713a12ccbd43148b71c9339e171ca11e3f8a1da", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-inputfilter": "~2.4.0", - "zendframework/zend-stdlib": "~2.4.0" + "php": "^5.6 || ^7.0", + "zendframework/zend-hydrator": "^1.1 || ^2.1 || ^3.0", + "zendframework/zend-inputfilter": "^2.8", + "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": "^5.7.23 || ^6.5.3", + "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.8.1", + "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.13.x-dev", + "dev-develop": "2.14.x-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": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-form", + "description": "Validate and display simple and complex forms, casting forms to business objects and vice versa", "keywords": [ + "ZendFramework", "form", - "zf2" + "zf" ], - "time": "2015-09-09T19:11:05+00:00" + "time": "2018-12-11T22:51:29+00:00" }, { "name": "zendframework/zend-http", - "version": "2.4.13", + "version": "2.8.4", "source": { "type": "git", "url": "https://github.com/zendframework/zend-http.git", - "reference": "0456267c3825f3c4b558460e0bffeb4c496e6fb8" + "reference": "d160aedc096be230af0fe9c31151b2b33ad4e807" }, "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/d160aedc096be230af0fe9c31151b2b33ad4e807", + "reference": "d160aedc096be230af0fe9c31151b2b33ad4e807", "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.6 || ^7.0", + "zendframework/zend-loader": "^2.5.1", + "zendframework/zend-stdlib": "^3.1 || ^2.7.7", + "zendframework/zend-uri": "^2.5.2", + "zendframework/zend-validator": "^2.10.1" }, "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": "^5.7.27 || ^6.5.8 || ^7.1.3", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-config": "^3.1 || ^2.6" + }, + "suggest": { + "paragonie/certainty": "For automated management of cacert.pem" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.8.x-dev", + "dev-develop": "2.9.x-dev" } }, "autoload": { @@ -2289,43 +2708,102 @@ "license": [ "BSD-3-Clause" ], - "description": "provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests", - "homepage": "https://github.com/zendframework/zend-http", + "description": "Provides an easy interface for performing Hyper-Text Transfer Protocol (HTTP) requests", "keywords": [ + "ZendFramework", "http", + "http client", + "zend", + "zf" + ], + "time": "2019-02-07T17:47:08+00:00" + }, + { + "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": "2015-09-14T16:11:20+00:00" + "time": "2016-02-18T22:38:26+00:00" }, { "name": "zendframework/zend-i18n", - "version": "2.4.13", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-i18n.git", - "reference": "f26d6ae4be3f1ac98fbb3708aafae908c38f46c8" + "reference": "6d69af5a04e1a4de7250043cb1322f077a0cdb7f" }, "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/6d69af5a04e1a4de7250043cb1322f077a0cdb7f", + "reference": "6d69af5a04e1a4de7250043cb1322f077a0cdb7f", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" + "php": "^5.6 || ^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" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", + "zendframework/zend-cache": "^2.6.1", + "zendframework/zend-coding-standard": "~1.0.0", + "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", @@ -2333,7 +2811,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" @@ -2341,8 +2819,12 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.9.x-dev", + "dev-develop": "2.10.x-dev" + }, + "zf": { + "component": "Zend\\I18n", + "config-provider": "Zend\\I18n\\ConfigProvider" } }, "autoload": { @@ -2354,46 +2836,52 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-i18n", + "description": "Provide translations for your application, and filter and validate internationalized values", "keywords": [ + "ZendFramework", "i18n", - "zf2" + "zf" ], - "time": "2015-05-07T14:55:31+00:00" + "time": "2018-05-16T16:39:13+00:00" }, { "name": "zendframework/zend-inputfilter", - "version": "2.4.13", + "version": "2.10.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-inputfilter.git", - "reference": "6305e9acf7da9f5481b5266cb6e0353a96c10a06" + "reference": "4f52b71ec9cef3a06e3bba8f5c2124e94055ec0c" }, "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/4f52b71ec9cef3a06e3bba8f5c2124e94055ec0c", + "reference": "4f52b71ec9cef3a06e3bba8f5c2124e94055ec0c", "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.6 || ^7.0", + "zendframework/zend-filter": "^2.9.1", + "zendframework/zend-servicemanager": "^2.7.10 || ^3.3.1", + "zendframework/zend-stdlib": "^2.7 || ^3.0", + "zendframework/zend-validator": "^2.11" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "^4.5", - "zendframework/zend-servicemanager": "~2.4.0" + "phpunit/phpunit": "^5.7.23 || ^6.4.3", + "psr/http-message": "^1.0", + "zendframework/zend-coding-standard": "~1.0.0" }, "suggest": { - "zendframework/zend-servicemanager": "To support plugin manager support" + "psr/http-message-implementation": "PSR-7 is required if you wish to validate PSR-7 UploadedFileInterface payloads" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.10.x-dev", + "dev-develop": "2.11.x-dev" + }, + "zf": { + "component": "Zend\\InputFilter", + "config-provider": "Zend\\InputFilter\\ConfigProvider" } }, "autoload": { @@ -2405,48 +2893,50 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-inputfilter", + "description": "Normalize and validate input sets from the web, APIs, the CLI, and more, including files", "keywords": [ + "ZendFramework", "inputfilter", - "zf2" + "zf" ], - "time": "2015-09-09T15:44:54+00:00" + "time": "2019-01-30T16:58:51+00:00" }, { "name": "zendframework/zend-json", - "version": "2.4.13", + "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": { @@ -2464,32 +2954,33 @@ "json", "zf2" ], - "time": "2015-05-07T14:55:31+00:00" + "time": "2016-02-04T21:20:26+00:00" }, { "name": "zendframework/zend-ldap", - "version": "2.4.13", + "version": "2.10.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-ldap.git", - "reference": "07bfa76ceea39e2db1da9121cdf56ecaa5505584" + "reference": "b63c7884a08d3a6bda60ebcf7d6238cf8ad89f49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-ldap/zipball/07bfa76ceea39e2db1da9121cdf56ecaa5505584", - "reference": "07bfa76ceea39e2db1da9121cdf56ecaa5505584", + "url": "https://api.github.com/repos/zendframework/zend-ldap/zipball/b63c7884a08d3a6bda60ebcf7d6238cf8ad89f49", + "reference": "b63c7884a08d3a6bda60ebcf7d6238cf8ad89f49", "shasum": "" }, "require": { "ext-ldap": "*", - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" + "php": "^5.6 || ^7.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "zendframework/zend-eventmanager": "self.version" + "php-mock/php-mock-phpunit": "^1.1.2 || ^2.1.1", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-config": "^2.5", + "zendframework/zend-eventmanager": "^2.6.3 || ^3.0.1", + "zendframework/zend-stdlib": "^2.7 || ^3.0" }, "suggest": { "zendframework/zend-eventmanager": "Zend\\EventManager component" @@ -2497,8 +2988,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.10.x-dev", + "dev-develop": "2.11.x-dev" } }, "autoload": { @@ -2510,41 +3001,40 @@ "license": [ "BSD-3-Clause" ], - "description": "provides support for LDAP operations including but not limited to binding, searching and modifying entries in an LDAP directory", - "homepage": "https://github.com/zendframework/zend-ldap", + "description": "Provides support for LDAP operations including but not limited to binding, searching and modifying entries in an LDAP directory", "keywords": [ + "ZendFramework", "ldap", - "zf2" + "zf" ], - "time": "2015-05-11T15:11:40+00:00" + "time": "2018-07-05T05:05:12+00:00" }, { "name": "zendframework/zend-loader", - "version": "2.4.13", + "version": "2.6.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-loader.git", - "reference": "5e62c44a4d23c4e09d35fcc2a3b109c944dbdc22" + "reference": "78f11749ea340f6ca316bca5958eef80b38f9b6c" }, "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/78f11749ea340f6ca316bca5958eef80b38f9b6c", + "reference": "78f11749ea340f6ca316bca5958eef80b38f9b6c", "shasum": "" }, "require": { - "php": ">=5.3.23" + "php": "^5.6 || ^7.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", + "zendframework/zend-coding-standard": "~1.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.6.x-dev", + "dev-develop": "2.7.x-dev" } }, "autoload": { @@ -2556,55 +3046,65 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-loader", + "description": "Autoloading and plugin loading strategies", "keywords": [ + "ZendFramework", "loader", - "zf2" + "zf" ], - "time": "2015-05-07T14:55:31+00:00" + "time": "2018-04-30T15:20:54+00:00" }, { "name": "zendframework/zend-log", - "version": "2.4.13", + "version": "2.10.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-log.git", - "reference": "f6538f4b61cdacafa47c7cef26c5c0204f2d1eef" + "reference": "9cec3b092acb39963659c2f32441cccc56b3f430" }, "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/9cec3b092acb39963659c2f32441cccc56b3f430", + "reference": "9cec3b092acb39963659c2f32441cccc56b3f430", "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.*", - "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" + "mikey179/vfsstream": "^1.6", + "phpunit/phpunit": "^5.7.15 || ^6.0.8", + "zendframework/zend-coding-standard": "~1.0.0", + "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.10.1" }, "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.10.x-dev", + "dev-develop": "2.11.x-dev" + }, + "zf": { + "component": "Zend\\Log", + "config-provider": "Zend\\Log\\ConfigProvider" } }, "autoload": { @@ -2623,45 +3123,51 @@ "logging", "zf2" ], - "time": "2015-05-07T14:55:31+00:00" + "time": "2018-04-09T21:59:51+00:00" }, { "name": "zendframework/zend-mail", - "version": "2.4.13", + "version": "2.10.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-mail.git", - "reference": "99f7ceb42065c0cc89ef5130ee4b1ee89ae014d6" + "reference": "d7beb63d5f7144a21ac100072c453e63860cdab8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-mail/zipball/99f7ceb42065c0cc89ef5130ee4b1ee89ae014d6", - "reference": "99f7ceb42065c0cc89ef5130ee4b1ee89ae014d6", + "url": "https://api.github.com/repos/zendframework/zend-mail/zipball/d7beb63d5f7144a21ac100072c453e63860cdab8", + "reference": "d7beb63d5f7144a21ac100072c453e63860cdab8", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-crypt": "~2.4.0", - "zendframework/zend-loader": "~2.4.0", - "zendframework/zend-mime": "~2.4.0", - "zendframework/zend-stdlib": "~2.4.0", - "zendframework/zend-validator": "~2.4.0" + "ext-iconv": "*", + "php": "^5.6 || ^7.0", + "true/punycode": "^2.1", + "zendframework/zend-loader": "^2.5", + "zendframework/zend-mime": "^2.5", + "zendframework/zend-stdlib": "^2.7 || ^3.0", + "zendframework/zend-validator": "^2.10.2" }, "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-servicemanager": "~2.4.0" + "phpunit/phpunit": "^5.7.25 || ^6.4.4 || ^7.1.4", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-config": "^2.6", + "zendframework/zend-crypt": "^2.6 || ^3.0", + "zendframework/zend-servicemanager": "^2.7.10 || ^3.3.1" }, "suggest": { - "zendframework/zend-servicemanager": "Zend\\ServiceManager component" + "zendframework/zend-crypt": "Crammd5 support in SMTP Auth", + "zendframework/zend-servicemanager": "^2.7.10 || ^3.3.1 when using SMTP to deliver messages" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.10.x-dev", + "dev-develop": "2.11.x-dev" + }, + "zf": { + "component": "Zend\\Mail", + "config-provider": "Zend\\Mail\\ConfigProvider" } }, "autoload": { @@ -2673,47 +3179,46 @@ "license": [ "BSD-3-Clause" ], - "description": "provides generalized functionality to compose and send both text and MIME-compliant multipart e-mail messages", - "homepage": "https://github.com/zendframework/zend-mail", + "description": "Provides generalized functionality to compose and send both text and MIME-compliant multipart e-mail messages", "keywords": [ + "ZendFramework", "mail", - "zf2" + "zf" ], - "time": "2017-07-13T16:53:17+00:00" + "time": "2018-06-07T13:37:07+00:00" }, { "name": "zendframework/zend-math", - "version": "2.4.13", + "version": "2.7.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-math.git", - "reference": "1e7e803366fc7618a8668ce2403c932196174faa" + "reference": "1abce074004dacac1a32cd54de94ad47ef960d38" }, "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/1abce074004dacac1a32cd54de94ad47ef960d38", + "reference": "1abce074004dacac1a32cd54de94ad47ef960d38", "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": { @@ -2730,31 +3235,30 @@ "math", "zf2" ], - "time": "2015-05-07T14:55:31+00:00" + "time": "2018-12-04T15:34:17+00:00" }, { "name": "zendframework/zend-mime", - "version": "2.4.13", + "version": "2.7.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-mime.git", - "reference": "df81ca9f94f0d1cd31175b8d2df6002b61dd5973" + "reference": "52ae5fa9f12845cae749271034a2d594f0e4c6f2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-mime/zipball/df81ca9f94f0d1cd31175b8d2df6002b61dd5973", - "reference": "df81ca9f94f0d1cd31175b8d2df6002b61dd5973", + "url": "https://api.github.com/repos/zendframework/zend-mime/zipball/52ae5fa9f12845cae749271034a2d594f0e4c6f2", + "reference": "52ae5fa9f12845cae749271034a2d594f0e4c6f2", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" + "php": "^5.6 || ^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-mail": "self.version" + "phpunit/phpunit": "^5.7.21 || ^6.3", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-mail": "^2.6" }, "suggest": { "zendframework/zend-mail": "Zend\\Mail component" @@ -2762,8 +3266,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": { @@ -2775,53 +3279,55 @@ "license": [ "BSD-3-Clause" ], + "description": "Create and parse MIME messages and parts", "homepage": "https://github.com/zendframework/zend-mime", "keywords": [ + "ZendFramework", "mime", - "zf2" + "zf" ], - "time": "2015-05-07T16:53:42+00:00" + "time": "2018-05-14T19:02:50+00:00" }, { "name": "zendframework/zend-modulemanager", - "version": "2.4.13", + "version": "2.8.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-modulemanager.git", - "reference": "49c0713c2b560dd434aa36b83df4c89f51f8dab4" + "reference": "394df6e12248ac430a312d4693f793ee7120baa6" }, "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/394df6e12248ac430a312d4693f793ee7120baa6", + "reference": "394df6e12248ac430a312d4693f793ee7120baa6", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-eventmanager": "self.version", - "zendframework/zend-stdlib": "self.version" + "php": "^5.6 || ^7.0", + "zendframework/zend-config": "^3.1 || ^2.6", + "zendframework/zend-eventmanager": "^3.2 || ^2.6.3", + "zendframework/zend-stdlib": "^3.1 || ^2.7" }, "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" + "phpunit/phpunit": "^6.0.8 || ^5.7.15", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-console": "^2.6", + "zendframework/zend-di": "^2.6", + "zendframework/zend-loader": "^2.5", + "zendframework/zend-mvc": "^3.0 || ^2.7", + "zendframework/zend-servicemanager": "^3.0.3 || ^2.7.5" }, "suggest": { - "zendframework/zend-config": "Zend\\Config component", "zendframework/zend-console": "Zend\\Console component", - "zendframework/zend-loader": "Zend\\Loader component", + "zendframework/zend-loader": "Zend\\Loader component if you are not using Composer autoloading for your modules", "zendframework/zend-mvc": "Zend\\Mvc component", "zendframework/zend-servicemanager": "Zend\\ServiceManager component" }, "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": { @@ -2833,61 +3339,68 @@ "license": [ "BSD-3-Clause" ], - "homepage": "https://github.com/zendframework/zend-module-manager", + "description": "Modular application system for zend-mvc applications", + "homepage": "https://github.com/zendframework/zend-modulemanager", "keywords": [ + "ZendFramework", "modulemanager", - "zf2" + "zf" ], - "time": "2015-05-07T14:55:31+00:00" + "time": "2017-12-02T06:11:18+00:00" }, { "name": "zendframework/zend-mvc", - "version": "2.4.13", + "version": "2.7.15", "source": { "type": "git", "url": "https://github.com/zendframework/zend-mvc.git", - "reference": "5ecf513a82fe9fdeee84919eee45e8098639df04" + "reference": "a8d45689d37a9e4ff4b75ea0b7478fa3d4f9c089" }, "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/a8d45689d37a9e4ff4b75ea0b7478fa3d4f9c089", + "reference": "a8d45689d37a9e4ff4b75ea0b7478fa3d4f9c089", "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" + "container-interop/container-interop": "^1.1", + "php": "^5.5 || ^7.0", + "zendframework/zend-console": "^2.7", + "zendframework/zend-eventmanager": "^2.6.4 || ^3.0", + "zendframework/zend-form": "^2.11", + "zendframework/zend-hydrator": "^1.1 || ^2.4", + "zendframework/zend-psr7bridge": "^0.2", + "zendframework/zend-servicemanager": "^2.7.10 || ^3.0.3", + "zendframework/zend-stdlib": "^2.7.5 || ^3.0" + }, + "replace": { + "zendframework/zend-router": "^2.0" }, "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" + "friendsofphp/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "^4.8.36", + "sebastian/comparator": "^1.2.4", + "sebastian/version": "^1.0.4", + "zendframework/zend-authentication": "^2.6", + "zendframework/zend-cache": "^2.8", + "zendframework/zend-di": "^2.6", + "zendframework/zend-filter": "^2.8", + "zendframework/zend-http": "^2.8", + "zendframework/zend-i18n": "^2.8", + "zendframework/zend-inputfilter": "^2.8", + "zendframework/zend-json": "^2.6.1", + "zendframework/zend-log": "^2.9.3", + "zendframework/zend-modulemanager": "^2.8", + "zendframework/zend-serializer": "^2.8", + "zendframework/zend-session": "^2.8.1", + "zendframework/zend-text": "^2.7", + "zendframework/zend-uri": "^2.6", + "zendframework/zend-validator": "^2.10", + "zendframework/zend-view": "^2.9" }, "suggest": { "zendframework/zend-authentication": "Zend\\Authentication component for Identity plugin", "zendframework/zend-config": "Zend\\Config component", - "zendframework/zend-console": "Zend\\Console component", "zendframework/zend-di": "Zend\\Di component", "zendframework/zend-filter": "Zend\\Filter component", "zendframework/zend-http": "Zend\\Http component", @@ -2897,22 +3410,24 @@ "zendframework/zend-log": "Zend\\Log component", "zendframework/zend-modulemanager": "Zend\\ModuleManager component", "zendframework/zend-serializer": "Zend\\Serializer component", + "zendframework/zend-servicemanager-di": "^1.0.1, if using zend-servicemanager v3 and requiring the zend-di integration", "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", - "zendframework/zend-version": "Zend\\Version component", "zendframework/zend-view": "Zend\\View component" }, "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": { + "files": [ + "src/autoload.php" + ], "psr-4": { "Zend\\Mvc\\": "src/" } @@ -2926,48 +3441,57 @@ "mvc", "zf2" ], - "time": "2015-09-14T16:32:50+00:00" + "time": "2018-05-03T13:13:41+00:00" }, { "name": "zendframework/zend-navigation", - "version": "2.4.13", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-navigation.git", - "reference": "2753d71f032ab0276e2ba5e6bb76fc20605bca36" + "reference": "a8b088f64929e172617e02d2089cc00573a61210" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-navigation/zipball/2753d71f032ab0276e2ba5e6bb76fc20605bca36", - "reference": "2753d71f032ab0276e2ba5e6bb76fc20605bca36", + "url": "https://api.github.com/repos/zendframework/zend-navigation/zipball/a8b088f64929e172617e02d2089cc00573a61210", + "reference": "a8b088f64929e172617e02d2089cc00573a61210", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" + "php": "^5.6 || ^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-config": "self.version", - "zendframework/zend-mvc": "self.version", - "zendframework/zend-permissions-acl": "self.version", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-view": "self.version" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.2", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-config": "^2.6 || ^3.1", + "zendframework/zend-console": "^2.6", + "zendframework/zend-http": "^2.6", + "zendframework/zend-i18n": "^2.7.3", + "zendframework/zend-log": "^2.9.1", + "zendframework/zend-mvc": "^2.7.9 || ^3.0.4", + "zendframework/zend-permissions-acl": "^2.6", + "zendframework/zend-router": "^3.0.2", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-uri": "^2.5.2", + "zendframework/zend-view": "^2.9" }, "suggest": { - "zendframework/zend-config": "Zend\\Config component", - "zendframework/zend-mvc": "Zend\\Mvc component", - "zendframework/zend-permissions-acl": "Zend\\Permissions\\Acl component", - "zendframework/zend-servicemanager": "Zend\\ServiceManager component", - "zendframework/zend-view": "Zend\\View component" + "zendframework/zend-config": "^2.6 || ^3.1, to provide page configuration (optional, as arrays and Traversables are also allowed)", + "zendframework/zend-permissions-acl": "^2.6, to provide ACL-based access restrictions to pages", + "zendframework/zend-router": "^3.0, to use router-based URI generation with Mvc pages", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3, to use the navigation factories", + "zendframework/zend-view": "^2.8.1, to use the navigation view helpers" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.9.x-dev", + "dev-develop": "2.10.x-dev" + }, + "zf": { + "component": "Zend\\Navigation", + "config-provider": "Zend\\Navigation\\ConfigProvider" } }, "autoload": { @@ -2979,42 +3503,42 @@ "license": [ "BSD-3-Clause" ], - "description": "provides support for managing trees of pointers to web pages", - "homepage": "https://github.com/zendframework/zend-navigation", + "description": "Manage trees of pointers to web pages in order to build navigation systems", "keywords": [ + "ZendFramework", "navigation", - "zf2" + "zf" ], - "time": "2015-05-07T14:55:31+00:00" + "time": "2018-04-25T20:19:50+00:00" }, { "name": "zendframework/zend-paginator", - "version": "2.4.13", + "version": "2.8.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-paginator.git", - "reference": "4e58de6d6c6d9cb0225e516e778ca06ff9f05ba0" + "reference": "fd58828c8280a90f133b9e0af2fe1a7885d47206" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-paginator/zipball/4e58de6d6c6d9cb0225e516e778ca06ff9f05ba0", - "reference": "4e58de6d6c6d9cb0225e516e778ca06ff9f05ba0", + "url": "https://api.github.com/repos/zendframework/zend-paginator/zipball/fd58828c8280a90f133b9e0af2fe1a7885d47206", + "reference": "fd58828c8280a90f133b9e0af2fe1a7885d47206", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-stdlib": "self.version" + "php": "^7.0 || ^5.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-cache": "self.version", - "zendframework/zend-db": "self.version", - "zendframework/zend-filter": "self.version", - "zendframework/zend-json": "self.version", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-view": "self.version" + "phpunit/phpunit": "^6.2.1 || ^5.7.15", + "zendframework/zend-cache": "^2.6.1", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-config": "^2.6.0", + "zendframework/zend-db": "^2.9.2", + "zendframework/zend-filter": "^2.6.1", + "zendframework/zend-json": "^2.6.1", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-view": "^2.6.3" }, "suggest": { "zendframework/zend-cache": "Zend\\Cache component to support cache features", @@ -3027,8 +3551,12 @@ "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\\Paginator", + "config-provider": "Zend\\Paginator\\ConfigProvider" } }, "autoload": { @@ -3040,33 +3568,34 @@ "license": [ "BSD-3-Clause" ], + "description": "zend-paginator is a flexible component for paginating collections of data and presenting that data to users.", "homepage": "https://github.com/zendframework/zend-paginator", "keywords": [ "paginator", "zf2" ], - "time": "2015-05-07T14:55:31+00:00" + "time": "2018-01-30T15:52:44+00:00" }, { "name": "zendframework/zend-permissions-acl", - "version": "2.6.0", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-permissions-acl.git", - "reference": "843bbd9c6f6d20b84dd0ce6c815d10397e98082b" + "reference": "c9568f4aee2887e43bf07769973f9686e8f61707" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-permissions-acl/zipball/843bbd9c6f6d20b84dd0ce6c815d10397e98082b", - "reference": "843bbd9c6f6d20b84dd0ce6c815d10397e98082b", + "url": "https://api.github.com/repos/zendframework/zend-permissions-acl/zipball/c9568f4aee2887e43bf07769973f9686e8f61707", + "reference": "c9568f4aee2887e43bf07769973f9686e8f61707", "shasum": "" }, "require": { - "php": "^5.5 || ^7.0" + "php": "^5.6 || ^7.0" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.5", + "zendframework/zend-coding-standard": "~1.0.0", "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3" }, "suggest": { @@ -3075,8 +3604,8 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev", - "dev-develop": "2.7-dev" + "dev-master": "2.7.x-dev", + "dev-develop": "2.8.x-dev" } }, "autoload": { @@ -3088,48 +3617,101 @@ "license": [ "BSD-3-Clause" ], - "description": "provides a lightweight and flexible access control list (ACL) implementation for privileges management", - "homepage": "https://github.com/zendframework/zend-permissions-acl", + "description": "Provides a lightweight and flexible access control list (ACL) implementation for privileges management", "keywords": [ + "ZendFramework", "acl", - "zf2" + "zf" + ], + "time": "2018-05-01T21:53:20+00:00" + }, + { + "name": "zendframework/zend-psr7bridge", + "version": "0.2.2", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-psr7bridge.git", + "reference": "86c0b53b0c6381391c4add4a93a56e51d5c74605" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-psr7bridge/zipball/86c0b53b0c6381391c4add4a93a56e51d5c74605", + "reference": "86c0b53b0c6381391c4add4a93a56e51d5c74605", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "psr/http-message": "^1.0", + "zendframework/zend-diactoros": "^1.1", + "zendframework/zend-http": "^2.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.7", + "squizlabs/php_codesniffer": "^2.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev", + "dev-develop": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Psr7Bridge\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR-7 <-> Zend\\Http bridge", + "homepage": "https://github.com/zendframework/zend-psr7bridge", + "keywords": [ + "http", + "psr", + "psr-7" ], - "time": "2016-02-03T21:46:45+00:00" + "time": "2016-05-10T21:44:39+00:00" }, { "name": "zendframework/zend-serializer", - "version": "2.4.13", + "version": "2.9.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-serializer.git", - "reference": "31a0da5c09f54fe76bc4e145e348b0d3d277aaf0" + "reference": "0172690db48d8935edaf625c4cba38b79719892c" }, "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/0172690db48d8935edaf625c4cba38b79719892c", + "reference": "0172690db48d8935edaf625c4cba38b79719892c", "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": "^5.7.25 || ^6.4.4", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-math": "^2.6 || ^3.0", + "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.9.x-dev", + "dev-develop": "2.10.x-dev" + }, + "zf": { + "component": "Zend\\Serializer", + "config-provider": "Zend\\Serializer\\ConfigProvider" } }, "autoload": { @@ -3142,35 +3724,37 @@ "BSD-3-Clause" ], "description": "provides an adapter based interface to simply generate storable representation of PHP types by different facilities, and recover", - "homepage": "https://github.com/zendframework/zend-serializer", "keywords": [ + "ZendFramework", "serializer", - "zf2" + "zf" ], - "time": "2015-05-07T14:55:31+00:00" + "time": "2018-05-14T18:45:18+00:00" }, { "name": "zendframework/zend-servicemanager", - "version": "2.4.13", + "version": "2.7.11", "source": { "type": "git", "url": "https://github.com/zendframework/zend-servicemanager.git", - "reference": "855294e12771b4295c26446b6ed2df2f1785f234" + "reference": "99ec9ed5d0f15aed9876433c74c2709eb933d4c7" }, "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/99ec9ed5d0f15aed9876433c74c2709eb933d4c7", + "reference": "99ec9ed5d0f15aed9876433c74c2709eb933d4c7", "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", @@ -3179,8 +3763,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": { @@ -3192,46 +3776,48 @@ "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-07T14:55:31+00:00" + "time": "2018-06-22T14:49:54+00:00" }, { "name": "zendframework/zend-session", - "version": "2.4.13", + "version": "2.8.5", "source": { "type": "git", "url": "https://github.com/zendframework/zend-session.git", - "reference": "5123393617a05ade012ddf3dc389f86dcbed7fdc" + "reference": "2cfd90e1a2f6b066b9f908599251d8f64f07021b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-session/zipball/5123393617a05ade012ddf3dc389f86dcbed7fdc", - "reference": "5123393617a05ade012ddf3dc389f86dcbed7fdc", + "url": "https://api.github.com/repos/zendframework/zend-session/zipball/2cfd90e1a2f6b066b9f908599251d8f64f07021b", + "reference": "2cfd90e1a2f6b066b9f908599251d8f64f07021b", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-eventmanager": "self.version", - "zendframework/zend-stdlib": "self.version" + "php": "^5.6 || ^7.0", + "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-cache": "self.version", - "zendframework/zend-db": "self.version", - "zendframework/zend-http": "self.version", - "zendframework/zend-servicemanager": "self.version", - "zendframework/zend-validator": "self.version" + "container-interop/container-interop": "^1.1", + "mongodb/mongodb": "^1.0.1", + "php-mock/php-mock-phpunit": "^1.1.2 || ^2.0", + "phpunit/phpunit": "^5.7.5 || >=6.0.13 <6.5.0", + "zendframework/zend-cache": "^2.6.1", + "zendframework/zend-coding-standard": "~1.0.0", + "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" @@ -3239,8 +3825,12 @@ "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\\Session", + "config-provider": "Zend\\Session\\ConfigProvider" } }, "autoload": { @@ -3253,38 +3843,41 @@ "BSD-3-Clause" ], "description": "manage and preserve session data, a logical complement of cookie data, across multiple page requests by the same client", - "homepage": "https://github.com/zendframework/zend-session", "keywords": [ + "ZendFramework", "session", - "zf2" + "zf" ], - "time": "2017-06-19T18:48:06+00:00" + "time": "2018-02-22T16:33:54+00:00" }, { "name": "zendframework/zend-stdlib", - "version": "2.4.13", + "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", @@ -3295,8 +3888,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": { @@ -3313,37 +3907,36 @@ "stdlib", "zf2" ], - "time": "2015-07-21T13:55:46+00:00" + "time": "2016-04-12T21:17:31+00:00" }, { "name": "zendframework/zend-uri", - "version": "2.4.13", + "version": "2.7.0", "source": { "type": "git", "url": "https://github.com/zendframework/zend-uri.git", - "reference": "33512866d20cc4bc54a0c1a6a0bdfcf5088939b3" + "reference": "b2785cd38fe379a784645449db86f21b7739b1ee" }, "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/b2785cd38fe379a784645449db86f21b7739b1ee", + "reference": "b2785cd38fe379a784645449db86f21b7739b1ee", "shasum": "" }, "require": { - "php": ">=5.3.23", - "zendframework/zend-escaper": "~2.4.0", - "zendframework/zend-validator": "~2.4.0" + "php": "^5.6 || ^7.0", + "zendframework/zend-escaper": "^2.5", + "zendframework/zend-validator": "^2.10" }, "require-dev": { - "fabpot/php-cs-fixer": "1.7.*", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master" + "phpunit/phpunit": "^5.7.27 || ^6.5.8 || ^7.1.4", + "zendframework/zend-coding-standard": "~1.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4-dev", - "dev-develop": "2.5-dev" + "dev-master": "2.7.x-dev", + "dev-develop": "2.8.x-dev" } }, "autoload": { @@ -3355,60 +3948,68 @@ "license": [ "BSD-3-Clause" ], - "description": "a component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)", - "homepage": "https://github.com/zendframework/zend-uri", + "description": "A component that aids in manipulating and validating » Uniform Resource Identifiers (URIs)", "keywords": [ + "ZendFramework", "uri", - "zf2" + "zf" ], - "time": "2015-09-14T16:17:10+00:00" + "time": "2019-02-27T21:39:04+00:00" }, { "name": "zendframework/zend-validator", - "version": "2.4.13", + "version": "2.11.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-validator.git", - "reference": "81415511fe729e6de19a61936313cef43c80d337" + "reference": "3c28dfe4e5951ba38059cea895244d9d206190b3" }, "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/3c28dfe4e5951ba38059cea895244d9d206190b3", + "reference": "3c28dfe4e5951ba38059cea895244d9d206190b3", "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", + "psr/http-message": "^1.0", + "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.8", + "zendframework/zend-uri": "^2.5" }, "suggest": { - "zendframework/zend-db": "Zend\\Db component", + "psr/http-message": "psr/http-message, required when validating PSR-7 UploadedFileInterface instances via the Upload and UploadFile validators", + "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, ^2.8; 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.11.x-dev", + "dev-develop": "2.12.x-dev" + }, + "zf": { + "component": "Zend\\Validator", + "config-provider": "Zend\\Validator\\ConfigProvider" } }, "autoload": { @@ -3426,30 +4027,30 @@ "validator", "zf2" ], - "time": "2015-09-08T21:04:17+00:00" + "time": "2019-01-29T22:26:39+00:00" }, { "name": "zendframework/zend-version", - "version": "2.4.13", + "version": "2.5.1", "source": { "type": "git", "url": "https://github.com/zendframework/zend-version.git", - "reference": "00d456c9fa490c8798801cc099a05f6c32ac9d2a" + "reference": "e30c55dc394eaf396f0347887af0a7bef471fe08" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/zend-version/zipball/00d456c9fa490c8798801cc099a05f6c32ac9d2a", - "reference": "00d456c9fa490c8798801cc099a05f6c32ac9d2a", + "url": "https://api.github.com/repos/zendframework/zend-version/zipball/e30c55dc394eaf396f0347887af0a7bef471fe08", + "reference": "e30c55dc394eaf396f0347887af0a7bef471fe08", "shasum": "" }, "require": { "php": ">=5.3.23", - "zendframework/zend-json": "self.version" + "zendframework/zend-json": "~2.5" }, "require-dev": { "fabpot/php-cs-fixer": "1.7.*", "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master" + "zendframework/zend-http": "~2.5" }, "suggest": { "zendframework/zend-http": "Allows use of Zend\\Http\\Client to check version information", @@ -3458,8 +4059,8 @@ "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": { @@ -3477,45 +4078,52 @@ "zf2" ], "abandoned": "ocramius/package-versions", - "time": "2017-07-13T17:22:10+00:00" + "time": "2015-06-04T15:41:05+00:00" }, { "name": "zendframework/zend-view", - "version": "2.4.13", + "version": "2.11.2", "source": { "type": "git", "url": "https://github.com/zendframework/zend-view.git", - "reference": "d81da0d932a0e35f8cbc6f10d80c8b4ab54973ea" + "reference": "4f5cb653ed4c64bb8d9bf05b294300feb00c67f2" }, "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/4f5cb653ed4c64bb8d9bf05b294300feb00c67f2", + "reference": "4f5cb653ed4c64bb8d9bf05b294300feb00c67f2", "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-json": "^2.6.1 || ^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-log": "^2.7", + "zendframework/zend-modulemanager": "^2.7.1", + "zendframework/zend-mvc": "^2.7.14 || ^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.8.1", + "zendframework/zend-uri": "^2.5" }, "suggest": { "zendframework/zend-authentication": "Zend\\Authentication component", @@ -3524,19 +4132,22 @@ "zendframework/zend-filter": "Zend\\Filter component", "zendframework/zend-http": "Zend\\Http component", "zendframework/zend-i18n": "Zend\\I18n component", - "zendframework/zend-json": "Zend\\Json component", "zendframework/zend-mvc": "Zend\\Mvc component", + "zendframework/zend-mvc-plugin-flashmessenger": "zend-mvc-plugin-flashmessenger component, if you want to use the FlashMessenger view helper with zend-mvc versions 3 and up", "zendframework/zend-navigation": "Zend\\Navigation component", "zendframework/zend-paginator": "Zend\\Paginator component", "zendframework/zend-permissions-acl": "Zend\\Permissions\\Acl component", "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.11.x-dev", + "dev-develop": "2.12.x-dev" } }, "autoload": { @@ -3554,7 +4165,7 @@ "view", "zf2" ], - "time": "2015-06-16T15:22:37+00:00" + "time": "2019-02-19T17:40:15+00:00" }, { "name": "zf-commons/zfc-base", @@ -3685,86 +4296,33 @@ "zf2" ], "time": "2016-05-07T11:21:34+00:00" - }, - { - "name": "zf-commons/zfc-user-doctrine-orm", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/ZF-Commons/ZfcUserDoctrineORM.git", - "reference": "252d77f55e64312184f3bcd4168292d919f11ceb" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ZF-Commons/ZfcUserDoctrineORM/zipball/252d77f55e64312184f3bcd4168292d919f11ceb", - "reference": "252d77f55e64312184f3bcd4168292d919f11ceb", - "shasum": "" - }, - "require": { - "doctrine/doctrine-orm-module": "0.*", - "php": ">=5.3.3", - "zf-commons/zfc-user": "1.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.1.x-dev" - } - }, - "autoload": { - "psr-0": { - "ZfcUserDoctrineORM": "src/" - }, - "classmap": [ - "./" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Kyle Spraggs", - "email": "theman@spiffyjr.me", - "homepage": "http://www.spiffyjr.me/" - }, - { - "name": "Evan Coury", - "email": "me@evancoury.com", - "homepage": "http://blog.evan.pro/" - } - ], - "description": "Doctrine2 ORM storage adapter for ZfcUser.", - "homepage": "https://github.com/ZF-Commons/ZfcUserDoctrineORM", - "keywords": [ - "zf2" - ], - "time": "2015-07-20T20:10:49+00:00" } ], "packages-dev": [ { "name": "myclabs/deep-copy", - "version": "1.7.0", + "version": "1.8.1", "source": { "type": "git", "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e" + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", - "reference": "3b8a3a99ba1f6a3952ac2747d989303cbd6b7a3e", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", + "reference": "3e01bdad3e18354c3dce54466b7fbe33a9f9f7f8", "shasum": "" }, "require": { - "php": "^5.6 || ^7.0" + "php": "^7.1" + }, + "replace": { + "myclabs/deep-copy": "self.version" }, "require-dev": { "doctrine/collections": "^1.0", "doctrine/common": "^2.6", - "phpunit/phpunit": "^4.1" + "phpunit/phpunit": "^7.1" }, "type": "library", "autoload": { @@ -3787,109 +4345,7 @@ "object", "object graph" ], - "time": "2017-10-19T19:58:43+00:00" - }, - { - "name": "phar-io/manifest", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", - "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "ext-phar": "*", - "phar-io/version": "^1.0.1", - "php": "^5.6 || ^7.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", - "time": "2017-03-05T18:14:27+00:00" - }, - { - "name": "phar-io/version", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", - "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", - "shasum": "" - }, - "require": { - "php": "^5.6 || ^7.0" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" - }, - { - "name": "Sebastian Heuer", - "email": "sebastian@phpeople.de", - "role": "Developer" - }, - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "Developer" - } - ], - "description": "Library for handling version information and constraints", - "time": "2017-03-05T17:38:23+00:00" + "time": "2018-06-11T23:09:50+00:00" }, { "name": "phpdocumentor/reflection-common", @@ -4045,33 +4501,33 @@ }, { "name": "phpspec/prophecy", - "version": "1.7.5", + "version": "1.8.0", "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401" + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/dfd6be44111a7c41c2e884a336cc4f461b3b2401", - "reference": "dfd6be44111a7c41c2e884a336cc4f461b3b2401", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4ba436b55987b4bf311cb7c6ba82aa528aac0a06", + "reference": "4ba436b55987b4bf311cb7c6ba82aa528aac0a06", "shasum": "" }, "require": { "doctrine/instantiator": "^1.0.2", "php": "^5.3|^7.0", "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0", - "sebastian/comparator": "^1.1|^2.0", + "sebastian/comparator": "^1.1|^2.0|^3.0", "sebastian/recursion-context": "^1.0|^2.0|^3.0" }, "require-dev": { "phpspec/phpspec": "^2.5|^3.2", - "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.7.x-dev" + "dev-master": "1.8.x-dev" } }, "autoload": { @@ -4104,44 +4560,44 @@ "spy", "stub" ], - "time": "2018-02-19T10:16:54+00:00" + "time": "2018-08-05T17:53:17+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "5.3.0", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1" + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/661f34d0bd3f1a7225ef491a70a020ad23a057a1", - "reference": "661f34d0bd3f1a7225ef491a70a020ad23a057a1", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef7b2f56815df854e66ceaee8ebe9393ae36a40d", + "reference": "ef7b2f56815df854e66ceaee8ebe9393ae36a40d", "shasum": "" }, "require": { "ext-dom": "*", "ext-xmlwriter": "*", - "php": "^7.0", - "phpunit/php-file-iterator": "^1.4.2", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^2.0.1", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.0", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "php": "^5.6 || ^7.0", + "phpunit/php-file-iterator": "^1.3", + "phpunit/php-text-template": "^1.2", + "phpunit/php-token-stream": "^1.4.2 || ^2.0", + "sebastian/code-unit-reverse-lookup": "^1.0", + "sebastian/environment": "^1.3.2 || ^2.0", + "sebastian/version": "^1.0 || ^2.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "ext-xdebug": "^2.1.4", + "phpunit/phpunit": "^5.7" }, "suggest": { - "ext-xdebug": "^2.5.5" + "ext-xdebug": "^2.5.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "5.3.x-dev" + "dev-master": "4.0.x-dev" } }, "autoload": { @@ -4156,7 +4612,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", + "email": "sb@sebastian-bergmann.de", "role": "lead" } ], @@ -4167,7 +4623,7 @@ "testing", "xunit" ], - "time": "2017-12-06T09:29:45+00:00" + "time": "2017-04-02T07:44:40+00:00" }, { "name": "phpunit/php-file-iterator", @@ -4357,16 +4813,16 @@ }, { "name": "phpunit/phpunit", - "version": "6.5.7", + "version": "5.7.27", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "6bd77b57707c236833d2b57b968e403df060c9d9" + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/6bd77b57707c236833d2b57b968e403df060c9d9", - "reference": "6bd77b57707c236833d2b57b968e403df060c9d9", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", + "reference": "b7803aeca3ccb99ad0a506fa80b64cd6a56bbc0c", "shasum": "" }, "require": { @@ -4375,35 +4831,33 @@ "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.6.1", - "phar-io/manifest": "^1.0.1", - "phar-io/version": "^1.0", - "php": "^7.0", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^5.3", - "phpunit/php-file-iterator": "^1.4.3", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^1.0.9", - "phpunit/phpunit-mock-objects": "^5.0.5", - "sebastian/comparator": "^2.1", - "sebastian/diff": "^2.0", - "sebastian/environment": "^3.1", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^1.0", - "sebastian/version": "^2.0.1" + "myclabs/deep-copy": "~1.3", + "php": "^5.6 || ^7.0", + "phpspec/prophecy": "^1.6.2", + "phpunit/php-code-coverage": "^4.0.4", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "^3.2", + "sebastian/comparator": "^1.2.4", + "sebastian/diff": "^1.4.3", + "sebastian/environment": "^1.3.4 || ^2.0", + "sebastian/exporter": "~2.0", + "sebastian/global-state": "^1.1", + "sebastian/object-enumerator": "~2.0", + "sebastian/resource-operations": "~1.0", + "sebastian/version": "^1.0.6|^2.0.1", + "symfony/yaml": "~2.1|~3.0|~4.0" }, "conflict": { - "phpdocumentor/reflection-docblock": "3.0.2", - "phpunit/dbunit": "<3.0" + "phpdocumentor/reflection-docblock": "3.0.2" }, "require-dev": { "ext-pdo": "*" }, "suggest": { "ext-xdebug": "*", - "phpunit/php-invoker": "^1.1" + "phpunit/php-invoker": "~1.1" }, "bin": [ "phpunit" @@ -4411,7 +4865,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "6.5.x-dev" + "dev-master": "5.7.x-dev" } }, "autoload": { @@ -4437,33 +4891,33 @@ "testing", "xunit" ], - "time": "2018-02-26T07:01:09+00:00" + "time": "2018-02-01T05:50:59+00:00" }, { "name": "phpunit/phpunit-mock-objects", - "version": "5.0.6", + "version": "3.4.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf" + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/33fd41a76e746b8fa96d00b49a23dadfa8334cdf", - "reference": "33fd41a76e746b8fa96d00b49a23dadfa8334cdf", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/a23b761686d50a560cc56233b9ecf49597cc9118", + "reference": "a23b761686d50a560cc56233b9ecf49597cc9118", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.0.5", - "php": "^7.0", - "phpunit/php-text-template": "^1.2.1", - "sebastian/exporter": "^3.1" + "doctrine/instantiator": "^1.0.2", + "php": "^5.6 || ^7.0", + "phpunit/php-text-template": "^1.2", + "sebastian/exporter": "^1.2 || ^2.0" }, "conflict": { - "phpunit/phpunit": "<6.0" + "phpunit/phpunit": "<5.4.0" }, "require-dev": { - "phpunit/phpunit": "^6.5" + "phpunit/phpunit": "^5.4" }, "suggest": { "ext-soap": "*" @@ -4471,7 +4925,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "5.0.x-dev" + "dev-master": "3.2.x-dev" } }, "autoload": { @@ -4486,7 +4940,7 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", + "email": "sb@sebastian-bergmann.de", "role": "lead" } ], @@ -4497,7 +4951,7 @@ "xunit" ], "abandoned": true, - "time": "2018-01-06T05:45:45+00:00" + "time": "2017-06-30T09:13:00+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", @@ -4546,30 +5000,30 @@ }, { "name": "sebastian/comparator", - "version": "2.1.3", + "version": "1.2.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", - "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/diff": "^2.0 || ^3.0", - "sebastian/exporter": "^3.1" + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" }, "require-dev": { - "phpunit/phpunit": "^6.4" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -4600,38 +5054,38 @@ } ], "description": "Provides the functionality to compare PHP values for equality", - "homepage": "https://github.com/sebastianbergmann/comparator", + "homepage": "http://www.github.com/sebastianbergmann/comparator", "keywords": [ "comparator", "compare", "equality" ], - "time": "2018-02-01T13:46:46+00:00" + "time": "2017-01-29T09:50:25+00:00" }, { "name": "sebastian/diff", - "version": "2.0.1", + "version": "1.4.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd" + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", - "reference": "347c1d8b49c5c3ee30c7040ea6fc446790e6bddd", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/7f066a26a962dbe58ddea9f72a4e82874a3975a4", + "reference": "7f066a26a962dbe58ddea9f72a4e82874a3975a4", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^5.3.3 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^6.2" + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -4658,32 +5112,32 @@ "keywords": [ "diff" ], - "time": "2017-08-03T08:09:46+00:00" + "time": "2017-05-22T07:24:03+00:00" }, { "name": "sebastian/environment", - "version": "3.1.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", - "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", "shasum": "" }, "require": { - "php": "^7.0" + "php": "^5.6 || ^7.0" }, "require-dev": { - "phpunit/phpunit": "^6.1" + "phpunit/phpunit": "^5.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -4708,34 +5162,34 @@ "environment", "hhvm" ], - "time": "2017-07-01T08:51:00+00:00" + "time": "2016-11-26T07:53:53+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937" + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/234199f4528de6d12aaa58b612e98f7d36adb937", - "reference": "234199f4528de6d12aaa58b612e98f7d36adb937", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/recursion-context": "^3.0" + "php": ">=5.3.3", + "sebastian/recursion-context": "~2.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -4775,27 +5229,27 @@ "export", "exporter" ], - "time": "2017-04-03T13:19:02+00:00" + "time": "2016-11-19T08:54:04+00:00" }, { "name": "sebastian/global-state", - "version": "2.0.0", + "version": "1.1.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "~4.2" }, "suggest": { "ext-uopz": "*" @@ -4803,7 +5257,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -4826,34 +5280,33 @@ "keywords": [ "global state" ], - "time": "2017-04-27T15:39:26+00:00" + "time": "2015-10-12T03:26:01+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.3", + "version": "2.0.1", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", - "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", "shasum": "" }, "require": { - "php": "^7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=5.6", + "sebastian/recursion-context": "~2.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "~5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -4873,77 +5326,32 @@ ], "description": "Traverses array structures and object graphs to enumerate all referenced objects", "homepage": "https://github.com/sebastianbergmann/object-enumerator/", - "time": "2017-08-03T12:35:26+00:00" - }, - { - "name": "sebastian/object-reflector", - "version": "1.1.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "773f97c67f28de00d397be301821b06708fca0be" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", - "reference": "773f97c67f28de00d397be301821b06708fca0be", - "shasum": "" - }, - "require": { - "php": "^7.0" - }, - "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1-dev" - } - }, - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" - } - ], - "description": "Allows reflection of object attributes, including inherited and non-public ones", - "homepage": "https://github.com/sebastianbergmann/object-reflector/", - "time": "2017-03-29T09:07:27+00:00" + "time": "2017-02-18T15:18:39+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.0", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", - "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", "shasum": "" }, "require": { - "php": "^7.0" + "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -4971,7 +5379,7 @@ ], "description": "Provides functionality to recursively process PHP variables", "homepage": "http://www.github.com/sebastianbergmann/recursion-context", - "time": "2017-03-03T06:23:57+00:00" + "time": "2016-11-19T07:33:16+00:00" }, { "name": "sebastian/resource-operations", @@ -5059,61 +5467,81 @@ "time": "2016-10-03T07:35:21+00:00" }, { - "name": "theseer/tokenizer", - "version": "1.1.0", + "name": "symfony/yaml", + "version": "v4.2.3", "source": { "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b" + "url": "https://github.com/symfony/yaml.git", + "reference": "d461670ee145092b7e2a56c1da7118f19cadadb0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/cb2f008f3f05af2893a87208fe6a6c4985483f8b", - "reference": "cb2f008f3f05af2893a87208fe6a6c4985483f8b", + "url": "https://api.github.com/repos/symfony/yaml/zipball/d461670ee145092b7e2a56c1da7118f19cadadb0", + "reference": "d461670ee145092b7e2a56c1da7118f19cadadb0", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.0" + "php": "^7.1.3", + "symfony/polyfill-ctype": "~1.8" + }, + "conflict": { + "symfony/console": "<3.4" + }, + "require-dev": { + "symfony/console": "~3.4|~4.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2-dev" + } + }, "autoload": { - "classmap": [ - "src/" + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", - "time": "2017-04-07T12:08:54+00:00" + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2019-01-16T20:35:37+00:00" }, { "name": "webmozart/assert", - "version": "1.3.0", + "version": "1.4.0", "source": { "type": "git", "url": "https://github.com/webmozart/assert.git", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a" + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozart/assert/zipball/0df1908962e7a3071564e857d86874dad1ef204a", - "reference": "0df1908962e7a3071564e857d86874dad1ef204a", + "url": "https://api.github.com/repos/webmozart/assert/zipball/83e253c8e0be5b0257b881e1827274667c5c17a9", + "reference": "83e253c8e0be5b0257b881e1827274667c5c17a9", "shasum": "" }, "require": { - "php": "^5.3.3 || ^7.0" + "php": "^5.3.3 || ^7.0", + "symfony/polyfill-ctype": "^1.8" }, "require-dev": { "phpunit/phpunit": "^4.6", @@ -5146,12 +5574,15 @@ "check", "validate" ], - "time": "2018-01-29T19:49:41+00:00" + "time": "2018-12-25T11:19:39+00:00" } ], "aliases": [], "minimum-stability": "stable", - "stability-flags": [], + "stability-flags": { + "unicaen/app": 20, + "unicaen/bjy-authorize": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": [], diff --git a/config/module.config.php b/config/module.config.php index bdf061af9de56d95f5fe5b1de9fd7a234381b9b4..14419ef267ad94a699a62d6b01505ca5ec7c71bf 100644 --- a/config/module.config.php +++ b/config/module.config.php @@ -1,14 +1,44 @@ [ - ['controller' => 'index', 'action' => 'index', 'roles' => []], - ['controller' => 'zfcuser', 'roles' => []], - ['controller' => 'Application\Controller\Index', 'roles' => []], + ['controller' => 'index', 'action' => 'index', 'roles' => 'guest'], + ['controller' => 'zfcuser', 'roles' => 'guest'], + ['controller' => 'Application\Controller\Index', 'roles' => 'guest'], - ['controller' => 'UnicaenApp\Controller\Application', 'action' => 'etab', 'roles' => []], - ['controller' => 'UnicaenApp\Controller\Application', 'action' => 'apropos', 'roles' => []], - ['controller' => 'UnicaenApp\Controller\Application', 'action' => 'contact', 'roles' => []], - ['controller' => 'UnicaenApp\Controller\Application', 'action' => 'plan', 'roles' => []], - ['controller' => 'UnicaenApp\Controller\Application', 'action' => 'mentions-legales', 'roles' => []], - ['controller' => 'UnicaenApp\Controller\Application', 'action' => 'informatique-et-libertes', 'roles' => []], - ['controller' => 'UnicaenApp\Controller\Application', 'action' => 'refresh-session', 'roles' => []], - ['controller' => 'UnicaenAuth\Controller\Utilisateur', 'action' => 'selectionner-profil', 'roles' => []], + ['controller' => 'UnicaenApp\Controller\Application', 'action' => 'etab', 'roles' => 'guest'], + ['controller' => 'UnicaenApp\Controller\Application', 'action' => 'apropos', 'roles' => 'guest'], + ['controller' => 'UnicaenApp\Controller\Application', 'action' => 'contact', 'roles' => 'guest'], + ['controller' => 'UnicaenApp\Controller\Application', 'action' => 'plan', 'roles' => 'guest'], + ['controller' => 'UnicaenApp\Controller\Application', 'action' => 'mentions-legales', 'roles' => 'guest'], + ['controller' => 'UnicaenApp\Controller\Application', 'action' => 'informatique-et-libertes', 'roles' => 'guest'], + ['controller' => 'UnicaenApp\Controller\Application', 'action' => 'refresh-session', 'roles' => 'guest'], + ['controller' => 'UnicaenAuth\Controller\Utilisateur', 'action' => 'selectionner-profil', 'roles' => 'guest'], - ['controller' => 'UnicaenAuth\Controller\Auth', 'action' => 'shibboleth', 'roles' => []], - ['controller' => 'UnicaenAuth\Controller\Auth', 'action' => 'requestPasswordReset', 'roles' => []], - ['controller' => 'UnicaenAuth\Controller\Auth', 'action' => 'changePassword', 'roles' => []], + ['controller' => 'UnicaenAuth\Controller\Auth', 'action' => 'shibboleth', 'roles' => 'guest'], + ['controller' => 'UnicaenAuth\Controller\Auth', 'action' => 'requestPasswordReset', 'roles' => 'guest'], + ['controller' => 'UnicaenAuth\Controller\Auth', 'action' => 'changePassword', 'roles' => 'guest'], ], ], ], @@ -411,20 +441,24 @@ return [ ], ], ], + // + //( ! ) Warning: Declaration of + // Application\Service\UserContextServiceAwareTrait::setUserContextService(Application\Service\UserContextService $userContextService) + // should be compatible with + // UnicaenAuth\Controller\UtilisateurController::setUserContextService(UnicaenAuth\Service\UserContext $userContextService) + // in /var/www/sygal/module/Application/src/Application/Controller/UtilisateurController.php on line 34 'service_manager' => [ 'aliases' => [ 'Zend\Authentication\AuthenticationService' => 'zfcuser_auth_service', 'UnicaenAuth\Privilege\PrivilegeProvider' => 'UnicaenAuth\Service\Privilege', + '\UnicaenAuth\Guard\PrivilegeController' => 'UnicaenAuth\Guard\PrivilegeController', 'unicaen-auth_user_service' => 'UnicaenAuth\Service\User', // pour la compatibilité 'authUserContext' => 'UnicaenAuth\Service\UserContext', // pour la compatibilité + 'AuthUserContext' => 'UnicaenAuth\Service\UserContext', // pour la compatibilité ], 'invokables' => [ - 'UnicaenAuth\Authentication\Storage\Db' => 'UnicaenAuth\Authentication\Storage\Db', - 'UnicaenAuth\Authentication\Storage\Ldap' => 'UnicaenAuth\Authentication\Storage\Ldap', - 'UnicaenAuth\Authentication\Storage\Shib' => 'UnicaenAuth\Authentication\Storage\Shib', 'UnicaenAuth\View\RedirectionStrategy' => 'UnicaenAuth\View\RedirectionStrategy', - 'UnicaenAuth\Service\User' => 'UnicaenAuth\Service\User', 'UnicaenAuth\Service\CategoriePrivilege' => 'UnicaenAuth\Service\CategoriePrivilegeService', ], 'abstract_factories' => [ @@ -449,6 +483,24 @@ return [ 'UnicaenAuth\Service\UserContext' => UserContextFactory::class, 'zfcuser_user_mapper' => UserMapperFactory::class, 'MouchardCompleterAuth' => 'UnicaenAuth\Mouchard\MouchardCompleterAuthFactory', + 'UnicaenAuth\Authentication\Storage\Db' => DbFactory::class, + 'UnicaenAuth\Authentication\Storage\Ldap' => LdapFactory::class, + 'UnicaenAuth\Authentication\Storage\Shib' => ShibFactory::class, + 'UnicaenAuth\Service\User' => UserFactory::class, + 'UnicaenAuth\Guard\PrivilegeController' => PrivilegeControllerFactory::class, + 'UnicaenAuth\Guard\PrivilegeRoute' => PrivilegeRouteFactory::class, + 'UnicaenAuth\Provider\Rule\PrivilegeRuleProvider' => PrivilegeRuleProviderFactory::class, + ], + 'lazy_services' => [ + // Mapping services to their class names is required since the ServiceManager is not a declarative DIC. + 'class_map' => [ + 'zfcuser_auth_service' => AuthenticationService::class, + ], + ], + 'delegators' => [ + 'zfcuser_auth_service' => [ + LazyServiceFactory::class, + ], ], 'shared' => [ 'MouchardCompleterAuth' => false, @@ -460,33 +512,48 @@ return [ 'controllers' => [ 'invokables' => [ - 'UnicaenAuth\Controller\Utilisateur' => 'UnicaenAuth\Controller\UtilisateurController', - 'UnicaenAuth\Controller\Droits' => 'UnicaenAuth\Controller\DroitsController', ], 'factories' => [ 'UnicaenAuth\Controller\Auth' => AuthControllerFactory::class, + 'UnicaenAuth\Controller\Utilisateur' => UtilisateurControllerFactory::class, + 'UnicaenAuth\Controller\Droits' => DroitsControllerFactory::class, ], ], 'form_elements' => [ 'invokables' => [ - 'UnicaenAuth\Form\Droits\Role' => 'UnicaenAuth\Form\Droits\RoleForm', + ], + 'factories' => [ + 'UnicaenAuth\Form\Droits\Role' => RoleFormFactory::class, ], ], 'view_helpers' => [ - 'factories' => [ - 'userConnection' => 'UnicaenAuth\View\Helper\UserConnectionFactory', - 'userCurrent' => 'UnicaenAuth\View\Helper\UserCurrentFactory', - 'userStatus' => 'UnicaenAuth\View\Helper\UserStatusFactory', - 'userProfile' => 'UnicaenAuth\View\Helper\UserProfileFactory', - 'userInfo' => 'UnicaenAuth\View\Helper\UserInfoFactory', - 'userProfileSelect' => 'UnicaenAuth\View\Helper\UserProfileSelectFactory', - 'userProfileSelectRadioItem' => 'UnicaenAuth\View\Helper\UserProfileSelectRadioItemFactory', - 'userUsurpation' => UserUsurpationHelperFactory::class, - 'localConnect' => LocalConnectViewHelperFactory::class, - 'ldapConnect' => LdapConnectViewHelperFactory::class, - 'shibConnect' => ShibConnectViewHelperFactory::class, + 'aliases' => [ + 'userConnection' => UserConnection::class, + 'userCurrent' => UserCurrent::class, + 'userStatus' => UserStatus::class, + 'userProfile' => UserProfile::class, + 'userInfo' => UserInfo::class, + 'userProfileSelect' => UserProfileSelect::class, + 'userProfileSelectRadioItem' => UserProfileSelectRadioItem::class, + 'userUsurpation' => UserUsurpationHelper::class, + 'localConnect' => LocalConnectViewHelper::class, + 'ldapConnect' => LdapConnectViewHelper::class, + 'shibConnect' => ShibConnectViewHelper::class, + ], + 'factories' => [ + UserConnection::class => UserConnectionFactory::class, + UserCurrent::class => UserCurrentFactory::class, + UserStatus::class => UserStatusFactory::class, + UserProfile::class => UserProfileFactory::class, + UserInfo::class => UserInfoFactory::class, + UserProfileSelect::class => UserProfileSelectFactory::class, + UserProfileSelectRadioItem::class => UserProfileSelectRadioItemFactory::class, + UserUsurpationHelper::class => UserUsurpationHelperFactory::class, + LocalConnectViewHelper::class => LocalConnectViewHelperFactory::class, + LdapConnectViewHelper::class => LdapConnectViewHelperFactory::class, + ShibConnectViewHelper::class => ShibConnectViewHelperFactory::class, ], 'invokables' => [ 'appConnection' => 'UnicaenAuth\View\Helper\AppConnection', diff --git a/doc/installation.md b/doc/installation.md index bfbbbe1dfd26a5874db2941c5527880e2697686b..ec583b6cac9cc17a3b921e6f270c6f6154c3f6b3 100644 --- a/doc/installation.md +++ b/doc/installation.md @@ -35,7 +35,7 @@ La commande ci-dessus fonctionne seulement si le binaire composer.phar se trouve 'modules' => array( 'Application', - 'ZfcBase', 'DoctrineModule', 'DoctrineORMModule', 'ZfcUser', 'ZfcUserDoctrineORM', 'BjyAuthorize', + 'ZfcBase', 'DoctrineModule', 'DoctrineORMModule', 'ZfcUser', 'BjyAuthorize', 'UnicaenApp', 'AssetManager', 'UnicaenAuth', // ... diff --git a/language/msgids.php b/language/msgids.php index 9e90b4e7b2da1f7988d3e7c60268a12cb5c84e3a..27a0d14da9806d7f0a362aff3a897ae5c7631435 100644 --- a/language/msgids.php +++ b/language/msgids.php @@ -1,7 +1,7 @@ mvcEvent = $mvcEvent; + } /** * @return MvcEvent */ protected function getMvcEvent() { - $application = $this->getServiceLocator()->get('Application'); - - /* @var $application Application */ - - return $application->getMvcEvent(); + return $this->mvcEvent; } + /** + * @var Authorize + */ + private $serviceAuthorize; + /** + * @param Authorize $serviceAuthorize + */ + public function setServiceAuthorize(Authorize $serviceAuthorize) + { + $this->serviceAuthorize = $serviceAuthorize; + } /** * @return Authorize */ private function getServiceAuthorize() { - $serviceAuthorize = $this->getServiceLocator()->get('BjyAuthorize\Service\Authorize'); - /* @var $serviceAuthorize Authorize */ - - return $serviceAuthorize; + return $this->serviceAuthorize; } - + /** + * @param FlashMessenger $fm + * @deprecated Merci d'abandonner cette méthode : SoC violation ! + */ + public function setFlashMessenger(FlashMessenger $fm) + { + $this->fm = $fm; + } /** * @return FlashMessenger + * @deprecated Merci d'abandonner cette méthode : SoC violation ! */ protected function flashMessenger() { - if (!$this->fm){ - $this->fm = $this->getServiceLocator()->get('controllerpluginmanager')->get('flashmessenger'); - } - return $this->fm; } } \ No newline at end of file diff --git a/src/UnicaenAuth/Authentication/Adapter/AbstractFactory.php b/src/UnicaenAuth/Authentication/Adapter/AbstractFactory.php index d5ce3734895e54b34a65aa6f602008f194ccd5df..629eca68cd3f5c0c0986a94d175d0ccb8c38d0e2 100644 --- a/src/UnicaenAuth/Authentication/Adapter/AbstractFactory.php +++ b/src/UnicaenAuth/Authentication/Adapter/AbstractFactory.php @@ -2,11 +2,16 @@ namespace UnicaenAuth\Authentication\Adapter; +use Interop\Container\ContainerInterface; use UnicaenApp\Exception\LogicException; +use UnicaenAuth\Options\ModuleOptions; +use UnicaenAuth\Service\User; use Zend\EventManager\EventManager; use Zend\EventManager\EventManagerAwareInterface; +use Zend\Router\Http\TreeRouteStack; use Zend\ServiceManager\AbstractFactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; +use UnicaenApp\Mapper\Ldap\People as LdapPeopleMapper; /** * Description of AbstractFactory @@ -15,28 +20,22 @@ use Zend\ServiceManager\ServiceLocatorInterface; */ class AbstractFactory implements AbstractFactoryInterface { - /** - * Determine if we can create a service with name - * - * @param ServiceLocatorInterface $serviceLocator - * @param $name - * @param $requestedName - * @return bool - */ public function canCreateServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName) { - return strpos($requestedName, __NAMESPACE__) === 0 && class_exists($requestedName); + return $this->canCreate($serviceLocator, $requestedName); } - /** - * Create service with name - * - * @param ServiceLocatorInterface $serviceLocator - * @param $name - * @param $requestedName - * @return \ZfcUser\Authentication\Adapter\AbstractAdapter - */ public function createServiceWithName(ServiceLocatorInterface $serviceLocator, $name, $requestedName) + { + return $this->__invoke($serviceLocator, $requestedName); + } + + public function canCreate(ContainerInterface $container, $requestedName) + { + return strpos($requestedName, __NAMESPACE__) === 0 && class_exists($requestedName); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { switch ($requestedName) { case __NAMESPACE__ . '\Ldap': @@ -59,14 +58,69 @@ class AbstractFactory implements AbstractFactoryInterface break; } + $this->injectDependencies($adapter, $container); + if ($adapter instanceof EventManagerAwareInterface) { /** @var EventManager $eventManager */ - $eventManager = $serviceLocator->get('event_manager'); + $eventManager = $container->get('EventManager'); $adapter->setEventManager($eventManager); - $userService = $serviceLocator->get('unicaen-auth_user_service'); /* @var $userService \UnicaenAuth\Service\User */ + $userService = $container->get('unicaen-auth_user_service'); /* @var $userService \UnicaenAuth\Service\User */ $eventManager->attach('userAuthenticated', [$userService, 'userAuthenticated'], 100); } return $adapter; } + + /** + * @param Ldap|Db|Cas $adapter + * @param ContainerInterface $container + */ + private function injectDependencies($adapter, ContainerInterface $container) + { + switch (true) { + + case $adapter instanceof Ldap: + /** @var User $userService */ + $userService = $container->get('unicaen-auth_user_service'); + $adapter->setUserService($userService); + + /** @var LdapPeopleMapper $ldapPeopleMapper */ + $ldapPeopleMapper = $container->get('ldap_people_mapper'); + $adapter->setLdapPeopleMapper($ldapPeopleMapper); + + $options = array_merge( + $container->get('zfcuser_module_options')->toArray(), + $container->get('unicaen-auth_module_options')->toArray()); + $adapter->setOptions(new ModuleOptions($options)); + + /** @var \UnicaenApp\Options\ModuleOptions $appModuleOptions */ + $appModuleOptions = $container->get('unicaen-app_module_options'); + $adapter->setAppModuleOptions($appModuleOptions); + + break; + + case $adapter instanceof Cas: + /** @var User $userService */ + $userService = $container->get('unicaen-auth_user_service'); + $adapter->setUserService($userService); + + /** @var TreeRouteStack $router */ + $router = $container->get('router'); + $adapter->setRouter($router); + + $options = array_merge( + $container->get('zfcuser_module_options')->toArray(), + $container->get('unicaen-auth_module_options')->toArray()); + $adapter->setOptions(new ModuleOptions($options)); + + /** @var LdapPeopleMapper $ldapPeopleMapper */ + $ldapPeopleMapper = $container->get('ldap_people_mapper'); + $adapter->setLdapPeopleMapper($ldapPeopleMapper); + + break; + + default: + break; + } + } } \ No newline at end of file diff --git a/src/UnicaenAuth/Authentication/Adapter/Cas.php b/src/UnicaenAuth/Authentication/Adapter/Cas.php index 562446f4a4c32f5030cc144c24d18f1a9e7f9f05..d73b9cf6f4c4d57a19722122f19d430b03b6b26d 100644 --- a/src/UnicaenAuth/Authentication/Adapter/Cas.php +++ b/src/UnicaenAuth/Authentication/Adapter/Cas.php @@ -8,14 +8,13 @@ use UnicaenAuth\Options\ModuleOptions; use UnicaenAuth\Service\User; use Zend\Authentication\Exception\UnexpectedValueException; use Zend\Authentication\Result as AuthenticationResult; +use Zend\EventManager\Event; +use Zend\EventManager\EventInterface; use Zend\EventManager\EventManager; use Zend\EventManager\EventManagerAwareInterface; use Zend\EventManager\EventManagerInterface; -use Zend\Mvc\Router\Http\TreeRouteStack; -use Zend\ServiceManager\ServiceManager; -use Zend\ServiceManager\ServiceManagerAwareInterface; +use Zend\Router\Http\TreeRouteStack; use ZfcUser\Authentication\Adapter\AbstractAdapter; -use ZfcUser\Authentication\Adapter\AdapterChainEvent as AuthEvent; use ZfcUser\Authentication\Adapter\ChainableAdapter; /** @@ -23,13 +22,8 @@ use ZfcUser\Authentication\Adapter\ChainableAdapter; * * @author Bertrand GAUTHIER */ -class Cas extends AbstractAdapter implements ServiceManagerAwareInterface, EventManagerAwareInterface +class Cas extends AbstractAdapter implements EventManagerAwareInterface { - /** - * @var ServiceManager - */ - protected $serviceManager; - /** * @var EventManager */ @@ -55,16 +49,46 @@ class Cas extends AbstractAdapter implements ServiceManagerAwareInterface, Event */ protected $ldapPeopleMapper; + /** + * @var User + */ + private $userService; + + /** + * @param User $userService + */ + public function setUserService(User $userService) + { + $this->userService = $userService; + } + + /** + * @var TreeRouteStack + */ + private $router; + + /** + * @param TreeRouteStack $router + */ + public function setRouter(TreeRouteStack $router) + { + $this->router = $router; + } + /** * Réalise l'authentification. * - * @param AuthEvent $e - * @return boolean + * @param EventInterface $e * @throws UnexpectedValueException * @see ChainableAdapter */ - public function authenticate(AuthEvent $e) + public function authenticate(EventInterface $e) { + // NB: Dans la version 3.0.0 de zf-commons/zfc-user, cette méthode prend un EventInterface. + // Mais dans la branche 3.x, c'est un AdapterChainEvent ! + // Si un jour c'est un AdapterChainEvent qui est attendu, plus besoin de faire $e->getTarget(). + $e = $e->getTarget(); + // if ($e->getIdentity()) { // return; // } @@ -105,23 +129,21 @@ class Cas extends AbstractAdapter implements ServiceManagerAwareInterface, Event $ldapPeople = $this->getLdapPeopleMapper()->findOneByUsername($identity); /* @var $userService User */ - $userService = $this->getServiceManager()->get('unicaen-auth_user_service'); - $userService->userAuthenticated($ldapPeople); + $this->userService->userAuthenticated($ldapPeople); } /** * - * @param AuthEvent $e + * @param Event $e * @see ChainableAdapter */ - public function logout(AuthEvent $e) + public function logout(Event $e) { if (!$this->getOptions()->getCas()) { return; // NB: l'authentification CAS est désactivée ssi le tableau des options est vide } - $router = $this->getServiceManager()->get('router'); /* @var $router TreeRouteStack */ - $returnUrl = $router->getRequestUri()->setPath($router->getBaseUrl())->toString(); + $returnUrl = $this->router->getRequestUri()->setPath($this->router->getBaseUrl())->toString(); $this->getCasClient()->logoutWithRedirectService($returnUrl); } @@ -189,12 +211,12 @@ class Cas extends AbstractAdapter implements ServiceManagerAwareInterface, Event */ public function getOptions() { - if (!$this->options instanceof ModuleOptions) { - $options = array_merge( - $this->getServiceManager()->get('zfcuser_module_options')->toArray(), - $this->getServiceManager()->get('unicaen-auth_module_options')->toArray()); - $this->setOptions(new ModuleOptions($options)); - } +// if (!$this->options instanceof ModuleOptions) { +// $options = array_merge( +// $this->serviceLocator->get('zfcuser_module_options')->toArray(), +// $this->serviceLocator->get('unicaen-auth_module_options')->toArray()); +// $this->setOptions(new ModuleOptions($options)); +// } return $this->options; } @@ -205,9 +227,6 @@ class Cas extends AbstractAdapter implements ServiceManagerAwareInterface, Event */ public function getLdapPeopleMapper() { - if (null === $this->ldapPeopleMapper) { - $this->ldapPeopleMapper = $this->getServiceManager()->get('ldap_people_mapper'); - } return $this->ldapPeopleMapper; } @@ -220,28 +239,7 @@ class Cas extends AbstractAdapter implements ServiceManagerAwareInterface, Event public function setLdapPeopleMapper(LdapPeopleMapper $mapper) { $this->ldapPeopleMapper = $mapper; - return $this; - } - /** - * Get service manager - * - * @return ServiceManager - */ - public function getServiceManager() - { - return $this->serviceManager; - } - - /** - * Set service manager - * - * @param ServiceManager $serviceManager - * @return self - */ - public function setServiceManager(ServiceManager $serviceManager) - { - $this->serviceManager = $serviceManager; return $this; } @@ -256,10 +254,7 @@ class Cas extends AbstractAdapter implements ServiceManagerAwareInterface, Event } /** - * Inject an EventManager instance - * - * @param EventManagerInterface $eventManager - * @return self + * {@inheritdoc} */ public function setEventManager(EventManagerInterface $eventManager) { diff --git a/src/UnicaenAuth/Authentication/Adapter/Db.php b/src/UnicaenAuth/Authentication/Adapter/Db.php index c216906cad54541e8b4308cb81a3bf33939fe859..12edbac385f83a805bddafba885aad3314de0612 100644 --- a/src/UnicaenAuth/Authentication/Adapter/Db.php +++ b/src/UnicaenAuth/Authentication/Adapter/Db.php @@ -2,12 +2,12 @@ namespace UnicaenAuth\Authentication\Adapter; +use Interop\Container\ContainerInterface; +use UnicaenApp\ServiceManager\ServiceLocatorAwareInterface; +use UnicaenApp\ServiceManager\ServiceLocatorAwareTrait; use UnicaenAuth\Options\ModuleOptions; +use Zend\EventManager\EventInterface; use Zend\ServiceManager\Exception\ServiceNotFoundException; -use Zend\ServiceManager\ServiceManager; -use Zend\ServiceManager\ServiceManagerAwareInterface; -use ZfcUser\Authentication\Adapter\AdapterChainEvent as AuthEvent; -use ZfcUser\Options\AuthenticationOptionsInterface; /** * Adpater d'authentification à partir de la base de données. @@ -17,29 +17,44 @@ use ZfcUser\Options\AuthenticationOptionsInterface; * * @author Bertrand GAUTHIER */ -class Db extends \ZfcUser\Authentication\Adapter\Db implements ServiceManagerAwareInterface +class Db extends \ZfcUser\Authentication\Adapter\Db implements ServiceLocatorAwareInterface { + use ServiceLocatorAwareTrait; + /** - * @var ServiceManager + * Set service locator + * + * @param ContainerInterface $serviceLocator + * @return self + * @deprecated Abandonnez l'injection du service locator, svp */ - protected $serviceManager; + public function setServiceLocator(ContainerInterface $serviceLocator) + { + $this->serviceLocator = $serviceLocator; + $this->serviceManager = $serviceLocator; + + return $this; + } /** * Authentification. * - * @param AuthEvent $e + * @param EventInterface $e * @return boolean */ - public function authenticate(AuthEvent $e) + public function authenticate(EventInterface $e) { - if ($e->getIdentity()) { - return; + // NB: Dans la version 3.0.0 de zf-commons/zfc-user, cette méthode prend un EventInterface. + // Mais dans la branche 3.x, c'est un AdapterChainEvent ! + // Si un jour c'est un AdapterChainEvent qui est attendu, plus besoin de faire $e->getTarget(). + if ($e->getTarget()->getIdentity()) { + return true; } try { $result = parent::authenticate($e); } - catch (ServiceNotFoundException $e) { + catch (ServiceNotFoundException $snfe) { return false; } @@ -47,10 +62,10 @@ class Db extends \ZfcUser\Authentication\Adapter\Db implements ServiceManagerAwa } /** - * @param AuthenticationOptionsInterface $options + * @param \ZfcUser\Options\ModuleOptions $options * @return self */ - public function setOptions(AuthenticationOptionsInterface $options) + public function setOptions(\ZfcUser\Options\ModuleOptions $options) { $this->options = $options; return $this; @@ -66,26 +81,4 @@ class Db extends \ZfcUser\Authentication\Adapter\Db implements ServiceManagerAwa } return $this->options; } - - /** - * Get service manager - * - * @return ServiceManager - */ - public function getServiceManager() - { - return $this->serviceManager; - } - - /** - * Set service manager - * - * @param ServiceManager $serviceManager - * @return self - */ - public function setServiceManager(ServiceManager $serviceManager) - { - $this->serviceManager = $serviceManager; - return $this; - } } \ No newline at end of file diff --git a/src/UnicaenAuth/Authentication/Adapter/Ldap.php b/src/UnicaenAuth/Authentication/Adapter/Ldap.php index b910a79059a6e22176afe19df36ca33c05c729c9..5a8d49e4bbac8bdd2d832d2dba0c8d2c113668fb 100644 --- a/src/UnicaenAuth/Authentication/Adapter/Ldap.php +++ b/src/UnicaenAuth/Authentication/Adapter/Ldap.php @@ -10,13 +10,11 @@ use Zend\Authentication\Adapter\Ldap as LdapAuthAdapter; use Zend\Authentication\Exception\ExceptionInterface; use Zend\Authentication\Result as AuthenticationResult; use Zend\EventManager\Event; +use Zend\EventManager\EventInterface; use Zend\EventManager\EventManager; use Zend\EventManager\EventManagerAwareInterface; use Zend\EventManager\EventManagerInterface; -use Zend\ServiceManager\ServiceManager; -use Zend\ServiceManager\ServiceManagerAwareInterface; use ZfcUser\Authentication\Adapter\AbstractAdapter; -use ZfcUser\Authentication\Adapter\AdapterChainEvent as AuthEvent; use ZfcUser\Authentication\Adapter\ChainableAdapter; /** @@ -24,15 +22,10 @@ use ZfcUser\Authentication\Adapter\ChainableAdapter; * * @author Bertrand GAUTHIER */ -class Ldap extends AbstractAdapter implements ServiceManagerAwareInterface, EventManagerAwareInterface +class Ldap extends AbstractAdapter implements EventManagerAwareInterface { const USURPATION_USERNAMES_SEP = '='; - /** - * @var ServiceManager - */ - protected $serviceManager; - /** * @var EventManager */ @@ -58,16 +51,47 @@ class Ldap extends AbstractAdapter implements ServiceManagerAwareInterface, Even */ protected $usernameUsurpe; + /** + * @var User + */ + private $userService; + + /** + * @param User $userService + */ + public function setUserService(User $userService) + { + $this->userService = $userService; + } + + /** + * @var \UnicaenApp\Options\ModuleOptions + */ + private $appModuleOptions; + + /** + * @param \UnicaenApp\Options\ModuleOptions $appModuleOptions + */ + public function setAppModuleOptions(\UnicaenApp\Options\ModuleOptions $appModuleOptions) + { + $this->appModuleOptions = $appModuleOptions; + } + /** * - * @param AuthEvent $e + * @param EventInterface $e * @return boolean * @throws \Zend\Authentication\Adapter\Exception\ExceptionInterface * @throws \Zend\Ldap\Exception\LdapException * @see ChainableAdapter */ - public function authenticate(AuthEvent $e) + public function authenticate(EventInterface $e) { + // NB: Dans la version 3.0.0 de zf-commons/zfc-user, cette méthode prend un EventInterface. + // Mais dans la branche 3.x, c'est un AdapterChainEvent ! + // Si un jour c'est un AdapterChainEvent qui est attendu, plus besoin de faire $e->getTarget(). + $e = $e->getTarget(); + if ($this->isSatisfied()) { try { $storage = $this->getStorage()->read(); @@ -122,8 +146,7 @@ class Ldap extends AbstractAdapter implements ServiceManagerAwareInterface, Even ->setMessages(['Authentication successful.']); /* @var $userService User */ - $userService = $this->getServiceManager()->get('unicaen-auth_user_service'); - $userService->userAuthenticated($ldapPeople); + $this->userService->userAuthenticated($ldapPeople); } /** @@ -179,10 +202,11 @@ class Ldap extends AbstractAdapter implements ServiceManagerAwareInterface, Even // Obtenir le message LDAP // $msg = preg_replace('/\[0x\d* \((.*)\):/','$1', $event->getParam('result')->getMessages()[1]); $eventClasse = new Event('authentication.ldap.error'); - $eventClasse->setTarget($this)->setParams([ + $eventClasse->setTarget($this); + $eventClasse->setParams([ 'result' => $result ]); - $this->getEventManager()->trigger($eventClasse); + $this->getEventManager()->triggerEvent($eventClasse); } $success = $result->isValid(); @@ -206,9 +230,6 @@ class Ldap extends AbstractAdapter implements ServiceManagerAwareInterface, Even */ public function getLdapPeopleMapper() { - if (null === $this->ldapPeopleMapper) { - $this->ldapPeopleMapper = $this->getServiceManager()->get('ldap_people_mapper'); - } return $this->ldapPeopleMapper; } @@ -237,12 +258,6 @@ class Ldap extends AbstractAdapter implements ServiceManagerAwareInterface, Even */ public function getOptions() { - if (!$this->options instanceof ModuleOptions) { - $options = array_merge( - $this->getServiceManager()->get('zfcuser_module_options')->toArray(), - $this->getServiceManager()->get('unicaen-auth_module_options')->toArray()); - $this->setOptions(new ModuleOptions($options)); - } return $this->options; } @@ -251,7 +266,7 @@ class Ldap extends AbstractAdapter implements ServiceManagerAwareInterface, Even */ public function getAppModuleOptions() { - return $this->getServiceManager()->get('unicaen-app_module_options'); + return $this->appModuleOptions; } /** @@ -285,28 +300,6 @@ class Ldap extends AbstractAdapter implements ServiceManagerAwareInterface, Even return $this; } - /** - * Get service manager - * - * @return ServiceManager - */ - public function getServiceManager() - { - return $this->serviceManager; - } - - /** - * Set service manager - * - * @param ServiceManager $serviceManager - * @return Ldap - */ - public function setServiceManager(ServiceManager $serviceManager) - { - $this->serviceManager = $serviceManager; - return $this; - } - /** * Retrieve EventManager instance * @@ -318,10 +311,7 @@ class Ldap extends AbstractAdapter implements ServiceManagerAwareInterface, Even } /** - * Inject an EventManager instance - * - * @param EventManagerInterface $eventManager - * @return Ldap + * {@inheritdoc} */ public function setEventManager(EventManagerInterface $eventManager) { diff --git a/src/UnicaenAuth/Authentication/AuthenticationServiceFactory.php b/src/UnicaenAuth/Authentication/AuthenticationServiceFactory.php index a4e448cc6086db7a692a2a2b9819766970f2c0cd..a7d905750a6a6558e7e40fdd94b4a1de5a396a7f 100644 --- a/src/UnicaenAuth/Authentication/AuthenticationServiceFactory.php +++ b/src/UnicaenAuth/Authentication/AuthenticationServiceFactory.php @@ -2,9 +2,10 @@ namespace UnicaenAuth\Authentication; +use Interop\Container\ContainerInterface; +use Zend\Authentication\AuthenticationService; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -use Zend\Authentication\AuthenticationService; /** * Description of AuthenticationServiceFactory @@ -13,17 +14,16 @@ use Zend\Authentication\AuthenticationService; */ class AuthenticationServiceFactory implements FactoryInterface { - /** - * Create service - * - * @param ServiceLocatorInterface $serviceLocator - * @return AuthenticationService - */ public function createService(ServiceLocatorInterface $serviceLocator) + { + return $this->__invoke($serviceLocator, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { return new AuthenticationService( - $serviceLocator->get('UnicaenAuth\Authentication\Storage\Chain'), - $serviceLocator->get('ZfcUser\Authentication\Adapter\AdapterChain') + $container->get('UnicaenAuth\Authentication\Storage\Chain'), + $container->get('ZfcUser\Authentication\Adapter\AdapterChain') ); } } \ No newline at end of file diff --git a/src/UnicaenAuth/Authentication/RedirectCallback.php b/src/UnicaenAuth/Authentication/RedirectCallback.php index a31bb379884b6e74dae8e73326e5f8c871126fdf..c0c48f9518bd5efe774727e89e33aaa3a7e8c2c0 100644 --- a/src/UnicaenAuth/Authentication/RedirectCallback.php +++ b/src/UnicaenAuth/Authentication/RedirectCallback.php @@ -5,8 +5,8 @@ namespace UnicaenAuth\Authentication; use Zend\Http\PhpEnvironment\Request; use Zend\Http\PhpEnvironment\Response; use Zend\Mvc\Application; -use Zend\Mvc\Router\Exception; -use Zend\Mvc\Router\RouteInterface; +use Zend\Router\Exception; +use Zend\Router\RouteInterface; use ZfcUser\Options\ModuleOptions; /** diff --git a/src/UnicaenAuth/Authentication/RedirectCallbackFactory.php b/src/UnicaenAuth/Authentication/RedirectCallbackFactory.php index 76359f280485d7ae18552ec91a5070530a5df790..e4e5a97c94fea2d61d87f08d3b8d78bd4fb85faa 100644 --- a/src/UnicaenAuth/Authentication/RedirectCallbackFactory.php +++ b/src/UnicaenAuth/Authentication/RedirectCallbackFactory.php @@ -2,30 +2,29 @@ namespace UnicaenAuth\Authentication; +use Interop\Container\ContainerInterface; use Zend\Mvc\Application; -use Zend\Mvc\Router\RouteInterface; +use Zend\Router\RouteInterface; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; use ZfcUser\Options\ModuleOptions; class RedirectCallbackFactory implements FactoryInterface { - /** - * Create service - * - * @param ServiceLocatorInterface $serviceLocator - * @return mixed - */ public function createService(ServiceLocatorInterface $serviceLocator) + { return $this->__invoke($serviceLocator, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { /* @var RouteInterface $router */ - $router = $serviceLocator->get('Router'); + $router = $container->get('Router'); /* @var Application $application */ - $application = $serviceLocator->get('Application'); + $application = $container->get('Application'); /* @var ModuleOptions $options */ - $options = $serviceLocator->get('zfcuser_module_options'); + $options = $container->get('zfcuser_module_options'); return new RedirectCallback($application, $router, $options); } diff --git a/src/UnicaenAuth/Authentication/Storage/Chain.php b/src/UnicaenAuth/Authentication/Storage/Chain.php index e6b98179ff0c2377bf75420cd964a04af158e140..bf958d08747eabe3709f9c96bb7bdef14f3ebbb9 100644 --- a/src/UnicaenAuth/Authentication/Storage/Chain.php +++ b/src/UnicaenAuth/Authentication/Storage/Chain.php @@ -69,7 +69,8 @@ class Chain implements StorageInterface, EventManagerAwareInterface } $e = $this->getEvent(); - $this->getEventManager()->trigger('read', $e); + $e->setName('read'); + $this->getEventManager()->triggerEvent($e); $identity = $e->getContents(); @@ -95,8 +96,9 @@ class Chain implements StorageInterface, EventManagerAwareInterface $this->getStorage()->write($contents); $e = $this->getEvent(); + $e->setName('write'); $e->setParams(compact('contents')); - $this->getEventManager()->trigger('write', $e); + $this->getEventManager()->triggerEvent($e); } /** @@ -110,7 +112,8 @@ class Chain implements StorageInterface, EventManagerAwareInterface $this->getStorage()->clear(); $e = $this->getEvent(); - $this->getEventManager()->trigger('clear', $e); + $e->setName('clear'); + $this->getEventManager()->triggerEvent($e); } /** @@ -139,10 +142,7 @@ class Chain implements StorageInterface, EventManagerAwareInterface } /** - * Inject an EventManager instance - * - * @param EventManagerInterface $eventManager - * @return self + * {@inheritdoc} */ public function setEventManager(EventManagerInterface $eventManager) { diff --git a/src/UnicaenAuth/Authentication/Storage/ChainServiceFactory.php b/src/UnicaenAuth/Authentication/Storage/ChainServiceFactory.php index 02fbd70ee4a0532749427c7ca83deb86be0a7314..ca4eafcb3cdce63d85b912262047cdc232970268 100644 --- a/src/UnicaenAuth/Authentication/Storage/ChainServiceFactory.php +++ b/src/UnicaenAuth/Authentication/Storage/ChainServiceFactory.php @@ -2,7 +2,9 @@ namespace UnicaenAuth\Authentication\Storage; +use Interop\Container\ContainerInterface; use UnicaenAuth\Options\ModuleOptions; +use Zend\EventManager\EventManager; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; @@ -21,18 +23,22 @@ class ChainServiceFactory implements FactoryInterface protected $storages = []; - /** - * Create service - * - * @param ServiceLocatorInterface $serviceLocator - * @return mixed - */ public function createService(ServiceLocatorInterface $serviceLocator) + { + return $this->__invoke($serviceLocator, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { $chain = new Chain(); + /** @var EventManager $eventManager */ + $eventManager = $container->get('EventManager'); + + $chain->setEventManager($eventManager); + /** @var ModuleOptions $options */ - $options = $serviceLocator->get('unicaen-auth_module_options'); + $options = $container->get('unicaen-auth_module_options'); // retrait du fournisseur Ldap si l'auth LDAP est désactivée if (isset($options->getLdap()['enabled']) && ! $options->getLdap()['enabled']) { @@ -43,7 +49,7 @@ class ChainServiceFactory implements FactoryInterface krsort($storages); foreach ($storages as $priority => $name) { - $storage = $serviceLocator->get($name); + $storage = $container->get($name); $chain->getEventManager()->attach('read', [$storage, 'read'], $priority); $chain->getEventManager()->attach('write', [$storage, 'write'], $priority); $chain->getEventManager()->attach('clear', [$storage, 'clear'], $priority); diff --git a/src/UnicaenAuth/Authentication/Storage/Db.php b/src/UnicaenAuth/Authentication/Storage/Db.php index 1169c56105f710b72c1c2b5d282c8878944dc42e..7e2d96821b8e92516693bdad41e85b020e113b6a 100644 --- a/src/UnicaenAuth/Authentication/Storage/Db.php +++ b/src/UnicaenAuth/Authentication/Storage/Db.php @@ -6,8 +6,6 @@ use Doctrine\DBAL\DBALException; use Zend\Authentication\Storage\Session; use Zend\Authentication\Storage\StorageInterface; use Zend\ServiceManager\Exception\ServiceNotFoundException; -use Zend\ServiceManager\ServiceManager; -use Zend\ServiceManager\ServiceManagerAwareInterface; use ZfcUser\Mapper\UserInterface as UserMapper; /** @@ -15,7 +13,7 @@ use ZfcUser\Mapper\UserInterface as UserMapper; * * @author Bertrand GAUTHIER */ -class Db implements ChainableStorage, ServiceManagerAwareInterface +class Db implements ChainableStorage { /** * @var StorageInterface @@ -32,11 +30,6 @@ class Db implements ChainableStorage, ServiceManagerAwareInterface */ protected $resolvedIdentity; - /** - * @var ServiceManager - */ - protected $serviceManager; - /** * Returns the contents of storage * @@ -176,9 +169,6 @@ class Db implements ChainableStorage, ServiceManagerAwareInterface */ public function getMapper() { - if (null === $this->mapper) { - $this->mapper = $this->getServiceManager()->get('zfcuser_user_mapper'); - } return $this->mapper; } @@ -193,26 +183,4 @@ class Db implements ChainableStorage, ServiceManagerAwareInterface $this->mapper = $mapper; return $this; } - - /** - * Retrieve service manager instance - * - * @return ServiceManager - */ - public function getServiceManager() - { - return $this->serviceManager; - } - - /** - * Set service manager instance - * - * @param ServiceManager $serviceManager - * @return self - */ - public function setServiceManager(ServiceManager $serviceManager) - { - $this->serviceManager = $serviceManager; - return $this; - } } \ No newline at end of file diff --git a/src/UnicaenAuth/Authentication/Storage/DbFactory.php b/src/UnicaenAuth/Authentication/Storage/DbFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..6adb6698b32b9ce474ee4da052e0cea03399ef31 --- /dev/null +++ b/src/UnicaenAuth/Authentication/Storage/DbFactory.php @@ -0,0 +1,27 @@ +get('zfcuser_user_mapper'); + + $storage = new Db(); + $storage->setMapper($mapper); + + return $storage; + } + + public function createService(ServiceLocatorInterface $serviceLocator) + { + return $this->__invoke($serviceLocator, '?'); + } +} \ No newline at end of file diff --git a/src/UnicaenAuth/Authentication/Storage/Ldap.php b/src/UnicaenAuth/Authentication/Storage/Ldap.php index c3140f7fa417d86f47b473296e2a5432bfd5295c..aafe406674928b9279fa9063fce825f40e3f146d 100644 --- a/src/UnicaenAuth/Authentication/Storage/Ldap.php +++ b/src/UnicaenAuth/Authentication/Storage/Ldap.php @@ -2,21 +2,18 @@ namespace UnicaenAuth\Authentication\Storage; -use UnicaenAuth\Entity\Ldap\People; use UnicaenApp\Mapper\Ldap\People as LdapPeopleMapper; +use UnicaenAuth\Entity\Ldap\People; use UnicaenAuth\Options\ModuleOptions; -use Zend\Authentication\Exception\InvalidArgumentException; -use Zend\Authentication\Storage\StorageInterface; -use Zend\ServiceManager\ServiceManager; -use Zend\ServiceManager\ServiceManagerAwareInterface; use Zend\Authentication\Storage\Session; +use Zend\Authentication\Storage\StorageInterface; /** * Ldap authentication storage. * * @author Bertrand GAUTHIER */ -class Ldap implements ChainableStorage, ServiceManagerAwareInterface +class Ldap implements ChainableStorage { /** * @var StorageInterface @@ -38,17 +35,12 @@ class Ldap implements ChainableStorage, ServiceManagerAwareInterface */ protected $resolvedIdentity; - /** - * @var ServiceManager - */ - protected $serviceManager; - /** * Returns the contents of storage * * Behavior is undefined when storage is empty. * - * @throws InvalidArgumentException If reading contents from storage is impossible + * @param ChainEvent $e * @return People */ public function read(ChainEvent $e) @@ -61,8 +53,7 @@ class Ldap implements ChainableStorage, ServiceManagerAwareInterface } /** - * - * @return null + * @return People|null */ protected function findIdentity() { @@ -92,13 +83,11 @@ class Ldap implements ChainableStorage, ServiceManagerAwareInterface return $this->resolvedIdentity; } - + /** * Writes $contents to storage * - * @param mixed $contents - * @throws InvalidArgumentException If writing $contents to storage is impossible - * @return void + * @param ChainEvent $e */ public function write(ChainEvent $e) { @@ -111,8 +100,7 @@ class Ldap implements ChainableStorage, ServiceManagerAwareInterface /** * Clears contents from storage * - * @throws InvalidArgumentException If clearing contents from storage is impossible - * @return void + * @param ChainEvent $e */ public function clear(ChainEvent $e) { @@ -153,9 +141,6 @@ class Ldap implements ChainableStorage, ServiceManagerAwareInterface */ public function getMapper() { - if (null === $this->mapper) { - $this->mapper = $this->getServiceManager()->get('ldap_people_mapper'); - } return $this->mapper; } @@ -171,30 +156,9 @@ class Ldap implements ChainableStorage, ServiceManagerAwareInterface return $this; } - /** - * Retrieve service manager instance - * - * @return ServiceManager - */ - public function getServiceManager() - { - return $this->serviceManager; - } - - /** - * Set service manager instance - * - * @param ServiceManager $locator - * @return self - */ - public function setServiceManager(ServiceManager $serviceManager) - { - $this->serviceManager = $serviceManager; - return $this; - } - /** * @param ModuleOptions $options + * @return Ldap */ public function setOptions(ModuleOptions $options = null) { @@ -207,9 +171,6 @@ class Ldap implements ChainableStorage, ServiceManagerAwareInterface */ public function getOptions() { - if (!$this->options instanceof ModuleOptions) { - $this->setOptions($this->getServiceManager()->get('unicaen-auth_module_options')); - } return $this->options; } } diff --git a/src/UnicaenAuth/Authentication/Storage/LdapFactory.php b/src/UnicaenAuth/Authentication/Storage/LdapFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..3c337b498f388fa2fa257ff23cc835617fe92474 --- /dev/null +++ b/src/UnicaenAuth/Authentication/Storage/LdapFactory.php @@ -0,0 +1,32 @@ +get('ldap_people_mapper'); + + /** @var ModuleOptions $options */ + $options = $container->get('unicaen-auth_module_options'); + + $storage = new Ldap(); + $storage->setMapper($mapper); + $storage->setOptions($options); + + return $storage; + } + + public function createService(ServiceLocatorInterface $serviceLocator) + { + return $this->__invoke($serviceLocator, '?'); + } +} \ No newline at end of file diff --git a/src/UnicaenAuth/Authentication/Storage/Shib.php b/src/UnicaenAuth/Authentication/Storage/Shib.php index 8d8a81c9178bf4d255581983de3db12fd6adb290..76b7cc8c26f1f43bf9e70563c0e1b6e9302a3300 100644 --- a/src/UnicaenAuth/Authentication/Storage/Shib.php +++ b/src/UnicaenAuth/Authentication/Storage/Shib.php @@ -3,11 +3,9 @@ namespace UnicaenAuth\Authentication\Storage; use UnicaenAuth\Entity\Shibboleth\ShibUser; -use UnicaenAuth\Service\ShibService; +use UnicaenAuth\Service\Traits\ShibServiceAwareTrait; use Zend\Authentication\Storage\Session; use Zend\Authentication\Storage\StorageInterface; -use Zend\ServiceManager\ServiceLocatorAwareInterface; -use Zend\ServiceManager\ServiceLocatorAwareTrait; use Zend\ServiceManager\ServiceManager; /** @@ -15,9 +13,9 @@ use Zend\ServiceManager\ServiceManager; * * @author Unicaen */ -class Shib implements ChainableStorage, ServiceLocatorAwareInterface +class Shib implements ChainableStorage { - use ServiceLocatorAwareTrait; + use ShibServiceAwareTrait; /** * @var StorageInterface @@ -61,10 +59,7 @@ class Shib implements ChainableStorage, ServiceLocatorAwareInterface return $this->resolvedIdentity; } - /** @var ShibService $shib */ - $shib = $this->getServiceLocator()->get(ShibService::class); - - $this->resolvedIdentity = $shib->getAuthenticatedUser(); + $this->resolvedIdentity = $this->shibService->getAuthenticatedUser(); return $this->resolvedIdentity; } diff --git a/src/UnicaenAuth/Authentication/Storage/ShibFactory.php b/src/UnicaenAuth/Authentication/Storage/ShibFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..decd9e843972a6ca136f4d2163fa0be1f4d0b1d5 --- /dev/null +++ b/src/UnicaenAuth/Authentication/Storage/ShibFactory.php @@ -0,0 +1,27 @@ +get(ShibService::class); + + $storage = new Shib(); + $storage->setShibService($shibService); + + return $storage; + } + + public function createService(ServiceLocatorInterface $serviceLocator) + { + return $this->__invoke($serviceLocator, '?'); + } +} \ No newline at end of file diff --git a/src/UnicaenAuth/Controller/AuthController.php b/src/UnicaenAuth/Controller/AuthController.php index 79856b6264bd6d878f26f3eeaeb685c961227c03..2e90358a8e8df5610a109013b64d646220339833 100644 --- a/src/UnicaenAuth/Controller/AuthController.php +++ b/src/UnicaenAuth/Controller/AuthController.php @@ -30,6 +30,19 @@ class AuthController extends AbstractActionController use ShibServiceAwareTrait; use UserServiceAwareTrait; + /** + * @var AuthenticationService + */ + private $authenticationService; + + /** + * @param AuthenticationService $authenticationService + */ + public function setAuthenticationService(AuthenticationService $authenticationService) + { + $this->authenticationService = $authenticationService; + } + /** * Cette action peut être appelée lorsque l'authentification Shibboleth est activée * (unicaen-auth.shibboleth.enable === true). @@ -101,7 +114,7 @@ class AuthController extends AbstractActionController private function setStoredAuthenticatedUsername($username) { /** @var AuthenticationService $authService */ - $authService = $this->getServiceLocator()->get('zfcuser_auth_service'); + $authService = $this->authenticationService; try { $authService->getStorage()->write($username); } catch (ExceptionInterface $e) { diff --git a/src/UnicaenAuth/Controller/AuthControllerFactory.php b/src/UnicaenAuth/Controller/AuthControllerFactory.php index e771651f537a0b3566d3de03b8fbc24ecce55068..609c96f1d31b281933b61143bf3e1e25d493bd5f 100644 --- a/src/UnicaenAuth/Controller/AuthControllerFactory.php +++ b/src/UnicaenAuth/Controller/AuthControllerFactory.php @@ -2,27 +2,32 @@ namespace UnicaenAuth\Controller; +use Interop\Container\ContainerInterface; use UnicaenAuth\Service\ShibService; use UnicaenAuth\Service\User as UserService; -use Zend\Mvc\Controller\ControllerManager; +use Zend\Authentication\AuthenticationService; class AuthControllerFactory { /** - * @param ControllerManager $cm + * @param ContainerInterface $container * @return AuthController */ - public function __invoke(ControllerManager $cm) + public function __invoke(ContainerInterface $container) { /** @var ShibService $shibService */ - $shibService = $cm->getServiceLocator()->get(ShibService::class); + $shibService = $container->get(ShibService::class); /* @var $userService UserService */ - $userService = $cm->getServiceLocator()->get('unicaen-auth_user_service'); + $userService = $container->get('unicaen-auth_user_service'); + + /** @var AuthenticationService $authService */ + $authService = $container->get('zfcuser_auth_service'); $controller = new AuthController(); $controller->setShibService($shibService); $controller->setUserService($userService); + $controller->setAuthenticationService($authService); return $controller; } diff --git a/src/UnicaenAuth/Controller/DroitsControllerFactory.php b/src/UnicaenAuth/Controller/DroitsControllerFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..9f3ede96022c53bbe0df51cf7fe2768d31b06319 --- /dev/null +++ b/src/UnicaenAuth/Controller/DroitsControllerFactory.php @@ -0,0 +1,32 @@ +get('UnicaenAuth\Service\Role'); + /** @var RoleForm $formDroitsRole */ + $formDroitsRole = $container->get('FormElementManager')->get('UnicaenAuth\Form\Droits\Role'); + /** @var PrivilegeService $servicePrivilege */ + $servicePrivilege = $container->get('UnicaenAuth\Service\Privilege'); + + $controller = new DroitsController(); + $controller->setServiceRole($serviceRole); + $controller->setFormDroitsRole($formDroitsRole); + $controller->setServicePrivilege($servicePrivilege); + + return $controller; + } +} \ No newline at end of file diff --git a/src/UnicaenAuth/Controller/UtilisateurController.php b/src/UnicaenAuth/Controller/UtilisateurController.php index e7b019dc45dbc753b46d0e9c9f2bd459e1b7a420..ca94363b6b6fca450099ce6004224cb843258f6a 100644 --- a/src/UnicaenAuth/Controller/UtilisateurController.php +++ b/src/UnicaenAuth/Controller/UtilisateurController.php @@ -9,6 +9,8 @@ use UnicaenAuth\Entity\Ldap\People; use UnicaenAuth\Entity\Shibboleth\ShibUser; use UnicaenAuth\Options\ModuleOptions; use UnicaenAuth\Service\ShibService; +use UnicaenAuth\Service\Traits\ShibServiceAwareTrait; +use UnicaenAuth\Service\Traits\UserContextServiceAwareTrait; use UnicaenAuth\Service\UserContext; use Zend\Authentication\AuthenticationService; use Zend\Http\Request; @@ -21,11 +23,70 @@ use ZfcUser\Mapper\User as UserMapper; */ class UtilisateurController extends AbstractActionController { + use UserContextServiceAwareTrait; + use ShibServiceAwareTrait; + /** * @var LdapPeopleMapper */ protected $ldapPeopleMapper; + /** + * @param LdapPeopleMapper $ldapPeopleMapper + */ + public function setLdapPeopleMapper(LdapPeopleMapper $ldapPeopleMapper) + { + $this->ldapPeopleMapper = $ldapPeopleMapper; + } + + /** + * @var UserMapper + */ + private $userMapper; + + /** + * @var AuthenticationService + */ + protected $authenticationService; + + /** + * @var ModuleOptions + */ + protected $options; + + /** + * @param UserMapper $userMapper + */ + public function setUserMapper(UserMapper $userMapper) + { + $this->userMapper = $userMapper; + } + + /** + * @param AuthenticationService $authenticationService + */ + public function setAuthenticationService(AuthenticationService $authenticationService) + { + $this->authenticationService = $authenticationService; + } + + /** + * @param ModuleOptions $options + */ + public function setOptions(ModuleOptions $options) + { + $this->options = $options; + } + + /** + * @param UserContext $userContextService + * @deprecated Utiliser UserContextServiceAwareTrait::setServiceUserContext() à la place, svp. + */ + public function setUserContextService(UserContext $userContextService) + { + $this->serviceUserContext = $userContextService; + } + /** * Traite les requêtes AJAX POST de sélection d'un profil utilisateur. * La sélection est mémorisé en session par le service AuthUserContext. @@ -46,11 +107,11 @@ class UtilisateurController extends AbstractActionController $role = $request->getPost('role'); if ($role) { - $this->getAuthUserContextService()->setSelectedIdentityRole($role); + $this->serviceUserContext->setSelectedIdentityRole($role); } if ($addFlashMessage) { - $selectedRole = $this->getAuthUserContextService()->getSelectedIdentityRoleToString(); + $selectedRole = $this->serviceUserContext->getSelectedIdentityRoleToString(); $message = sprintf("Vous endossez à présent le profil utilisateur %s.", $selectedRole); $this->flashMessenger()->setNamespace('UnicaenAuth/success')->addMessage($message); } @@ -75,10 +136,7 @@ class UtilisateurController extends AbstractActionController return $this->redirect()->toRoute('home'); } - /** @var AuthenticationService $authenticationService */ - $authenticationService = $this->getServiceLocator()->get(AuthenticationService::class); - - $currentIdentity = $authenticationService->getIdentity(); + $currentIdentity = $this->authenticationService->getIdentity(); if (! $currentIdentity || ! is_array($currentIdentity)) { return $this->redirect()->toRoute('home'); } @@ -111,9 +169,7 @@ class UtilisateurController extends AbstractActionController } // seuls les logins spécifiés dans la config sont habilités à usurper des identités - /** @var ModuleOptions $options */ - $options = $this->getServiceLocator()->get('unicaen-auth_module_options'); - if (! in_array($currentIdentity->getUsername(), $options->getUsurpationAllowedUsernames())) { + if (! in_array($currentIdentity->getUsername(), $this->options->getUsurpationAllowedUsernames())) { throw new RuntimeException("Usurpation non explicitement autorisée"); } @@ -121,12 +177,10 @@ class UtilisateurController extends AbstractActionController if ($currentIdentity instanceof ShibUser) { $fromShibUser = $currentIdentity; $toShibUser = $this->createShibUserFromUtilisateurUsername($newIdentity); - /** @var ShibService $shibService */ - $shibService = $this->getServiceLocator()->get(ShibService::class); - $shibService->activateUsurpation($fromShibUser, $toShibUser); + $this->shibService->activateUsurpation($fromShibUser, $toShibUser); } - $authenticationService->getStorage()->write($newIdentity); + $this->authenticationService->getStorage()->write($newIdentity); return $this->redirect()->toRoute('home'); } @@ -162,15 +216,16 @@ class UtilisateurController extends AbstractActionController */ public function getUserMapper() { - return $this->getServiceLocator()->get('zfcuser_user_mapper'); + return $this->userMapper; } /** * @return UserContext + * @deprecated Utiliser $this->serviceUserContext directement, svp. */ protected function getAuthUserContextService() { - return $this->getServiceLocator()->get('AuthUserContext'); + return $this->serviceUserContext; } /** @@ -178,6 +233,6 @@ class UtilisateurController extends AbstractActionController */ public function getLdapPeopleMapper() { - return $this->serviceLocator->get('ldap_people_mapper'); + return $this->ldapPeopleMapper; } } \ No newline at end of file diff --git a/src/UnicaenAuth/Controller/UtilisateurControllerFactory.php b/src/UnicaenAuth/Controller/UtilisateurControllerFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..06216028a5271520628b83c463fbf8daf89791ba --- /dev/null +++ b/src/UnicaenAuth/Controller/UtilisateurControllerFactory.php @@ -0,0 +1,49 @@ +get('zfcuser_user_mapper'); + + /** @var AuthenticationService $authenticationService */ + $authenticationService = $container->get(AuthenticationService::class); + + /** @var ModuleOptions $options */ + $options = $container->get('unicaen-auth_module_options'); + + /** @var ShibService $shibService */ + $shibService = $container->get(ShibService::class); + + /** @var UserContext $userContextService */ + $userContextService = $container->get('AuthUserContext'); + + /** @var LdapPeopleMapper $mapper */ + $ldapPeopleMapper = $container->get('ldap_people_mapper'); + + $controller = new UtilisateurController(); + $controller->setLdapPeopleMapper($ldapPeopleMapper); + $controller->setServiceUserContext($userContextService); + $controller->setOptions($options); + $controller->setShibService($shibService); + $controller->setAuthenticationService($authenticationService); + $controller->setUserMapper($userMapper); + + return $controller; + } +} \ No newline at end of file diff --git a/src/UnicaenAuth/Entity/Db/AbstractRole.php b/src/UnicaenAuth/Entity/Db/AbstractRole.php index ba211994ecc4210d236d3ec7be70ab67d2d1315b..55f838aee59f41ab352afb171124574bf62c436b 100644 --- a/src/UnicaenAuth/Entity/Db/AbstractRole.php +++ b/src/UnicaenAuth/Entity/Db/AbstractRole.php @@ -189,11 +189,7 @@ abstract class AbstractRole implements RoleInterface } /** - * Add a user to the role. - * - * @param UserInterface $user - * - * @return void + * {@inheritdoc} */ public function addUser(UserInterface $user) { diff --git a/src/UnicaenAuth/Entity/Db/AbstractUser.php b/src/UnicaenAuth/Entity/Db/AbstractUser.php index e463a3a7eaf851d06da83e6004a3c0d16770dc29..39d3ace892961efcc45c560e51fee0180418c89b 100644 --- a/src/UnicaenAuth/Entity/Db/AbstractUser.php +++ b/src/UnicaenAuth/Entity/Db/AbstractUser.php @@ -93,12 +93,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface * Set id. * * @param int $id - * - * @return void + * @return self */ public function setId($id) { $this->id = (int) $id; + + return $this; } /** @@ -115,12 +116,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface * Set username. * * @param string $username - * - * @return void + * @return self */ public function setUsername($username) { $this->username = $username; + + return $this; } /** @@ -137,12 +139,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface * Set email. * * @param string $email - * - * @return void + * @return self */ public function setEmail($email) { $this->email = $email; + + return $this; } /** @@ -159,12 +162,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface * Set displayName. * * @param string $displayName - * - * @return void + * @return self */ public function setDisplayName($displayName) { $this->displayName = $displayName; + + return $this; } /** @@ -181,12 +185,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface * Set password. * * @param string $password - * - * @return void + * @return self */ public function setPassword($password) { $this->password = $password; + + return $this; } /** @@ -203,12 +208,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface * Set state. * * @param int $state - * - * @return void + * @return self */ public function setState($state) { $this->state = $state; + + return $this; } /** @@ -221,10 +227,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface /** * @param string $passwordResetToken + * @return self */ public function setPasswordResetToken($passwordResetToken = null) { $this->passwordResetToken = $passwordResetToken; + + return $this; } /** @@ -241,12 +250,13 @@ abstract class AbstractUser implements UserInterface, ProviderInterface * Add a role to the user. * * @param RoleInterface $role - * - * @return void + * @return self */ public function addRole(RoleInterface $role) { $this->roles->add($role); + + return $this; } /** diff --git a/src/UnicaenAuth/Entity/Shibboleth/ShibUser.php b/src/UnicaenAuth/Entity/Shibboleth/ShibUser.php index d444b1c4c27e91895e3cecddda93d849660ee73c..8cba0fd40c89b2ef49a9552523008ea009998fd5 100644 --- a/src/UnicaenAuth/Entity/Shibboleth/ShibUser.php +++ b/src/UnicaenAuth/Entity/Shibboleth/ShibUser.php @@ -67,9 +67,7 @@ class ShibUser implements UserInterface } /** - * Get id. - * - * @return string + * {@inheritdoc} */ public function getId() { diff --git a/src/UnicaenAuth/Event/Listener/AuthenticatedUserSavedAbstractListener.php b/src/UnicaenAuth/Event/Listener/AuthenticatedUserSavedAbstractListener.php index bf92d45b2be94e4c7a3ef4bc92c047dfb8b045e9..a0de58e5ac2a3a0f8ef0ce39d62e6005f3fbd04b 100644 --- a/src/UnicaenAuth/Event/Listener/AuthenticatedUserSavedAbstractListener.php +++ b/src/UnicaenAuth/Event/Listener/AuthenticatedUserSavedAbstractListener.php @@ -48,14 +48,9 @@ abstract class AuthenticatedUserSavedAbstractListener implements ListenerAggrega } /** - * Attach one or more listeners - * - * Implementors may add an optional $priority argument; the EventManager - * implementation will pass this to the aggregate. - * - * @param EventManagerInterface $events + * {@inheritdoc} */ - public function attach(EventManagerInterface $events) + public function attach(EventManagerInterface $events, $priority = 1) { $sharedEvents = $events->getSharedManager(); diff --git a/src/UnicaenAuth/Event/Listener/UserRoleSelectedEventAbstractListener.php b/src/UnicaenAuth/Event/Listener/UserRoleSelectedEventAbstractListener.php index 24410c2b111b2719c2b588197d6437920b1c4e99..9563d995def2ab4631133d9fc6722bd7690c6194 100644 --- a/src/UnicaenAuth/Event/Listener/UserRoleSelectedEventAbstractListener.php +++ b/src/UnicaenAuth/Event/Listener/UserRoleSelectedEventAbstractListener.php @@ -32,16 +32,9 @@ abstract class UserRoleSelectedEventAbstractListener implements ListenerAggregat abstract public function postSelection(UserRoleSelectedEvent $e); /** - * Attach one or more listeners - * - * Implementors may add an optional $priority argument; the EventManager - * implementation will pass this to the aggregate. - * - * @param EventManagerInterface $events - * - * @return void + * {@inheritdoc} */ - public function attach(EventManagerInterface $events) + public function attach(EventManagerInterface $events, $priority = 1) { $sharedEvents = $events->getSharedManager(); $this->listeners[] = $sharedEvents->attach( diff --git a/src/UnicaenAuth/Form/Droits/RoleForm.php b/src/UnicaenAuth/Form/Droits/RoleForm.php index ce78cf7eda87ccbb82ae09920ef32388bd8213cf..5fa88804700e8604f555e031c57386d81584a68b 100644 --- a/src/UnicaenAuth/Form/Droits/RoleForm.php +++ b/src/UnicaenAuth/Form/Droits/RoleForm.php @@ -2,13 +2,13 @@ namespace UnicaenAuth\Form\Droits; +use UnicaenApp\ServiceManager\ServiceLocatorAwareTrait; use UnicaenAuth\Entity\Db\Role; use UnicaenAuth\Service\Traits\RoleServiceAwareTrait; use Zend\Form\Form; use UnicaenApp\Util; -use Zend\ServiceManager\ServiceLocatorAwareInterface; -use Zend\ServiceManager\ServiceLocatorAwareTrait; -use Zend\Stdlib\Hydrator\HydratorInterface; +use UnicaenApp\ServiceManager\ServiceLocatorAwareInterface; +use Zend\Hydrator\HydratorInterface; use Zend\InputFilter\InputFilterProviderInterface; /** diff --git a/src/UnicaenAuth/Form/Droits/RoleFormFactory.php b/src/UnicaenAuth/Form/Droits/RoleFormFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..84a805f271e3f6b402b29ac62985f37eb2430aa4 --- /dev/null +++ b/src/UnicaenAuth/Form/Droits/RoleFormFactory.php @@ -0,0 +1,21 @@ +get('UnicaenAuth\Service\Role'); + + $form->setServiceRole($serviceRole); + + return $form; + } +} \ No newline at end of file diff --git a/src/UnicaenAuth/Form/Droits/Traits/RoleFormAwareTrait.php b/src/UnicaenAuth/Form/Droits/Traits/RoleFormAwareTrait.php index 02badad1729fccad2d0496df10986806196fd704..55f73948173ed6d77756b314faa6bbc565ad8ada 100755 --- a/src/UnicaenAuth/Form/Droits/Traits/RoleFormAwareTrait.php +++ b/src/UnicaenAuth/Form/Droits/Traits/RoleFormAwareTrait.php @@ -2,8 +2,8 @@ namespace UnicaenAuth\Form\Droits\Traits; -use UnicaenAuth\Form\Droits\RoleForm; use RuntimeException; +use UnicaenAuth\Form\Droits\RoleForm; /** * Description of RoleFormAwareTrait @@ -39,20 +39,6 @@ trait RoleFormAwareTrait */ public function getFormDroitsRole() { - if (empty($this->formDroitsRole)) { - - if (!method_exists($this, 'getServiceLocator')) { - throw new RuntimeException('La classe ' . get_class($this) . ' n\'a pas accès au ServiceLocator.'); - } - - $serviceLocator = $this->getServiceLocator(); - if (method_exists($serviceLocator, 'getServiceLocator')) { - $serviceLocator = $serviceLocator->getServiceLocator(); - } - - $this->formDroitsRole = $serviceLocator->get('FormElementManager')->get('UnicaenAuth\Form\Droits\Role'); - } - return $this->formDroitsRole; } } \ No newline at end of file diff --git a/src/UnicaenAuth/Guard/PrivilegeController.php b/src/UnicaenAuth/Guard/PrivilegeController.php index 153564fd5be3503ce551c53d44e563f0e44dce97..795995fa15186e3236f4ccdc60108a1d140a07c3 100644 --- a/src/UnicaenAuth/Guard/PrivilegeController.php +++ b/src/UnicaenAuth/Guard/PrivilegeController.php @@ -18,16 +18,20 @@ class PrivilegeController extends Controller use PrivilegeProviderAwareTrait; use SessionContainerTrait; - - - public function __construct(array $rules, ServiceLocatorInterface $serviceLocator) + /** + * {@inheritdoc} + */ + public function processConfig() { - $this->serviceLocator = $serviceLocator; - parent::__construct($this->privilegesToRoles($rules), $serviceLocator); - } - + $this->config = $this->privilegesToRoles($this->config); + parent::processConfig(); + } + /** + * @param array $rules + * @return array + */ protected function privilegesToRoles(array $rules) { $pr = $this->getPrivilegeProvider()->getPrivilegesRoles(); diff --git a/src/UnicaenAuth/Guard/PrivilegeControllerFactory.php b/src/UnicaenAuth/Guard/PrivilegeControllerFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..04dd3f64a3cf58a2292c70ab24f9e16b847c4dc5 --- /dev/null +++ b/src/UnicaenAuth/Guard/PrivilegeControllerFactory.php @@ -0,0 +1,22 @@ +get('UnicaenAuth\Privilege\PrivilegeProvider'); + + $rules = []; // NB: l'injection des vraies rules est faite par \BjyAuthorize\Service\BaseProvidersServiceFactory + + $instance = new PrivilegeController($rules, $container); + $instance->setPrivilegeProvider($privilegeProvider); + + return $instance; + } +} \ No newline at end of file diff --git a/src/UnicaenAuth/Guard/PrivilegeRoute.php b/src/UnicaenAuth/Guard/PrivilegeRoute.php index 1d66b4e30e36aec654a807b79702050f568ce134..ca5edb1eb32390871a65a35a7cb3f63a8a02dd2f 100644 --- a/src/UnicaenAuth/Guard/PrivilegeRoute.php +++ b/src/UnicaenAuth/Guard/PrivilegeRoute.php @@ -18,16 +18,18 @@ class PrivilegeRoute extends Route use PrivilegeProviderAwareTrait; use SessionContainerTrait; - - - public function __construct(array $rules, ServiceLocatorInterface $serviceLocator) +// public function __construct(array $rules, ServiceLocatorInterface $serviceLocator) +// { +// $this->serviceLocator = $serviceLocator; +// +// parent::__construct($rules, $serviceLocator); +// } + + public function processConfig() { - $this->serviceLocator = $serviceLocator; - parent::__construct($this->privilegesToRoles($rules), $serviceLocator); + $this->rules = $this->privilegesToRoles($this->config); } - - protected function privilegesToRoles(array $rules) { $pr = $this->getPrivilegeProvider()->getPrivilegesRoles(); diff --git a/src/UnicaenAuth/Guard/PrivilegeRouteFactory.php b/src/UnicaenAuth/Guard/PrivilegeRouteFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..b4300d388cec1e2fca3aaec8777e840b9be60a1f --- /dev/null +++ b/src/UnicaenAuth/Guard/PrivilegeRouteFactory.php @@ -0,0 +1,22 @@ +get('UnicaenAuth\Privilege\PrivilegeProvider'); + + $rules = []; // NB: l'injection des vraies rules est faite par \BjyAuthorize\Service\BaseProvidersServiceFactory + + $instance = new PrivilegeRoute($rules, $container); + $instance->setPrivilegeProvider($privilegeProvider); + + return $instance; + } +} \ No newline at end of file diff --git a/src/UnicaenAuth/Mouchard/MouchardCompleterAuth.php b/src/UnicaenAuth/Mouchard/MouchardCompleterAuth.php index b9c70e64eba19665e14ca4802ed4612b80c8e513..526079b0c3bc88c17849cb1bbe8c38df40f21b89 100644 --- a/src/UnicaenAuth/Mouchard/MouchardCompleterAuth.php +++ b/src/UnicaenAuth/Mouchard/MouchardCompleterAuth.php @@ -5,7 +5,6 @@ namespace UnicaenAuth\Mouchard; use UnicaenApp\Mouchard\MouchardCompleterInterface; use UnicaenApp\Mouchard\MouchardMessage; use UnicaenAuth\Service\Traits\UserContextServiceAwareTrait; -use Zend\Mvc\Application; /** * Interface MouchardCompleterInterface diff --git a/src/UnicaenAuth/Mouchard/MouchardCompleterAuthFactory.php b/src/UnicaenAuth/Mouchard/MouchardCompleterAuthFactory.php index bbbeeca7b52f4d3e23190b50f98433fc63c09ec3..714ecf03a947e721b95c04b20fa16ded7a12f1c7 100644 --- a/src/UnicaenAuth/Mouchard/MouchardCompleterAuthFactory.php +++ b/src/UnicaenAuth/Mouchard/MouchardCompleterAuthFactory.php @@ -2,6 +2,7 @@ namespace UnicaenAuth\Mouchard; +use Interop\Container\ContainerInterface; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; @@ -12,17 +13,16 @@ use Zend\ServiceManager\ServiceLocatorInterface; */ class MouchardCompleterAuthFactory implements FactoryInterface { - /** - * Create service - * - * @param ServiceLocatorInterface $serviceLocator - * @return MouchardCompleterAuth - */ public function createService(ServiceLocatorInterface $serviceLocator) + { + return $this->__invoke($serviceLocator); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { $mouchardCompleterAuth = new MouchardCompleterAuth(); - $serviceUserContext = $serviceLocator->get('UnicaenAuth\Service\UserContext'); + $serviceUserContext = $container->get('UnicaenAuth\Service\UserContext'); $mouchardCompleterAuth->setServiceUserContext($serviceUserContext); return $mouchardCompleterAuth; diff --git a/src/UnicaenAuth/Options/Traits/ModuleOptionsAwareTrait.php b/src/UnicaenAuth/Options/Traits/ModuleOptionsAwareTrait.php index 7d54cc5877fb515005194fd08ea2018da344e446..8b6a1b6662eb8dd3f28c09adb369066fa3685ee2 100644 --- a/src/UnicaenAuth/Options/Traits/ModuleOptionsAwareTrait.php +++ b/src/UnicaenAuth/Options/Traits/ModuleOptionsAwareTrait.php @@ -2,8 +2,8 @@ namespace UnicaenAuth\Options\Traits; -use UnicaenAuth\Options\ModuleOptions; use RuntimeException; +use UnicaenAuth\Options\ModuleOptions; /** * Description of ModuleOptionsAwareTrait @@ -39,18 +39,6 @@ trait ModuleOptionsAwareTrait */ public function getModuleOptions() { - if (empty($this->moduleOptions)) { - if (!method_exists($this, 'getServiceLocator')) { - throw new RuntimeException('La classe ' . get_class($this) . ' n\'a pas accès au ServiceLocator.'); - } - - $serviceLocator = $this->getServiceLocator(); - if (method_exists($serviceLocator, 'getServiceLocator')) { - $serviceLocator = $serviceLocator->getServiceLocator(); - } - $this->moduleOptions = $serviceLocator->get('unicaen-auth_module_options'); - } - return $this->moduleOptions; } } \ No newline at end of file diff --git a/src/UnicaenAuth/Provider/Identity/BasicServiceFactory.php b/src/UnicaenAuth/Provider/Identity/BasicServiceFactory.php index 298c2b6a60727c02542bf4018c30bda911335a66..b7c7212c16e780ef905352928869fb62a03939d1 100644 --- a/src/UnicaenAuth/Provider/Identity/BasicServiceFactory.php +++ b/src/UnicaenAuth/Provider/Identity/BasicServiceFactory.php @@ -2,6 +2,7 @@ namespace UnicaenAuth\Provider\Identity; +use Interop\Container\ContainerInterface; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; @@ -17,8 +18,13 @@ class BasicServiceFactory implements FactoryInterface */ public function createService(ServiceLocatorInterface $serviceLocator) { - $user = $serviceLocator->get('zfcuser_user_service'); - $config = $serviceLocator->get('BjyAuthorize\Config'); + return $this->__invoke($serviceLocator, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) + { + $user = $container->get('zfcuser_user_service'); + $config = $container->get('BjyAuthorize\Config'); $identityProvider = new Basic($user->getAuthService()); $identityProvider->setDefaultRole($config['default_role']); diff --git a/src/UnicaenAuth/Provider/Identity/Chain.php b/src/UnicaenAuth/Provider/Identity/Chain.php index 6d042707e2f344c70be8bd9e3a4c61f5177d751c..a90c45ee2deeeddd3c618c3d6308f3b0520472d7 100644 --- a/src/UnicaenAuth/Provider/Identity/Chain.php +++ b/src/UnicaenAuth/Provider/Identity/Chain.php @@ -4,12 +4,11 @@ namespace UnicaenAuth\Provider\Identity; use BjyAuthorize\Provider\Identity\ProviderInterface; use BjyAuthorize\Service\Authorize; +use UnicaenAuth\Service\UserContext; use Zend\EventManager\EventManagerAwareInterface; use Zend\EventManager\EventManagerAwareTrait; use Zend\Permissions\Acl\Role\Registry; use Zend\Permissions\Acl\Role\RoleInterface; -use Zend\ServiceManager\ServiceLocatorAwareInterface; -use Zend\ServiceManager\ServiceLocatorAwareTrait; /** * Chaîne de responsabilité permettant à plusieures sources de fournir @@ -19,9 +18,8 @@ use Zend\ServiceManager\ServiceLocatorAwareTrait; * @see ChainEvent * @see \UnicaenAuth\Provider\Identity\ChainServiceFactory */ -class Chain implements ProviderInterface, ServiceLocatorAwareInterface, EventManagerAwareInterface +class Chain implements ProviderInterface, EventManagerAwareInterface { - use ServiceLocatorAwareTrait; use EventManagerAwareTrait; /** @@ -34,6 +32,32 @@ class Chain implements ProviderInterface, ServiceLocatorAwareInterface, EventMan */ protected $roles; + /** + * @var UserContext + */ + private $userContextService; + + /** + * @var Authorize + */ + private $authorizeService; + + /** + * @param UserContext $userContextService + */ + public function setUserContextService(UserContext $userContextService) + { + $this->userContextService = $userContextService; + } + + /** + * @param Authorize $authorizeService + */ + public function setAuthorizeService(Authorize $authorizeService) + { + $this->authorizeService = $authorizeService; + } + /** * Retourne lee roles de l'utilisateur courant. * Si un rôle courant est sélectionné, c'est lui qu'on retourne. @@ -56,7 +80,7 @@ class Chain implements ProviderInterface, ServiceLocatorAwareInterface, EventMan */ private function getSelectedIdentityRole() { - return $this->getServiceLocator()->get('AuthUserContext')->getSelectedIdentityRole(); + return $this->userContextService->getSelectedIdentityRole(); } /** @@ -73,24 +97,23 @@ class Chain implements ProviderInterface, ServiceLocatorAwareInterface, EventMan $this->roles = []; $e = $this->getEvent(); + $e->setName('getIdentityRoles'); $e->clearRoles(); // collecte des rôles - $this->getEventManager()->trigger('getIdentityRoles', $e); + $this->getEventManager()->triggerEvent($e); $roles = $e->getRoles(); /** @var RoleInterface[] $roles */ - $authorizeService = $this->getServiceLocator()->get('BjyAuthorize\Service\Authorize'); /* @var $authorizeService Authorize */ - $registry = new Registry(); foreach ($roles as $role) { // ne retient que les rôles déclarés dans les ACL - if (!$authorizeService->getAcl()->hasRole($role)) { + if (!$this->authorizeService->getAcl()->hasRole($role)) { continue; } // évite les doublons if (!$registry->has($role)) { if (is_string($role)) { - $role = $authorizeService->getAcl()->getRole($role); + $role = $this->authorizeService->getAcl()->getRole($role); } $registry->add($role); $this->roles[$role->getRoleId()] = $role; diff --git a/src/UnicaenAuth/Provider/Identity/ChainServiceFactory.php b/src/UnicaenAuth/Provider/Identity/ChainServiceFactory.php index eca7b942da95301f124a804835eb47fcce796d12..41c874b8765f0c9c951f1bfd57aff1e34005ca30 100644 --- a/src/UnicaenAuth/Provider/Identity/ChainServiceFactory.php +++ b/src/UnicaenAuth/Provider/Identity/ChainServiceFactory.php @@ -2,6 +2,10 @@ namespace UnicaenAuth\Provider\Identity; +use BjyAuthorize\Service\Authorize; +use Interop\Container\ContainerInterface; +use UnicaenAuth\Service\UserContext; +use Zend\EventManager\EventManager; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; @@ -12,21 +16,32 @@ use Zend\ServiceManager\ServiceLocatorInterface; */ class ChainServiceFactory implements FactoryInterface { - /** - * Create service - * - * @param ServiceLocatorInterface $serviceLocator - * @return mixed - */ public function createService(ServiceLocatorInterface $serviceLocator) + { + return $this->__invoke($serviceLocator, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { $chain = new Chain(); - $chain->setServiceLocator($serviceLocator); - $providers = $this->computeProviders($serviceLocator); + /** @var UserContext $userContextService */ + $userContextService = $container->get('AuthUserContext'); + + /* @var $authorizeService Authorize */ + $authorizeService = $container->get('BjyAuthorize\Service\Authorize'); + + /** @var EventManager $eventManager */ + $eventManager = $container->get('EventManager'); + + $chain->setUserContextService($userContextService); + $chain->setAuthorizeService($authorizeService); + $chain->setEventManager($eventManager); + + $providers = $this->computeProviders($container); foreach ($providers as $priority => $name) { - $provider = $serviceLocator->get($name); + $provider = $container->get($name); $chain->getEventManager()->attach('getIdentityRoles', [$provider, 'injectIdentityRoles'], $priority); } @@ -34,10 +49,10 @@ class ChainServiceFactory implements FactoryInterface } /** - * @param ServiceLocatorInterface $serviceLocator + * @param ContainerInterface $serviceLocator * @return array */ - private function computeProviders(ServiceLocatorInterface $serviceLocator) + private function computeProviders(ContainerInterface $serviceLocator) { $config = $serviceLocator->get('Config'); //'unicaen-auth_module_options' if (! isset($config['unicaen-auth']['identity_providers']) || ! $config['unicaen-auth']['identity_providers']) { diff --git a/src/UnicaenAuth/Provider/Identity/DbServiceFactory.php b/src/UnicaenAuth/Provider/Identity/DbServiceFactory.php index a326639d8d78e3ce161381f813744f627d87760a..4ce3d5c8fa5685fa74539c157e518d808f777f77 100644 --- a/src/UnicaenAuth/Provider/Identity/DbServiceFactory.php +++ b/src/UnicaenAuth/Provider/Identity/DbServiceFactory.php @@ -2,6 +2,7 @@ namespace UnicaenAuth\Provider\Identity; +use Interop\Container\ContainerInterface; use UnicaenApp\Options\ModuleOptions; use Zend\Ldap\Ldap; use Zend\ServiceManager\FactoryInterface; @@ -19,18 +20,23 @@ class DbServiceFactory implements FactoryInterface */ public function createService(ServiceLocatorInterface $serviceLocator) { - $user = $serviceLocator->get('zfcuser_user_service'); + return $this->__invoke($serviceLocator, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) + { + $user = $container->get('zfcuser_user_service'); $identityProvider = new Db($user->getAuthService()); - $unicaenAppOptions = $serviceLocator->get('unicaen-app_module_options'); + $unicaenAppOptions = $container->get('unicaen-app_module_options'); /* @var $unicaenAppOptions ModuleOptions */ $ldap = new Ldap($unicaenAppOptions->getLdap()['connection']['default']['params']); $identityProvider->setLdap($ldap); - $identityProvider->setServiceRole($serviceLocator->get('UnicaenAuth\Service\Role')); + $identityProvider->setServiceRole($container->get('UnicaenAuth\Service\Role')); - $config = $serviceLocator->get('BjyAuthorize\Config'); + $config = $container->get('BjyAuthorize\Config'); $identityProvider->setDefaultRole($config['default_role']); $identityProvider->setAuthenticatedRole($config['authenticated_role']); diff --git a/src/UnicaenAuth/Provider/Identity/LdapServiceFactory.php b/src/UnicaenAuth/Provider/Identity/LdapServiceFactory.php index 3209e8690bab08d3c8e1f37de37e049297b749dc..68a2849cb0a87d87d61dc824aad8abd167d7b635 100644 --- a/src/UnicaenAuth/Provider/Identity/LdapServiceFactory.php +++ b/src/UnicaenAuth/Provider/Identity/LdapServiceFactory.php @@ -2,9 +2,9 @@ namespace UnicaenAuth\Provider\Identity; +use Interop\Container\ContainerInterface; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; -use UnicaenAuth\Acl\NamedRole; /** * LDAP identity provider factory @@ -19,10 +19,15 @@ class LdapServiceFactory implements FactoryInterface */ public function createService(ServiceLocatorInterface $serviceLocator) { - $config = $serviceLocator->get('BjyAuthorize\Config'); - $user = $serviceLocator->get('zfcuser_user_service'); + return $this->__invoke($serviceLocator, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) + { + $config = $container->get('BjyAuthorize\Config'); + $user = $container->get('zfcuser_user_service'); $simpleIdentityProvider = new Ldap($user->getAuthService()); - + $simpleIdentityProvider->setDefaultRole($config['default_role']); $simpleIdentityProvider->setAuthenticatedRole($config['authenticated_role']); diff --git a/src/UnicaenAuth/Provider/Privilege/PrivilegeProviderAwareTrait.php b/src/UnicaenAuth/Provider/Privilege/PrivilegeProviderAwareTrait.php index ce35f9bf90b407452ed8638293048146f4fb8070..6af273bb27c627a7ecf773aa3151789fc9b0ffd1 100644 --- a/src/UnicaenAuth/Provider/Privilege/PrivilegeProviderAwareTrait.php +++ b/src/UnicaenAuth/Provider/Privilege/PrivilegeProviderAwareTrait.php @@ -25,24 +25,10 @@ trait PrivilegeProviderAwareTrait /** * * @return PrivilegeProviderInterface - * @throws \Exception */ public function getPrivilegeProvider() { - if (empty($this->privilegeProvider)){ - if (! method_exists($this, 'getServiceLocator')) { - throw new \Exception( 'La classe '.get_class($this).' n\'a pas accès au ServiceLocator.'); - } - - $serviceLocator = $this->getServiceLocator(); - if (method_exists($serviceLocator, 'getServiceLocator')) { - $serviceLocator = $serviceLocator->getServiceLocator(); - } - - return $serviceLocator->get('UnicaenAuth\Privilege\PrivilegeProvider'); - }else{ - return $this->privilegeProvider; - } + return $this->privilegeProvider; } } \ No newline at end of file diff --git a/src/UnicaenAuth/Provider/Role/ConfigServiceFactory.php b/src/UnicaenAuth/Provider/Role/ConfigServiceFactory.php index 158b1e3a6776d0a6af4478e280f30e4eb6442145..7b00b786f0f0bfa6fb8decac7a0af6a65bf8096f 100644 --- a/src/UnicaenAuth/Provider/Role/ConfigServiceFactory.php +++ b/src/UnicaenAuth/Provider/Role/ConfigServiceFactory.php @@ -3,6 +3,7 @@ namespace UnicaenAuth\Provider\Role; use BjyAuthorize\Exception\InvalidArgumentException; +use Interop\Container\ContainerInterface; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; @@ -15,23 +16,26 @@ class ConfigServiceFactory implements FactoryInterface { /** * {@inheritDoc} - * - * @return \BjyAuthorize\Provider\Role\Config */ public function createService(ServiceLocatorInterface $serviceLocator) { - $config = $serviceLocator->get('BjyAuthorize\Config'); + return $this->__invoke($serviceLocator, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) + { + $config = $container->get('BjyAuthorize\Config'); if (! isset($config['role_providers']['UnicaenAuth\Provider\Role\Config'])) { throw new InvalidArgumentException( 'Config for "UnicaenAuth\Provider\Role\Config" not set' ); } - + $providerConfig = $config['role_providers']['UnicaenAuth\Provider\Role\Config']; - + /* @var $mapper \UnicaenApp\Mapper\Ldap\Group */ - $mapper = $serviceLocator->get('ldap_group_mapper'); + $mapper = $container->get('ldap_group_mapper'); $service = new Config($mapper, $providerConfig); diff --git a/src/UnicaenAuth/Provider/Role/DbRoleServiceFactory.php b/src/UnicaenAuth/Provider/Role/DbRoleServiceFactory.php index ab238ca040b0336fcfdbc68a1784044eb8c86b21..43902e9a33eff93a38f611e90f52daff984be3e8 100644 --- a/src/UnicaenAuth/Provider/Role/DbRoleServiceFactory.php +++ b/src/UnicaenAuth/Provider/Role/DbRoleServiceFactory.php @@ -2,7 +2,7 @@ namespace UnicaenAuth\Provider\Role; -use BjyAuthorize\Exception\InvalidArgumentException; +use Interop\Container\ContainerInterface; use UnicaenAuth\Service\RoleService; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; @@ -14,12 +14,15 @@ class DbRoleServiceFactory implements FactoryInterface { /** * {@inheritDoc} - * - * @return DbRole */ public function createService(ServiceLocatorInterface $serviceLocator) { - $serviceRole = $serviceLocator->get('UnicaenAuth\Service\Role'); + return $this->__invoke($serviceLocator, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) + { + $serviceRole = $container->get('UnicaenAuth\Service\Role'); /* @var $serviceRole RoleService */ return new DbRole($serviceRole->getRepo()); diff --git a/src/UnicaenAuth/Provider/Role/UsernameServiceFactory.php b/src/UnicaenAuth/Provider/Role/UsernameServiceFactory.php index fdfdc2aad21b779bf1c7f3327b305fa80a06f316..d3afce2f233b09f8604fff1c856e8f5e55b9872e 100644 --- a/src/UnicaenAuth/Provider/Role/UsernameServiceFactory.php +++ b/src/UnicaenAuth/Provider/Role/UsernameServiceFactory.php @@ -2,6 +2,7 @@ namespace UnicaenAuth\Provider\Role; +use Interop\Container\ContainerInterface; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; @@ -12,26 +13,25 @@ use Zend\ServiceManager\ServiceLocatorInterface; */ class UsernameServiceFactory implements FactoryInterface { - /** - * Create service - * - * @param ServiceLocatorInterface $serviceLocator - * @return Username - */ public function createService(ServiceLocatorInterface $serviceLocator) { - $config = $serviceLocator->get('BjyAuthorize\Config'); + return $this->__invoke($serviceLocator, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) + { + $config = $container->get('BjyAuthorize\Config'); if (! isset($config['role_providers']['UnicaenAuth\Provider\Role\Username'])) { - throw new InvalidArgumentException( + throw new \InvalidArgumentException( 'Config for "UnicaenAuth\Provider\Role\Username" not set' ); } $providerConfig = $config['role_providers']['UnicaenAuth\Provider\Role\Username']; - - $authService = $serviceLocator->get('zfcuser_auth_service'); /* @var $authService \Zend\Authentication\AuthenticationService */ - + + $authService = $container->get('zfcuser_auth_service'); /* @var $authService \Zend\Authentication\AuthenticationService */ + return new Username($authService, $providerConfig); } } \ No newline at end of file diff --git a/src/UnicaenAuth/Provider/Rule/PrivilegeRuleProvider.php b/src/UnicaenAuth/Provider/Rule/PrivilegeRuleProvider.php index 4abc2b38dbfbef58a23fbf5e3777a147053ec594..cc712e6b443244094305de2d59fbf93823cd651c 100644 --- a/src/UnicaenAuth/Provider/Rule/PrivilegeRuleProvider.php +++ b/src/UnicaenAuth/Provider/Rule/PrivilegeRuleProvider.php @@ -3,11 +3,9 @@ namespace UnicaenAuth\Provider\Rule; use BjyAuthorize\Provider\Rule\ProviderInterface; -use UnicaenAuth\Guard\PrivilegeController; +use UnicaenAuth\Provider\Privilege\PrivilegeProviderAwareTrait; use UnicaenAuth\Provider\Privilege\Privileges; use Zend\ServiceManager\ServiceLocatorInterface; -use Zend\ServiceManager\ServiceLocatorAwareTrait; -use UnicaenAuth\Provider\Privilege\PrivilegeProviderAwareTrait; /** * Rule provider based on a given array of rules @@ -16,26 +14,48 @@ use UnicaenAuth\Provider\Privilege\PrivilegeProviderAwareTrait; */ class PrivilegeRuleProvider implements ProviderInterface { - use ServiceLocatorAwareTrait; use PrivilegeProviderAwareTrait; + /** + * @var ServiceLocatorInterface + */ + protected $serviceLocator; + /** * @var array */ protected $rules; - /** - * @param array $config + * @param array $config + * @param ServiceLocatorInterface $serviceLocator */ public function __construct(array $config, ServiceLocatorInterface $serviceLocator) { - $this->setServiceLocator($serviceLocator); - - $this->rules = $this->makeRules($config); + $this->serviceLocator = $serviceLocator; + $this->config = $config; } + /** + * @var array + */ + protected $config = []; + /** + * @param array $config + */ + public function setConfig(array $config) + { + $this->config = $config; + } + + /** + * @return mixed + */ + public function processConfig() + { + $this->rules = $this->makeRules($this->config); + } public function makeRules(array $config) { diff --git a/src/UnicaenAuth/Provider/Rule/PrivilegeRuleProviderFactory.php b/src/UnicaenAuth/Provider/Rule/PrivilegeRuleProviderFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..429951a3f3d43b296b3719e38a704f8fa992d90a --- /dev/null +++ b/src/UnicaenAuth/Provider/Rule/PrivilegeRuleProviderFactory.php @@ -0,0 +1,22 @@ +get('UnicaenAuth\Privilege\PrivilegeProvider'); + + $rules = []; // NB: l'injection des vraies rules est faite par \BjyAuthorize\Service\BaseProvidersServiceFactory + + $instance = new PrivilegeRuleProvider($rules, $container); + $instance->setPrivilegeProvider($privilegeProvider); + + return $instance; + } +} \ No newline at end of file diff --git a/src/UnicaenAuth/Service/AbstractService.php b/src/UnicaenAuth/Service/AbstractService.php index 6ed1d710e51eb6887be836c9a49142a244a7216e..5707cc52abc2d34fc2eaaaf4f84f8556d95dfa04 100644 --- a/src/UnicaenAuth/Service/AbstractService.php +++ b/src/UnicaenAuth/Service/AbstractService.php @@ -3,9 +3,9 @@ namespace UnicaenAuth\Service; use UnicaenApp\Service\EntityManagerAwareTrait; +use UnicaenApp\ServiceManager\ServiceLocatorAwareTrait; use UnicaenAuth\Options\ModuleOptions; -use Zend\ServiceManager\ServiceLocatorAwareInterface; -use Zend\ServiceManager\ServiceLocatorAwareTrait; +use UnicaenApp\ServiceManager\ServiceLocatorAwareInterface; abstract class AbstractService implements ServiceLocatorAwareInterface { diff --git a/src/UnicaenAuth/Service/AuthorizeService.php b/src/UnicaenAuth/Service/AuthorizeService.php index 44eb495e4fbd97e6b9fdb2295b8d2221bdf7d2ac..eea0e75a5ed92aa25646ab12a9173684da968dcd 100644 --- a/src/UnicaenAuth/Service/AuthorizeService.php +++ b/src/UnicaenAuth/Service/AuthorizeService.php @@ -1,10 +1,4 @@ serviceLocator; - } - - - /** * @deprecated this method will be removed in BjyAuthorize 1.4.x+, * please retrieve the identity from the diff --git a/src/UnicaenAuth/Service/AuthorizeServiceFactory.php b/src/UnicaenAuth/Service/AuthorizeServiceFactory.php index 14b7857cc93d06890879e84219030a4c489e1c2d..9f28504265272dae5c443bcd6eff037c6085bdc0 100644 --- a/src/UnicaenAuth/Service/AuthorizeServiceFactory.php +++ b/src/UnicaenAuth/Service/AuthorizeServiceFactory.php @@ -1,13 +1,9 @@ get('BjyAuthorize\Config'), $serviceLocator); + return $this->__invoke($serviceLocator, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) + { + $service = new AuthorizeService($container->get('BjyAuthorize\Config'), $container); + +// /** @var ProviderInterface $identityProvider */ +// $identityProvider = $container->get('BjyAuthorize\Provider\Identity\ProviderInterface'); + + /** @var UserContext $serviceUserContext */ + $serviceUserContext = $container->get('UnicaenAuth\Service\UserContext'); + + $service->setServiceUserContext($serviceUserContext); +// $service->setIdentityProvider($identityProvider); + + return $service; } } diff --git a/src/UnicaenAuth/Service/PrivilegeServiceFactory.php b/src/UnicaenAuth/Service/PrivilegeServiceFactory.php index 04271e3b7121d866e302cba9ece5d006218d2639..0a7fa32ec340da1caf15f8bc9d3cc2836e304eac 100644 --- a/src/UnicaenAuth/Service/PrivilegeServiceFactory.php +++ b/src/UnicaenAuth/Service/PrivilegeServiceFactory.php @@ -2,6 +2,7 @@ namespace UnicaenAuth\Service; +use Interop\Container\ContainerInterface; use UnicaenAuth\Entity\Db\Privilege; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; @@ -10,7 +11,12 @@ class PrivilegeServiceFactory implements FactoryInterface { public function createService(ServiceLocatorInterface $serviceLocator) { - $config = $serviceLocator->get('Config'); + return $this->__invoke($serviceLocator, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) + { + $config = $container->get('Config'); if (! isset($config['unicaen-auth']['privilege_entity_class'])) { // throw new InvalidArgumentException("La classe de l'entité privilège n'a pas été trouvée dans la config"); diff --git a/src/UnicaenAuth/Service/RoleServiceFactory.php b/src/UnicaenAuth/Service/RoleServiceFactory.php index 74c4057c8d3d7bf455a4459f060d828453e3e84a..436b97c5c0521a763788f673aee4f87ce77b29be 100644 --- a/src/UnicaenAuth/Service/RoleServiceFactory.php +++ b/src/UnicaenAuth/Service/RoleServiceFactory.php @@ -2,6 +2,7 @@ namespace UnicaenAuth\Service; +use Interop\Container\ContainerInterface; use UnicaenAuth\Entity\Db\Role; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; @@ -10,7 +11,12 @@ class RoleServiceFactory implements FactoryInterface { public function createService(ServiceLocatorInterface $serviceLocator) { - $config = $serviceLocator->get('Config'); + return $this->__invoke($serviceLocator, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) + { + $config = $container->get('Config'); if (! isset($config['unicaen-auth']['role_entity_class'])) { $config['unicaen-auth']['role_entity_class'] = Role::class; diff --git a/src/UnicaenAuth/Service/ShibService.php b/src/UnicaenAuth/Service/ShibService.php index 40899029b509a6e4d4c3578fa4c05e7801da139a..6ec2d8bce4cbed21df426ccaa6dde1717a660ec8 100644 --- a/src/UnicaenAuth/Service/ShibService.php +++ b/src/UnicaenAuth/Service/ShibService.php @@ -8,7 +8,7 @@ use InvalidArgumentException; use UnicaenApp\Exception\LogicException; use UnicaenApp\Exception\RuntimeException; use UnicaenAuth\Entity\Shibboleth\ShibUser; -use Zend\Mvc\Router\Http\TreeRouteStack; +use Zend\Router\Http\TreeRouteStack; use Zend\Session\Container; /** diff --git a/src/UnicaenAuth/Service/ShibServiceFactory.php b/src/UnicaenAuth/Service/ShibServiceFactory.php index ae9bed6b6138e1b268fa40098add777182bc5024..fd16d912664f2e63b2888d1fa9947066c16815e5 100644 --- a/src/UnicaenAuth/Service/ShibServiceFactory.php +++ b/src/UnicaenAuth/Service/ShibServiceFactory.php @@ -2,15 +2,15 @@ namespace UnicaenAuth\Service; +use Interop\Container\ContainerInterface; use UnicaenAuth\Options\ModuleOptions; -use Zend\ServiceManager\ServiceLocatorInterface; class ShibServiceFactory { - public function __invoke(ServiceLocatorInterface $sl) + public function __invoke(ContainerInterface $container) { /** @var ModuleOptions $moduleOptions */ - $moduleOptions = $sl->get('unicaen-auth_module_options'); + $moduleOptions = $container->get('unicaen-auth_module_options'); $service = new ShibService(); $service->setShibbolethConfig($moduleOptions->getShibboleth()); diff --git a/src/UnicaenAuth/Service/Traits/AuthorizeServiceAwareTrait.php b/src/UnicaenAuth/Service/Traits/AuthorizeServiceAwareTrait.php index 07179b2d83500dd219409879f2bac5a2ea950a84..fcd258afc610a7958979b81a053fc12c2297446d 100644 --- a/src/UnicaenAuth/Service/Traits/AuthorizeServiceAwareTrait.php +++ b/src/UnicaenAuth/Service/Traits/AuthorizeServiceAwareTrait.php @@ -39,18 +39,6 @@ trait AuthorizeServiceAwareTrait */ public function getServiceAuthorize() { - if (empty($this->serviceAuthorize)) { - if (!method_exists($this, 'getServiceLocator')) { - throw new RuntimeException('La classe ' . get_class($this) . ' n\'a pas accès au ServiceLocator.'); - } - - $serviceLocator = $this->getServiceLocator(); - if (method_exists($serviceLocator, 'getServiceLocator')) { - $serviceLocator = $serviceLocator->getServiceLocator(); - } - $this->serviceAuthorize = $serviceLocator->get('BjyAuthorize\Service\Authorize'); - } - return $this->serviceAuthorize; } } \ No newline at end of file diff --git a/src/UnicaenAuth/Service/Traits/CategoriePrivilegeServiceAwareTrait.php b/src/UnicaenAuth/Service/Traits/CategoriePrivilegeServiceAwareTrait.php index 19a75df27609041ec09539138c5c3ae8212b27b5..ade1d3053025c8427f92cab1586b6f5eab4b3646 100644 --- a/src/UnicaenAuth/Service/Traits/CategoriePrivilegeServiceAwareTrait.php +++ b/src/UnicaenAuth/Service/Traits/CategoriePrivilegeServiceAwareTrait.php @@ -39,18 +39,6 @@ trait CategoriePrivilegeServiceAwareTrait */ public function getServiceCategoriePrivilege() { - if (empty($this->serviceCategoriePrivilege)) { - if (!method_exists($this, 'getServiceLocator')) { - throw new RuntimeException('La classe ' . get_class($this) . ' n\'a pas accès au ServiceLocator.'); - } - - $serviceLocator = $this->getServiceLocator(); - if (method_exists($serviceLocator, 'getServiceLocator')) { - $serviceLocator = $serviceLocator->getServiceLocator(); - } - $this->serviceCategoriePrivilege = $serviceLocator->get('UnicaenAuth\Service\CategoriePrivilege'); - } - return $this->serviceCategoriePrivilege; } } \ No newline at end of file diff --git a/src/UnicaenAuth/Service/Traits/PrivilegeServiceAwareTrait.php b/src/UnicaenAuth/Service/Traits/PrivilegeServiceAwareTrait.php index e26587946fc368239edc38284032fe7b34da1791..ca7e857e19356a55bea447878f1f4371d964e6fc 100644 --- a/src/UnicaenAuth/Service/Traits/PrivilegeServiceAwareTrait.php +++ b/src/UnicaenAuth/Service/Traits/PrivilegeServiceAwareTrait.php @@ -39,18 +39,6 @@ trait PrivilegeServiceAwareTrait */ public function getServicePrivilege() { - if (empty($this->servicePrivilege)) { - if (!method_exists($this, 'getServiceLocator')) { - throw new RuntimeException('La classe ' . get_class($this) . ' n\'a pas accès au ServiceLocator.'); - } - - $serviceLocator = $this->getServiceLocator(); - if (method_exists($serviceLocator, 'getServiceLocator')) { - $serviceLocator = $serviceLocator->getServiceLocator(); - } - $this->servicePrivilege = $serviceLocator->get('UnicaenAuth\Service\Privilege'); - } - return $this->servicePrivilege; } } \ No newline at end of file diff --git a/src/UnicaenAuth/Service/Traits/RoleServiceAwareTrait.php b/src/UnicaenAuth/Service/Traits/RoleServiceAwareTrait.php index 57cb0127d2b94f8eb3c4ca1f9b517e620de250ff..5c607fe0d094204f71887dd07d97657c6da05c1d 100644 --- a/src/UnicaenAuth/Service/Traits/RoleServiceAwareTrait.php +++ b/src/UnicaenAuth/Service/Traits/RoleServiceAwareTrait.php @@ -39,18 +39,6 @@ trait RoleServiceAwareTrait */ public function getServiceRole() { - if (empty($this->serviceRole)) { - if (!method_exists($this, 'getServiceLocator')) { - throw new RuntimeException('La classe ' . get_class($this) . ' n\'a pas accès au ServiceLocator.'); - } - - $serviceLocator = $this->getServiceLocator(); - if (method_exists($serviceLocator, 'getServiceLocator')) { - $serviceLocator = $serviceLocator->getServiceLocator(); - } - $this->serviceRole = $serviceLocator->get('UnicaenAuth\Service\Role'); - } - return $this->serviceRole; } } \ No newline at end of file diff --git a/src/UnicaenAuth/Service/Traits/UserContextServiceAwareTrait.php b/src/UnicaenAuth/Service/Traits/UserContextServiceAwareTrait.php index 860d7991718405ddfbeb1f885107c61db1f67428..caf58573fc3177161a9ccb8af519b99d230894bd 100644 --- a/src/UnicaenAuth/Service/Traits/UserContextServiceAwareTrait.php +++ b/src/UnicaenAuth/Service/Traits/UserContextServiceAwareTrait.php @@ -39,18 +39,6 @@ trait UserContextServiceAwareTrait */ public function getServiceUserContext() { - if (empty($this->serviceUserContext)) { - if (!method_exists($this, 'getServiceLocator')) { - throw new RuntimeException('La classe ' . get_class($this) . ' n\'a pas accès au ServiceLocator.'); - } - - $serviceLocator = $this->getServiceLocator(); - if (method_exists($serviceLocator, 'getServiceLocator')) { - $serviceLocator = $serviceLocator->getServiceLocator(); - } - $this->serviceUserContext = $serviceLocator->get('UnicaenAuth\Service\UserContext'); - } - return $this->serviceUserContext; } } \ No newline at end of file diff --git a/src/UnicaenAuth/Service/User.php b/src/UnicaenAuth/Service/User.php index 1d72db1f6794eb544d817870fe0ffa4b30e6e067..490793c346c3f9ab39130b4aa916c73f28337ff9 100644 --- a/src/UnicaenAuth/Service/User.php +++ b/src/UnicaenAuth/Service/User.php @@ -20,12 +20,9 @@ use Zend\Form\Element\Submit; use Zend\Form\Element\Text; use Zend\Form\Form; use Zend\InputFilter\Input; -use Zend\ServiceManager\ServiceLocatorAwareInterface; -use Zend\ServiceManager\ServiceLocatorAwareTrait; use Zend\Validator\EmailAddress; use Zend\Validator\Identical; use ZfcUser\Entity\UserInterface; -use ZfcUser\Options\AuthenticationOptionsInterface; use ZfcUser\Options\ModuleOptions as ZfcUserModuleOptions; /** @@ -34,10 +31,8 @@ use ZfcUser\Options\ModuleOptions as ZfcUserModuleOptions; * @see \UnicaenAuth\Authentication\Adapter\AbstractFactory * @author Unicaen */ -class User implements ServiceLocatorAwareInterface, EventManagerAwareInterface +class User implements EventManagerAwareInterface { - use ServiceLocatorAwareTrait; - const EVENT_USER_AUTHENTICATED_PRE_PERSIST = 'userAuthenticated.prePersist'; /** @@ -51,7 +46,7 @@ class User implements ServiceLocatorAwareInterface, EventManagerAwareInterface protected $options; /** - * @var AuthenticationOptionsInterface + * @var ZfcUserModuleOptions */ protected $zfcUserOptions; @@ -155,7 +150,15 @@ class User implements ServiceLocatorAwareInterface, EventManagerAwareInterface $event->setShibUser($userData); } - $this->getEventManager()->trigger($event); + $this->getEventManager()->triggerEvent($event); + } + + /** + * @param UserMapper $userMapper + */ + public function setUserMapper(UserMapper $userMapper) + { + $this->userMapper = $userMapper; } /** @@ -163,10 +166,6 @@ class User implements ServiceLocatorAwareInterface, EventManagerAwareInterface */ public function getUserMapper() { - if ($this->userMapper === null) { - $this->userMapper = $this->getServiceLocator()->get('zfcuser_user_mapper'); - } - return $this->userMapper; } @@ -183,10 +182,7 @@ class User implements ServiceLocatorAwareInterface, EventManagerAwareInterface } /** - * Inject an EventManager instance - * - * @param EventManagerInterface $eventManager - * @return self + * {@inheritdoc} */ public function setEventManager(EventManagerInterface $eventManager) { @@ -215,10 +211,6 @@ class User implements ServiceLocatorAwareInterface, EventManagerAwareInterface */ public function getOptions() { - if (!$this->options instanceof ModuleOptions) { - $this->setOptions($this->getServiceLocator()->get('unicaen-auth_module_options')); - } - return $this->options; } @@ -238,10 +230,6 @@ class User implements ServiceLocatorAwareInterface, EventManagerAwareInterface */ public function getZfcUserOptions() { - if (!$this->zfcUserOptions instanceof ZfcUserModuleOptions) { - $this->setZfcUserOptions($this->getServiceLocator()->get('zfcuser_module_options')); - } - return $this->zfcUserOptions; } diff --git a/src/UnicaenAuth/Service/UserAwareInitializer.php b/src/UnicaenAuth/Service/UserAwareInitializer.php index 0fb7ee8c3fe31838704a3edf7b11d4d925181c7c..13db3fbbb6ed4c06e044ae2b7763b8c43484f191 100644 --- a/src/UnicaenAuth/Service/UserAwareInitializer.php +++ b/src/UnicaenAuth/Service/UserAwareInitializer.php @@ -2,12 +2,11 @@ namespace UnicaenAuth\Service; +use Interop\Container\ContainerInterface; +use UnicaenAuth\Entity\Ldap\People; use Zend\ServiceManager\InitializerInterface; use Zend\ServiceManager\ServiceLocatorInterface; -use UnicaenAuth\Service\DbUserAwareInterface; -use UnicaenAuth\Service\LdapUserAwareInterface; use ZfcUser\Entity\UserInterface; -use UnicaenAuth\Entity\Ldap\People; /** * Initialisateur chargé d'injecter l'utilisateur courant dans les services en ayant besoin. @@ -26,34 +25,33 @@ class UserAwareInitializer implements InitializerInterface { return $instance instanceof DbUserAwareInterface || $instance instanceof LdapUserAwareInterface; } - - /** - * Initialize - * - * @param mixed $instance - * @param ServiceLocatorInterface $serviceLocator - */ + public function initialize($instance, ServiceLocatorInterface $serviceLocator) + { + $this->__invoke($serviceLocator, $instance); + } + + public function __invoke(ContainerInterface $container, $instance) { // test d'éligibilité à faire au plus tôt pour éviter l'erreur // 'Circular dependency for LazyServiceLoader was found for instance Zend\Authentication\AuthenticationService' if (!$this->canInitialize($instance)) { return; } - - $authenticationService = $serviceLocator->get('Zend\Authentication\AuthenticationService'); + + $authenticationService = $container->get('Zend\Authentication\AuthenticationService'); if (!$authenticationService->hasIdentity()) { return; } $identity = $authenticationService->getIdentity(); - + if ($instance instanceof DbUserAwareInterface) { if (isset($identity['db']) && $identity['db'] instanceof UserInterface) { $instance->setDbUser($identity['db']); } } - + if ($instance instanceof LdapUserAwareInterface) { if (isset($identity['ldap']) && $identity['ldap'] instanceof People) { $instance->setLdapUser($identity['ldap']); diff --git a/src/UnicaenAuth/Service/UserContext.php b/src/UnicaenAuth/Service/UserContext.php index d2a321475baf6a0fab56d11a29ca56a193b2c094..87f197adca170a55e9379c992c48ab876bcb8836 100644 --- a/src/UnicaenAuth/Service/UserContext.php +++ b/src/UnicaenAuth/Service/UserContext.php @@ -11,6 +11,7 @@ use UnicaenAuth\Entity\Shibboleth\ShibUser; use UnicaenAuth\Event\UserRoleSelectedEvent; use UnicaenAuth\Formatter\RoleFormatter; use UnicaenAuth\Provider\Identity\Chain; +use Zend\Authentication\AuthenticationService; use Zend\EventManager\EventManagerAwareInterface; use Zend\EventManager\EventManagerAwareTrait; use Zend\Permissions\Acl\Role\RoleInterface; @@ -36,6 +37,19 @@ class UserContext extends AbstractService implements EventManagerAwareInterface */ protected $identityRoles; + /** + * @var AuthenticationService + */ + protected $authenticationService; + + /** + * @param AuthenticationService $authenticationService + */ + public function setAuthenticationService(AuthenticationService $authenticationService) + { + $this->authenticationService = $authenticationService; + } + /** * Retourne l'utilisateur BDD courant * @@ -92,7 +106,7 @@ class UserContext extends AbstractService implements EventManagerAwareInterface public function getIdentity() { if (null === $this->identity) { - $authenticationService = $this->getServiceLocator()->get('Zend\Authentication\AuthenticationService'); + $authenticationService = $this->authenticationService; if ($authenticationService->hasIdentity()) { $this->identity = $authenticationService->getIdentity(); } @@ -337,7 +351,7 @@ class UserContext extends AbstractService implements EventManagerAwareInterface $event ->setRole($role) ->setTarget($this); - $this->getEventManager()->trigger($event); + $this->getEventManager()->triggerEvent($event); } /** diff --git a/src/UnicaenAuth/Service/UserContextFactory.php b/src/UnicaenAuth/Service/UserContextFactory.php index a8392c0fcaaaf4adf61c0e6ab89e9791b94883c5..245ea1bc52b4a8499c94dddbe33852e24ac13d53 100644 --- a/src/UnicaenAuth/Service/UserContextFactory.php +++ b/src/UnicaenAuth/Service/UserContextFactory.php @@ -2,17 +2,22 @@ namespace UnicaenAuth\Service; -use Zend\ServiceManager\ServiceLocatorInterface; +use Interop\Container\ContainerInterface; +use Zend\Authentication\AuthenticationService; class UserContextFactory { /** - * @param ServiceLocatorInterface $sl + * @param ContainerInterface $container * @return UserContext */ - public function __invoke(ServiceLocatorInterface $sl) + public function __invoke(ContainerInterface $container) { + /** @var AuthenticationService $authenticationService */ + $authenticationService = $container->get('Zend\Authentication\AuthenticationService'); + $service = new UserContext(); + $service->setAuthenticationService($authenticationService); return $service; } diff --git a/src/UnicaenAuth/Service/UserFactory.php b/src/UnicaenAuth/Service/UserFactory.php new file mode 100644 index 0000000000000000000000000000000000000000..4eb61a9457eb5201a92d82b68f73e860b6cb0a1a --- /dev/null +++ b/src/UnicaenAuth/Service/UserFactory.php @@ -0,0 +1,36 @@ +get('unicaen-auth_module_options'); + + /** @var ZfcUserModuleOptions $zfcUserModulesOptions */ + $zfcUserModulesOptions = $container->get('zfcuser_module_options'); + + /** @var UserMapper $mapper */ + $mapper = $container->get('zfcuser_user_mapper'); + + $service = new User(); + $service->setUserMapper($mapper); + $service->setOptions($moduleOptions); + $service->setZfcUserOptions($zfcUserModulesOptions); + + return $service; + } + + public function createService(ServiceLocatorInterface $serviceLocator) + { + return $this->__invoke($serviceLocator, '?'); + } +} \ No newline at end of file diff --git a/src/UnicaenAuth/Service/UserMapper.php b/src/UnicaenAuth/Service/UserMapper.php index 88c6b6ade37b18e82e2bd921ef7ec4b81602f2b2..52522ec4a4bbf371fa9311f35f8e5e0a0ac85ef0 100644 --- a/src/UnicaenAuth/Service/UserMapper.php +++ b/src/UnicaenAuth/Service/UserMapper.php @@ -2,11 +2,78 @@ namespace UnicaenAuth\Service; +use Doctrine\ORM\EntityManagerInterface; use UnicaenAuth\Entity\Db\AbstractUser; -use ZfcUserDoctrineORM\Mapper\User as ZfcUserDoctrineORMUserMapper; +use UnicaenAuth\Options\ModuleOptions; +use Zend\Hydrator\HydratorInterface; -class UserMapper extends ZfcUserDoctrineORMUserMapper +class UserMapper extends \ZfcUser\Mapper\User { + //========== repris du module zf-commons/zfc-user-doctrine-orm abandonné ========= + /** + * @var \Doctrine\ORM\EntityManagerInterface + */ + protected $em; + + /** + * @var ModuleOptions + */ + protected $options; + + public function __construct(EntityManagerInterface $em, ModuleOptions $options) + { + $this->em = $em; + $this->options = $options; + } + + public function findByEmail($email) + { + $er = $this->em->getRepository($this->options->getUserEntityClass()); + + return $er->findOneBy(array('email' => $email)); + } + + public function findByUsername($username) + { + $er = $this->em->getRepository($this->options->getUserEntityClass()); + + return $er->findOneBy(array('username' => $username)); + } + + public function findById($id) + { + $er = $this->em->getRepository($this->options->getUserEntityClass()); + + return $er->find($id); + } + + /** + * {@inheritdoc} + */ + public function insert($entity, $tableName = null, HydratorInterface $hydrator = null) + { + return $this->persist($entity); + } + + /** + * {@inheritdoc} + */ + public function update($entity, $where = null, $tableName = null, HydratorInterface $hydrator = null) + { + return $this->persist($entity); + } + + protected function persist($entity) + { + $this->em->persist($entity); + $this->em->flush(); + + return $entity; + } + //=================== + + + /** * Recherche un utilisateur par son username (identifiant de connexion). * diff --git a/src/UnicaenAuth/Service/UserMapperFactory.php b/src/UnicaenAuth/Service/UserMapperFactory.php index a6c83548907240466c147fc1a74228d62fa0d06d..b2ceff2b9debba257d9fed342e79b1d786edd3ae 100644 --- a/src/UnicaenAuth/Service/UserMapperFactory.php +++ b/src/UnicaenAuth/Service/UserMapperFactory.php @@ -3,24 +3,25 @@ namespace UnicaenAuth\Service; use Doctrine\ORM\EntityManagerInterface; +use Interop\Container\ContainerInterface; +use UnicaenAuth\Options\ModuleOptions; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; class UserMapperFactory implements FactoryInterface { - /** - * Create service - * - * @param ServiceLocatorInterface $serviceLocator - * @return UserMapper - */ public function createService(ServiceLocatorInterface $serviceLocator) + { + return $this->__invoke($serviceLocator, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) { /** @var EntityManagerInterface $em */ - $em = $serviceLocator->get('zfcuser_doctrine_em'); + $em = $container->get('zfcuser_doctrine_em'); - /** @var \ZfcUserDoctrineORM\Options\ModuleOptions $options */ - $options = $serviceLocator->get('zfcuser_module_options'); + /** @var ModuleOptions $options */ + $options = $container->get('zfcuser_module_options'); return new UserMapper($em, $options); } diff --git a/src/UnicaenAuth/View/Helper/LdapConnectViewHelperFactory.php b/src/UnicaenAuth/View/Helper/LdapConnectViewHelperFactory.php index 71717d22997a8fbcde97b7d898b11c6dfc020354..056875650838c1bf6ec94ce4665e6b9b87c360ec 100644 --- a/src/UnicaenAuth/View/Helper/LdapConnectViewHelperFactory.php +++ b/src/UnicaenAuth/View/Helper/LdapConnectViewHelperFactory.php @@ -2,19 +2,19 @@ namespace UnicaenAuth\View\Helper; +use Interop\Container\ContainerInterface; use UnicaenAuth\Options\ModuleOptions; -use Zend\View\HelperPluginManager; class LdapConnectViewHelperFactory { /** - * @param HelperPluginManager $hpm + * @param ContainerInterface $container * @return LdapConnectViewHelper */ - public function __invoke(HelperPluginManager $hpm) + public function __invoke(ContainerInterface $container) { /** @var ModuleOptions $moduleOptions */ - $moduleOptions = $hpm->getServiceLocator()->get('unicaen-auth_module_options'); + $moduleOptions = $container->get('unicaen-auth_module_options'); $ldapArrayConfig = $moduleOptions->getLdap(); $ldapEnabled = isset($ldapArrayConfig['enabled']) && (bool) $ldapArrayConfig['enabled']; diff --git a/src/UnicaenAuth/View/Helper/LocalConnectViewHelperFactory.php b/src/UnicaenAuth/View/Helper/LocalConnectViewHelperFactory.php index 092f0cc68a32c7988e1fad4e2d14ea6a54f4c854..79a43f683b202d5e8d2a1457d5ec86f932629001 100644 --- a/src/UnicaenAuth/View/Helper/LocalConnectViewHelperFactory.php +++ b/src/UnicaenAuth/View/Helper/LocalConnectViewHelperFactory.php @@ -2,19 +2,19 @@ namespace UnicaenAuth\View\Helper; +use Interop\Container\ContainerInterface; use UnicaenAuth\Options\ModuleOptions; -use Zend\View\HelperPluginManager; class LocalConnectViewHelperFactory { /** - * @param HelperPluginManager $hpm + * @param ContainerInterface $container * @return LocalConnectViewHelper */ - public function __invoke(HelperPluginManager $hpm) + public function __invoke(ContainerInterface $container) { /** @var ModuleOptions $moduleOptions */ - $moduleOptions = $hpm->getServiceLocator()->get('unicaen-auth_module_options'); + $moduleOptions = $container->get('unicaen-auth_module_options'); $config = $moduleOptions->getLocal(); $enabled = isset($config['enabled']) && (bool) $config['enabled']; diff --git a/src/UnicaenAuth/View/Helper/ShibConnectViewHelperFactory.php b/src/UnicaenAuth/View/Helper/ShibConnectViewHelperFactory.php index f9828c0e12a42a208f8a3b680f8d9459b7a6cdcf..1d207a2c377becc90f6397ff8dc9bc57397eb09a 100644 --- a/src/UnicaenAuth/View/Helper/ShibConnectViewHelperFactory.php +++ b/src/UnicaenAuth/View/Helper/ShibConnectViewHelperFactory.php @@ -2,19 +2,19 @@ namespace UnicaenAuth\View\Helper; +use Interop\Container\ContainerInterface; use UnicaenAuth\Service\ShibService; -use Zend\View\HelperPluginManager; class ShibConnectViewHelperFactory { /** - * @param HelperPluginManager $hpm + * @param ContainerInterface $container * @return ShibConnectViewHelper */ - public function __invoke(HelperPluginManager $hpm) + public function __invoke(ContainerInterface $container) { /** @var ShibService $shibService */ - $shibService = $hpm->getServiceLocator()->get(ShibService::class); + $shibService = $container->get(ShibService::class); $helper = new ShibConnectViewHelper(); $helper->setShibService($shibService); diff --git a/src/UnicaenAuth/View/Helper/UserConnectionFactory.php b/src/UnicaenAuth/View/Helper/UserConnectionFactory.php index ae064c469f1a5b95ca6d3e5fbd5dc49f71fb0cc7..5f3372a2f073adb9f170d971ccf2309560c91fc9 100644 --- a/src/UnicaenAuth/View/Helper/UserConnectionFactory.php +++ b/src/UnicaenAuth/View/Helper/UserConnectionFactory.php @@ -2,6 +2,7 @@ namespace UnicaenAuth\View\Helper; +use Interop\Container\ContainerInterface; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; @@ -12,16 +13,15 @@ use Zend\ServiceManager\ServiceLocatorInterface; */ class UserConnectionFactory implements FactoryInterface { - /** - * Create service - * - * @param ServiceLocatorInterface $helperPluginManager - * @return UserConnection - */ public function createService(ServiceLocatorInterface $helperPluginManager) { - $authUserContext = $helperPluginManager->getServiceLocator()->get('authUserContext'); - + return $this->__invoke($helperPluginManager, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) + { + $authUserContext = $container->get('authUserContext'); + return new UserConnection($authUserContext); } } \ No newline at end of file diff --git a/src/UnicaenAuth/View/Helper/UserCurrentFactory.php b/src/UnicaenAuth/View/Helper/UserCurrentFactory.php index e8642f6f4dc54b3d312da25e1aff594806e8070c..845135e7d57c9d40a75b727d54364fb052b9f6c6 100644 --- a/src/UnicaenAuth/View/Helper/UserCurrentFactory.php +++ b/src/UnicaenAuth/View/Helper/UserCurrentFactory.php @@ -2,6 +2,7 @@ namespace UnicaenAuth\View\Helper; +use Interop\Container\ContainerInterface; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; @@ -12,16 +13,15 @@ use Zend\ServiceManager\ServiceLocatorInterface; */ class UserCurrentFactory implements FactoryInterface { - /** - * Create service - * - * @param ServiceLocatorInterface $helperPluginManager - * @return UserCurrent - */ public function createService(ServiceLocatorInterface $helperPluginManager) { - $authUserContext = $helperPluginManager->getServiceLocator()->get('authUserContext'); - + return $this->__invoke($helperPluginManager, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) + { + $authUserContext = $container->get('authUserContext'); + return new UserCurrent($authUserContext); } } \ No newline at end of file diff --git a/src/UnicaenAuth/View/Helper/UserInfoFactory.php b/src/UnicaenAuth/View/Helper/UserInfoFactory.php index 5852ec572cf22aa789b1ec0023a562f824311162..d52e50d3f41e6566ad5d53cea45ff4fe4f2bdf68 100644 --- a/src/UnicaenAuth/View/Helper/UserInfoFactory.php +++ b/src/UnicaenAuth/View/Helper/UserInfoFactory.php @@ -2,6 +2,7 @@ namespace UnicaenAuth\View\Helper; +use Interop\Container\ContainerInterface; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; @@ -12,21 +13,20 @@ use Zend\ServiceManager\ServiceLocatorInterface; */ class UserInfoFactory implements FactoryInterface { - /** - * Create service - * - * @param ServiceLocatorInterface $helperPluginManager - * @return UserInfo - */ public function createService(ServiceLocatorInterface $helperPluginManager) { - $serviceLocator = $helperPluginManager->getServiceLocator(); + return $this->__invoke($helperPluginManager, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) + { + $serviceLocator = $container; $authUserContext = $serviceLocator->get('authUserContext'); $mapper = $serviceLocator->get('ldap_structure_mapper'); $helper = new UserInfo($authUserContext); $helper->setMapperStructure($mapper); - + return $helper; } } \ No newline at end of file diff --git a/src/UnicaenAuth/View/Helper/UserProfile.php b/src/UnicaenAuth/View/Helper/UserProfile.php index f00c0ee374a12fb5c58437b4740f876d1c6b7ba3..56393d96790e722794f1a22afc06d62bf93f3e37 100644 --- a/src/UnicaenAuth/View/Helper/UserProfile.php +++ b/src/UnicaenAuth/View/Helper/UserProfile.php @@ -55,9 +55,9 @@ class UserProfile extends UserAbstract $html = "$title :" . PHP_EOL; if ($this->userProfileSelectable) { - $html .= $this->getView()->userProfileSelect(false); + $html .= $this->view->userProfileSelect(false); } else { - $html .= $this->getView()->htmlList($roles); + $html .= $this->view->htmlList($roles); } return $html; diff --git a/src/UnicaenAuth/View/Helper/UserProfileFactory.php b/src/UnicaenAuth/View/Helper/UserProfileFactory.php index 05e7015f353415b70948824e47f566e00d4a14bf..7b8c423c9a7c4f73a00d4637f9363d545c1fdc1a 100644 --- a/src/UnicaenAuth/View/Helper/UserProfileFactory.php +++ b/src/UnicaenAuth/View/Helper/UserProfileFactory.php @@ -2,6 +2,7 @@ namespace UnicaenAuth\View\Helper; +use Interop\Container\ContainerInterface; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; @@ -12,15 +13,14 @@ use Zend\ServiceManager\ServiceLocatorInterface; */ class UserProfileFactory implements FactoryInterface { - /** - * Create service - * - * @param ServiceLocatorInterface $helperPluginManager - * @return UserProfile - */ public function createService(ServiceLocatorInterface $helperPluginManager) { - $serviceLocator = $helperPluginManager->getServiceLocator(); + return $this->__invoke($helperPluginManager, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) + { + $serviceLocator = $container; $authUserContext = $serviceLocator->get('authUserContext'); return new UserProfile($authUserContext); diff --git a/src/UnicaenAuth/View/Helper/UserProfileSelectFactory.php b/src/UnicaenAuth/View/Helper/UserProfileSelectFactory.php index ab6fe27fba1a45be423fe9e5c22834a76c60c9bb..ab36cdf2851510196a0d7fba957bb6b7bd7583d2 100644 --- a/src/UnicaenAuth/View/Helper/UserProfileSelectFactory.php +++ b/src/UnicaenAuth/View/Helper/UserProfileSelectFactory.php @@ -2,24 +2,27 @@ namespace UnicaenAuth\View\Helper; -use Zend\ServiceManager\ServiceLocatorInterface; +use Interop\Container\ContainerInterface; +use UnicaenAuth\Service\UserContext; /** * Description of UserProfileFactory * * @author Bertrand GAUTHIER */ -class UserProfileSelectFactory extends \UnicaenApp\View\Helper\UserProfileSelectFactory +class UserProfileSelectFactory { /** * Create service * - * @param ServiceLocatorInterface $helperPluginManager - * @return UserProfile + * @param ContainerInterface $container + * @return UserProfileSelect */ - public function createService(ServiceLocatorInterface $helperPluginManager) + public function __invoke(ContainerInterface $container) { - $serviceLocator = $helperPluginManager->getServiceLocator(); + $serviceLocator = $container; + + /** @var UserContext $userContextService */ $userContextService = $serviceLocator->get('AuthUserContext'); return new UserProfileSelect($userContextService); diff --git a/src/UnicaenAuth/View/Helper/UserProfileSelectRadioItemFactory.php b/src/UnicaenAuth/View/Helper/UserProfileSelectRadioItemFactory.php index 76454bd81afdef0fc0423927f082280f3cfc03c3..f5e3af6e704c0b4b8c37c935140cd2164865c99d 100644 --- a/src/UnicaenAuth/View/Helper/UserProfileSelectRadioItemFactory.php +++ b/src/UnicaenAuth/View/Helper/UserProfileSelectRadioItemFactory.php @@ -2,24 +2,27 @@ namespace UnicaenAuth\View\Helper; -use Zend\ServiceManager\ServiceLocatorInterface; +use Interop\Container\ContainerInterface; +use UnicaenAuth\Service\UserContext; /** * * * @author Bertrand GAUTHIER */ -class UserProfileSelectRadioItemFactory extends \UnicaenApp\View\Helper\UserProfileSelectFactory +class UserProfileSelectRadioItemFactory { /** * Create service * - * @param ServiceLocatorInterface $helperPluginManager - * @return UserProfile + * @param ContainerInterface $container + * @return UserProfileSelectRadioItem */ - public function createService(ServiceLocatorInterface $helperPluginManager) + public function __invoke(ContainerInterface $container) { - $serviceLocator = $helperPluginManager->getServiceLocator(); + $serviceLocator = $container; + + /** @var UserContext $userContextService */ $userContextService = $serviceLocator->get('AuthUserContext'); return new UserProfileSelectRadioItem($userContextService); diff --git a/src/UnicaenAuth/View/Helper/UserStatusFactory.php b/src/UnicaenAuth/View/Helper/UserStatusFactory.php index 7427c95dec90ba09c914514d2c9475487731ecef..cbcad7c71d4ceba75541a8433aada775b4c6e8b2 100644 --- a/src/UnicaenAuth/View/Helper/UserStatusFactory.php +++ b/src/UnicaenAuth/View/Helper/UserStatusFactory.php @@ -2,6 +2,7 @@ namespace UnicaenAuth\View\Helper; +use Interop\Container\ContainerInterface; use Zend\ServiceManager\FactoryInterface; use Zend\ServiceManager\ServiceLocatorInterface; @@ -12,16 +13,15 @@ use Zend\ServiceManager\ServiceLocatorInterface; */ class UserStatusFactory implements FactoryInterface { - /** - * Create service - * - * @param ServiceLocatorInterface $helperPluginManager - * @return UserStatus - */ public function createService(ServiceLocatorInterface $helperPluginManager) { - $userContext = $helperPluginManager->getServiceLocator()->get('authUserContext'); - + return $this->__invoke($helperPluginManager, '?'); + } + + public function __invoke(ContainerInterface $container, $requestedName, array $options = null) + { + $userContext = $container->get('authUserContext'); + return new UserStatus($userContext); } } \ No newline at end of file diff --git a/src/UnicaenAuth/View/Helper/UserUsurpationHelperFactory.php b/src/UnicaenAuth/View/Helper/UserUsurpationHelperFactory.php index 9aa21103a2f05a72c3d26c2587b9c97e9123de5d..49b67431dd8e3c1749f22d7bd4e97077dff1c459 100644 --- a/src/UnicaenAuth/View/Helper/UserUsurpationHelperFactory.php +++ b/src/UnicaenAuth/View/Helper/UserUsurpationHelperFactory.php @@ -2,28 +2,28 @@ namespace UnicaenAuth\View\Helper; +use Interop\Container\ContainerInterface; use UnicaenAuth\Options\ModuleOptions; use UnicaenAuth\Service\UserContext; use Zend\View\Helper\Url; -use Zend\View\HelperPluginManager; class UserUsurpationHelperFactory { /** - * @param HelperPluginManager $hpm + * @param ContainerInterface $container * @return UserUsurpationHelper */ - public function __invoke(HelperPluginManager $hpm) + public function __invoke(ContainerInterface $container) { /** @var Url $urlHelper */ - $urlHelper = $hpm->get('url'); + $urlHelper = $container->get('ViewHelperManager')->get('url'); $url = $urlHelper->__invoke('utilisateur/default', ['action' => 'usurper-identite']); /** @var UserContext $userContextService */ - $userContextService = $hpm->getServiceLocator()->get('authUserContext'); + $userContextService = $container->get('AuthUserContext'); /** @var ModuleOptions $moduleOptions */ - $moduleOptions = $hpm->getServiceLocator()->get('unicaen-auth_module_options'); + $moduleOptions = $container->get('unicaen-auth_module_options'); $usurpationAllowed = in_array( $userContextService->getIdentityUsername(), diff --git a/tests/Bootstrap.php b/tests/Bootstrap.php new file mode 100644 index 0000000000000000000000000000000000000000..2c872f405ff83f11dee28677eab9bfa8afc69fa7 --- /dev/null +++ b/tests/Bootstrap.php @@ -0,0 +1,88 @@ + [ + 'autoregister_zf' => true, + 'namespaces' => [ + __NAMESPACE__ => __DIR__ . '/' . __NAMESPACE__, + ], + ], + ]); + } + + protected static function findParentPath($path) + { + $dir = __DIR__; + $previousDir = '.'; + while (!is_dir($dir . '/' . $path)) { + $dir = dirname($dir); + if ($previousDir === $dir) return false; + $previousDir = $dir; + } + return $dir . '/' . $path; + } +} + +Bootstrap::init(); \ No newline at end of file diff --git a/tests/UnicaenAuthTest/Authentication/Adapter/AbstractFactoryTest.php b/tests/UnicaenAuthTest/Authentication/Adapter/AbstractFactoryTest.php index 20cd629f4829984ddc3cc68cbf2050515aa2bd76..6e4db97b8184012a9c87948da63db69259cb74db 100644 --- a/tests/UnicaenAuthTest/Authentication/Adapter/AbstractFactoryTest.php +++ b/tests/UnicaenAuthTest/Authentication/Adapter/AbstractFactoryTest.php @@ -15,6 +15,9 @@ use Zend\ServiceManager\ServiceManager; */ class AbstractFactoryTest extends PHPUnit_Framework_TestCase { + /** + * @var AbstractFactory + */ protected $factory; protected function setUp() @@ -59,7 +62,7 @@ class AbstractFactoryTest extends PHPUnit_Framework_TestCase /** * @dataProvider getInvalidServiceClassName - * @expectedException \UnicaenApp\Exception + * @expectedException \UnicaenApp\Exception\RuntimeException * @param string $serviceClassName */ public function testCreateServiceWithNameThrowsExceptionIfInvalidServiceSpecified($serviceClassName) @@ -75,7 +78,7 @@ class AbstractFactoryTest extends PHPUnit_Framework_TestCase { $eventManager = new EventManager(); - $serviceLocator = $this->getMock('Zend\ServiceManager\ServiceManager', ['get']); + $serviceLocator = $this->createMock('Zend\ServiceManager\ServiceManager'/*, ['get']*/); $serviceLocator->expects($this->any()) ->method('get') ->will($this->returnCallback(function($serviceName) use ($eventManager) { diff --git a/tests/UnicaenAuthTest/Authentication/Adapter/CasTest.php b/tests/UnicaenAuthTest/Authentication/Adapter/CasTest.php index 1bdb35a83baad027eb05b3a3c5101a306451c67f..82969c0304238c44a89bfbcd1b6cb1d067f2032e 100644 --- a/tests/UnicaenAuthTest/Authentication/Adapter/CasTest.php +++ b/tests/UnicaenAuthTest/Authentication/Adapter/CasTest.php @@ -1,18 +1,16 @@ moduleOptions = $moduleOptions = new \UnicaenAuth\Options\ModuleOptions([ + $this->moduleOptions = $moduleOptions = new ModuleOptions([ 'cas' => [ 'connection' => [ 'default' => [ @@ -45,7 +50,7 @@ class CasTest extends PHPUnit_Framework_TestCase ], ]); - $serviceManager = $this->getMock('Zend\ServiceManager\ServiceManager', ['get']); + $serviceManager = $this->createMock('Zend\ServiceManager\ServiceManager'/*, ['get']*/); $serviceManager->expects($this->any()) ->method('get') ->will($this->returnCallback(function($serviceName) use ($moduleOptions) { @@ -80,7 +85,7 @@ class CasTest extends PHPUnit_Framework_TestCase /** * @dataProvider getInvalidCasOptions - * @expectedException Exception + * @expectedException RuntimeException */ public function testThrowsExceptionIfNoCasParamSpecified($config) { @@ -95,54 +100,11 @@ class CasTest extends PHPUnit_Framework_TestCase $this->assertNull($result); } - public function testCanActivateCasDebugMode() - { - $this->moduleOptions->setCas([ - 'connection' => [ - 'default' => [ - 'params' => [ - 'hostname' => 'cas.unicaen.fr', - 'port' => 443, - 'version' => "2.0", - 'uri' => "", - 'debug' => true, // debug mode - ], - ], - ], - ]); - - $casClient = $this->getMock('phpCAS', ['setDebug', 'client', 'setNoCasServerValidation']); - $casClient->staticExpects($this->once()) - ->method('setDebug'); - $this->adapter->setCasClient($casClient); - - $this->adapter->getCasClient(); - } - - public function testCanRedirectToCasIfNotAuthenticated() - { - CAS_GracefullTerminationException::throwInsteadOfExiting(); - - ob_start(); - try { - $result = $this->adapter->authenticate(new AdapterChainEvent()); - $this->fail("Exception CAS_GracefullTerminationException non levée."); - } - catch (CAS_GracefullTerminationException $e) { - - } - $result = ob_get_clean(); - - $expected = <<CAS Authentication wanted!

CAS Authentication wanted!

You should already have been redirected to the CAS server. Click here to continue.


phpCAS 1.3.2+ using server https://cas.unicaen.fr/ (CAS 2.0)
-EOS; - $this->assertEquals($expected, $result); - } - - public function testAuthenticateReturnsTrueWhenAuthenticationSucceeds() + public function testAuthenticatePopulatesEventWhenAuthenticationSucceeds() { - $casClient = $this->getMock('phpCAS', ['client', 'forceAuthentication', 'getUser']); - $casClient->staticExpects($this->once()) + /** @var phpCASWrapper|\PHPUnit_Framework_MockObject_MockObject $casClient */ + $casClient = $this->createMock(phpCASWrapper::class); + $casClient->expects($this->once()) ->method('getUser') ->will($this->returnValue($username = 'username')); @@ -150,16 +112,14 @@ EOS; $event = new AdapterChainEvent(); - $result = $this->adapter->authenticate($event); + $this->adapter->authenticate($event); - $this->assertTrue($result); $this->assertTrue($this->adapter->isSatisfied()); $this->assertEquals(['is_satisfied' => true, 'identity' => $username], $this->adapter->getStorage()->read()); $this->assertEquals("userAuthenticated", $event->getName()); $this->assertEquals(Result::SUCCESS, $event->getCode()); $this->assertEquals($username, $event->getIdentity()); - $this->assertTrue($event->propagationIsStopped()); } public function testLogoutReturnsNullIfNoCasConfigSpecified() @@ -171,11 +131,12 @@ EOS; public function testCanLogoutFromCasWithRedirectService() { - $casClient = $this->getMock('phpCAS', ['client', 'isAuthenticated', 'logoutWithRedirectService']); - $casClient->staticExpects($this->once()) + /** @var phpCASWrapper|\PHPUnit_Framework_MockObject_MockObject $casClient */ + $casClient = $this->createMock(phpCASWrapper::class); + $casClient->expects($this->once()) ->method('isAuthenticated') ->will($this->returnValue(true)); - $casClient->staticExpects($this->once()) + $casClient->expects($this->once()) ->method('logoutWithRedirectService'); $this->adapter->setCasClient($casClient); diff --git a/tests/UnicaenAuthTest/Authentication/Adapter/DbTest.php b/tests/UnicaenAuthTest/Authentication/Adapter/DbTest.php index 9e51e3f1d988a8d13483ec96a4df88605c232974..e5edf6c3e0bb8f595d8ac8456941d4f8ef213f3d 100644 --- a/tests/UnicaenAuthTest/Authentication/Adapter/DbTest.php +++ b/tests/UnicaenAuthTest/Authentication/Adapter/DbTest.php @@ -43,9 +43,9 @@ class DbTest extends PHPUnit_Framework_TestCase ], ]); - $this->mapper = $mapper = $this->getMock('ZfcUser\Mapper\User', ['findByUsername', 'findByEmail']); + $this->mapper = $mapper = $this->createMock('ZfcUser\Mapper\User'/*, ['findByUsername', 'findByEmail']*/); - $serviceManager = $this->getMock('Zend\ServiceManager\ServiceManager', ['get']); + $serviceManager = $this->createMock('Zend\ServiceManager\ServiceManager'/*, ['get']*/); $serviceManager->expects($this->any()) ->method('get') ->will($this->returnCallback(function($serviceName) use ($moduleOptions, $mapper) { diff --git a/tests/UnicaenAuthTest/Authentication/Adapter/LdapTest.php b/tests/UnicaenAuthTest/Authentication/Adapter/LdapTest.php index 7186f0d4c36b62af7c89e8165b092824a39819c2..bf14c6bdf0a98b4642e8953b4ea1afc12ecef9a3 100644 --- a/tests/UnicaenAuthTest/Authentication/Adapter/LdapTest.php +++ b/tests/UnicaenAuthTest/Authentication/Adapter/LdapTest.php @@ -1,4 +1,5 @@ ['usurpateur'], ]); - $this->mapper = $mapper = $this->getMock('ZfcUser\Mapper\User', ['findByUsername', 'findByEmail']); - - $serviceManager = $this->getMock('Zend\ServiceManager\ServiceManager', ['get']); + /** @var ServiceManager|\PHPUnit_Framework_MockObject_MockObject $serviceManager */ + $serviceManager = $this->createMock('Zend\ServiceManager\ServiceManager'/*, ['get']*/); $serviceManager->expects($this->any()) ->method('get') - ->will($this->returnCallback(function($serviceName) use ($authModuleOptions, $appModuleOptions, $mapper) { + ->will($this->returnCallback(function($serviceName) use ($authModuleOptions, $appModuleOptions) { if ('zfcuser_module_options' === $serviceName) { return new \ZfcUser\Options\ModuleOptions(); } @@ -62,9 +78,6 @@ class LdapTest extends PHPUnit_Framework_TestCase if ('unicaen-auth_module_options' === $serviceName) { return $authModuleOptions; } - if ('zfcuser_user_mapper' === $serviceName) { - return $mapper; - } return null; })); @@ -94,27 +107,84 @@ class LdapTest extends PHPUnit_Framework_TestCase public function testUsurpationWithAllowedUsernameAndSuccessfulAuthentication() { + /** @var \Zend\Authentication\Adapter\Ldap|\PHPUnit_Framework_MockObject_MockObject $zendAuthLdapAdapter */ + $this->zendAuthLdapAdapter = $this->createMock('Zend\Authentication\Adapter\Ldap'); + + /** @var \Zend\Ldap\Ldap|\PHPUnit_Framework_MockObject_MockObject $ldap */ + $ldap = $this->createMock(\Zend\Ldap\Ldap::class); + $ldap + ->expects($this->once()) + ->method('searchEntries') + ->willReturn(true); + + /** @var \Zend\Authentication\Adapter\Ldap|\PHPUnit_Framework_MockObject_MockObject $ldapAuthAdapter */ + $this->zendAuthLdapAdapter->expects($this->once()) + ->method('getLdap') + ->willReturn($ldap); + $this->authModuleOptions->setUsurpationAllowedUsernames(['usurpateur']); $event = new AdapterChainEvent(); - $result = $this->_authenticateWithUsurpation(Result::SUCCESS, $event); + $this->_authenticateWithUsurpation(Result::SUCCESS, $event); - $this->assertTrue($result); $this->assertTrue($this->adapter->isSatisfied()); $this->assertEquals(['is_satisfied' => true, 'identity' => 'usurpe'], $this->adapter->getStorage()->read()); $this->assertEquals("userAuthenticated", $event->getName()); $this->assertEquals(Result::SUCCESS, $event->getCode()); $this->assertEquals('usurpe', $event->getIdentity()); - $this->assertTrue($event->propagationIsStopped()); } public function testUsurpationWithAllowedUsernameAndUnsuccessfulAuthentication() { + /** @var \Zend\Authentication\Adapter\Ldap|\PHPUnit_Framework_MockObject_MockObject $zendAuthLdapAdapter */ + $this->zendAuthLdapAdapter = $this->createMock('Zend\Authentication\Adapter\Ldap'); + + /** @var \Zend\Ldap\Ldap|\PHPUnit_Framework_MockObject_MockObject $ldap */ + $ldap = $this->createMock(\Zend\Ldap\Ldap::class); + $ldap + ->expects($this->once()) + ->method('searchEntries') + ->willReturn([]); + + /** @var \Zend\Authentication\Adapter\Ldap|\PHPUnit_Framework_MockObject_MockObject $ldapAuthAdapter */ + $this->zendAuthLdapAdapter->expects($this->once()) + ->method('getLdap') + ->willReturn($ldap); + + $this->authModuleOptions->setUsurpationAllowedUsernames(['usurpateur']); + $event = new AdapterChainEvent(); + $this->_authenticateWithUsurpation(Result::FAILURE, $event); + + $this->assertFalse($this->adapter->isSatisfied()); + $this->assertEquals(['is_satisfied' => false], $this->adapter->getStorage()->read()); + + $this->assertNull($event->getName()); + $this->assertEquals(Result::FAILURE, $event->getCode()); + $this->assertNull($event->getIdentity()); + $this->assertFalse($event->propagationIsStopped()); + } + + public function testUsurpationWithAllowedButUnexistingUsername() + { + /** @var \Zend\Authentication\Adapter\Ldap|\PHPUnit_Framework_MockObject_MockObject $zendAuthLdapAdapter */ + $this->zendAuthLdapAdapter = $this->createMock('Zend\Authentication\Adapter\Ldap'); + + /** @var \Zend\Ldap\Ldap|\PHPUnit_Framework_MockObject_MockObject $ldap */ + $ldap = $this->createMock(\Zend\Ldap\Ldap::class); + $ldap + ->expects($this->once()) + ->method('searchEntries') + ->willReturn([]); + + /** @var \Zend\Authentication\Adapter\Ldap|\PHPUnit_Framework_MockObject_MockObject $ldapAuthAdapter */ + $this->zendAuthLdapAdapter->expects($this->once()) + ->method('getLdap') + ->willReturn($ldap); + $this->authModuleOptions->setUsurpationAllowedUsernames(['usurpateur']); $event = new AdapterChainEvent(); - $result = $this->_authenticateWithUsurpation(Result::FAILURE, $event); + $this->_authenticateWithUsurpation(Result::FAILURE, $event); - $this->assertFalse($result); $this->assertFalse($this->adapter->isSatisfied()); $this->assertEquals(['is_satisfied' => false], $this->adapter->getStorage()->read()); @@ -126,26 +196,29 @@ class LdapTest extends PHPUnit_Framework_TestCase public function testUsurpationWithNotAllowedUsernameAndSuccessfulAuthentication() { + /** @var \Zend\Authentication\Adapter\Ldap|\PHPUnit_Framework_MockObject_MockObject $zendAuthLdapAdapter */ + $this->zendAuthLdapAdapter = $this->createMock('Zend\Authentication\Adapter\Ldap'); + $this->authModuleOptions->setUsurpationAllowedUsernames([]); $event = new AdapterChainEvent(); - $result = $this->_authenticateWithUsurpation(Result::SUCCESS, $event); + $this->_authenticateWithUsurpation(Result::SUCCESS, $event); - $this->assertTrue($result); $this->assertTrue($this->adapter->isSatisfied()); - $this->assertEquals(['is_satisfied' => true, 'identity' => 'usurpateur'], $this->adapter->getStorage()->read()); + $this->assertEquals(['is_satisfied' => true, 'identity' => 'usurpateur=usurpe'], $this->adapter->getStorage()->read()); $this->assertEquals("userAuthenticated", $event->getName()); - $this->assertTrue($event->propagationIsStopped()); - $this->assertEquals('usurpateur', $event->getIdentity()); + $this->assertEquals('usurpateur=usurpe', $event->getIdentity()); } public function testUsurpationWithNotAllowedUsernameAndUnsuccessfulAuthentication() { + /** @var \Zend\Authentication\Adapter\Ldap|\PHPUnit_Framework_MockObject_MockObject $zendAuthLdapAdapter */ + $this->zendAuthLdapAdapter = $this->createMock('Zend\Authentication\Adapter\Ldap'); + $this->authModuleOptions->setUsurpationAllowedUsernames([]); $event = new AdapterChainEvent(); - $result = $this->_authenticateWithUsurpation(Result::FAILURE, $event); + $this->_authenticateWithUsurpation(Result::FAILURE, $event); - $this->assertFalse($result); $this->assertFalse($this->adapter->isSatisfied()); $this->assertEquals(['is_satisfied' => false], $this->adapter->getStorage()->read()); @@ -161,23 +234,22 @@ class LdapTest extends PHPUnit_Framework_TestCase $usernameUsurpe = 'usurpe'; $username = $usernameUsurpateur . Ldap::USURPATION_USERNAMES_SEP . $usernameUsurpe; - $ldapAuthAdapter = $this->getMock('Zend\Authentication\Adapter\Ldap', ['setUsername', 'setPassword', 'authenticate']); - $ldapAuthAdapter->expects($this->once()) + $this->zendAuthLdapAdapter->expects($this->once()) ->method('setUsername') ->with($usernameUsurpateur) ->will($this->returnSelf()); - $ldapAuthAdapter->expects($this->once()) + $this->zendAuthLdapAdapter->expects($this->once()) ->method('setPassword') ->will($this->returnSelf()); - $ldapAuthAdapter->expects($this->once()) + $this->zendAuthLdapAdapter->expects($this->once()) ->method('authenticate') ->will($this->returnValue(new Result($authenticationResultCode, $usernameUsurpateur))); - $this->adapter->setLdapAuthAdapter($ldapAuthAdapter); + $this->adapter->setLdapAuthAdapter($this->zendAuthLdapAdapter); $request = new Request(); $request->setPost(new Parameters(['identity' => $username, 'credential' => "xxxxx"])); $event->setRequest($request); - return $this->adapter->authenticate($event); + $this->adapter->authenticate($event); } } \ No newline at end of file diff --git a/tests/UnicaenAuthTest/Authentication/AuthenticationServiceFactoryTest.php b/tests/UnicaenAuthTest/Authentication/AuthenticationServiceFactoryTest.php index 77c28af8bc885a95d0975e69d10a9ca37624c264..4cdb7b358ad321d99a3b7132934d983632b1dce4 100644 --- a/tests/UnicaenAuthTest/Authentication/AuthenticationServiceFactoryTest.php +++ b/tests/UnicaenAuthTest/Authentication/AuthenticationServiceFactoryTest.php @@ -16,8 +16,8 @@ class ModuleOptionsFactoryTest extends BaseServiceFactoryTest public function testCanCreateService() { - $storage = $this->getMock('UnicaenAuth\Authentication\Storage\Chain', []); - $adapter = $this->getMock('ZfcUser\Authentication\Adapter\AdapterChain', []); + $storage = $this->createMock('UnicaenAuth\Authentication\Storage\Chain'); + $adapter = $this->createMock('ZfcUser\Authentication\Adapter\AdapterChain'); $this->serviceManager->expects($this->exactly(2)) ->method('get') @@ -26,7 +26,7 @@ class ModuleOptionsFactoryTest extends BaseServiceFactoryTest ['ZfcUser\Authentication\Adapter\AdapterChain', $adapter], ])); - $service = $this->factory->createService($this->serviceManager); + $service = $this->factory->__invoke($this->serviceManager, ''); $this->assertInstanceOf($this->serviceClass, $service); } diff --git a/tests/UnicaenAuthTest/Authentication/Storage/ChainServiceFactoryTest.php b/tests/UnicaenAuthTest/Authentication/Storage/ChainServiceFactoryTest.php index a0010a92b76606fb08aa546a0fdb6932efda270f..5da08775fcccf09d78fa938ad3008fb601e84a18 100644 --- a/tests/UnicaenAuthTest/Authentication/Storage/ChainServiceFactoryTest.php +++ b/tests/UnicaenAuthTest/Authentication/Storage/ChainServiceFactoryTest.php @@ -23,9 +23,9 @@ class ChainServiceFactoryTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->factory = new ChainServiceFactory(); - $this->serviceLocator = $this->getMock('Zend\ServiceManager\ServiceLocatorInterface', []); - $this->ldapStorage = $this->getMock('UnicaenAuth\Authentication\Storage\Ldap', $this->events); - $this->dbStorage = $this->getMock('UnicaenAuth\Authentication\Storage\Db', $this->events); + $this->serviceLocator = $this->createMock('Zend\ServiceManager\ServiceLocatorInterface'/*, []*/); + $this->ldapStorage = $this->createMock('UnicaenAuth\Authentication\Storage\Ldap'/*, $this->events*/); + $this->dbStorage = $this->createMock('UnicaenAuth\Authentication\Storage\Db'/*, $this->events*/); } public function testCanCreateService() @@ -34,7 +34,7 @@ class ChainServiceFactoryTest extends \PHPUnit_Framework_TestCase ->method('get') ->will($this->onConsecutiveCalls($this->ldapStorage, $this->dbStorage)); - $service = $this->factory->createService($this->serviceLocator); + $service = $this->factory->__invoke($this->serviceLocator, ''); $this->assertInstanceOf('UnicaenAuth\Authentication\Storage\Chain', $service); diff --git a/tests/UnicaenAuthTest/Authentication/Storage/ChainTest.php b/tests/UnicaenAuthTest/Authentication/Storage/ChainTest.php index ab70c8224016cc90155799f84da2bb1810cb2a1e..04f1426cbec06bd5452655630bbd2149a8e04ad1 100644 --- a/tests/UnicaenAuthTest/Authentication/Storage/ChainTest.php +++ b/tests/UnicaenAuthTest/Authentication/Storage/ChainTest.php @@ -11,9 +11,17 @@ use UnicaenAuth\Authentication\Storage\Chain; */ class ChainTest extends \PHPUnit_Framework_TestCase { + /** + * @var Chain + */ protected $storage; + protected $innerStorage; protected $eventManager; + + /** + * @var \UnicaenAuth\Authentication\Storage\ChainEvent|\PHPUnit_Framework_MockObject_MockObject + */ protected $event; /** @@ -23,9 +31,9 @@ class ChainTest extends \PHPUnit_Framework_TestCase protected function setUp() { $this->storage = new Chain(); - $this->innerStorage = $this->getMock('Zend\Authentication\Storage\Session', ['isEmpty', 'read', 'write', 'clear']); - $this->eventManager = $this->getMock('Zend\EventManager\EventManager', ['trigger']); - $this->event = $this->getMock('UnicaenAuth\Authentication\Storage\ChainEvent', ['getContents']); + $this->innerStorage = $this->createMock('Zend\Authentication\Storage\Session'/*, ['isEmpty', 'read', 'write', 'clear']*/); + $this->eventManager = $this->createMock('Zend\EventManager\EventManager'/*, ['trigger']*/); + $this->event = $this->createMock('UnicaenAuth\Authentication\Storage\ChainEvent'/*, ['getContents']*/); $this->storage->setStorage($this->innerStorage) ->setEventManager($this->eventManager) @@ -83,12 +91,18 @@ class ChainTest extends \PHPUnit_Framework_TestCase public function testCanWrite() { - $this->innerStorage->expects($this->once()) - ->method('write') - ->with(12); - $this->eventManager->expects($this->once()) - ->method('trigger') - ->with('write', $this->logicalAnd( + $this->innerStorage + ->expects($this->once()) + ->method('write') + ->with(12); + $this->event + ->expects($this->once()) + ->method('setParams') + ->with(['contents' => 12]); + $this->eventManager + ->expects($this->once()) + ->method('trigger') + ->with('write', $this->logicalAnd( $this->isInstanceOf('UnicaenAuth\Authentication\Storage\ChainEvent'), $this->attributeEqualTo('params', ['contents' => 12]))); $this->storage->write(12); diff --git a/tests/UnicaenAuthTest/Authentication/Storage/DbTest.php b/tests/UnicaenAuthTest/Authentication/Storage/DbTest.php index 34503c407643b7bb75c376d81ea002fe80a23996..607550481f4c5b0ff7a072c7b4133e0f75beb132 100644 --- a/tests/UnicaenAuthTest/Authentication/Storage/DbTest.php +++ b/tests/UnicaenAuthTest/Authentication/Storage/DbTest.php @@ -27,9 +27,9 @@ class DbTest extends PHPUnit_Framework_TestCase */ protected function setUp() { - $this->serviceManager = $this->getMock('Zend\ServiceManager\ServiceManager', ['get']); - $this->innerStorage = $this->getMock('Zend\Authentication\Storage\Session', ['write', 'clear', 'read']); - $this->mapper = $this->getMock('ZfcUser\Mapper\User', ['findById', 'findByUsername']); + $this->serviceManager = $this->createMock('Zend\ServiceManager\ServiceManager'/*, ['get']*/); + $this->innerStorage = $this->createMock('Zend\Authentication\Storage\Session'/*, ['write', 'clear', 'read']*/); + $this->mapper = $this->createMock('ZfcUser\Mapper\User'/*, ['findById', 'findByUsername']*/); $this->event = new ChainEvent(); $this->storage = new Db(); diff --git a/tests/UnicaenAuthTest/Authentication/Storage/LdapTest.php b/tests/UnicaenAuthTest/Authentication/Storage/LdapTest.php index 00865465e21ed0d8f4746d6f22a14e88a648a926..e8ce9a2df9a168877b056f1a976bdb11d8b19318 100644 --- a/tests/UnicaenAuthTest/Authentication/Storage/LdapTest.php +++ b/tests/UnicaenAuthTest/Authentication/Storage/LdapTest.php @@ -15,11 +15,23 @@ use UnicaenAuth\Authentication\Storage\ChainEvent; */ class LdapTest extends PHPUnit_Framework_TestCase { + /** + * @var Ldap + */ protected $storage; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject|\UnicaenApp\Mapper\Ldap\People + */ protected $mapper; + protected $serviceManager; protected $options; protected $event; + + /** + * @var \PHPUnit_Framework_MockObject_MockObject|\Zend\Authentication\Storage\Session + */ protected $innerStorage; /** @@ -29,9 +41,9 @@ class LdapTest extends PHPUnit_Framework_TestCase protected function setUp() { $this->options = new \UnicaenAuth\Options\ModuleOptions(); - $this->serviceManager = $this->getMock('Zend\ServiceManager\ServiceManager', ['get']); - $this->innerStorage = $this->getMock('Zend\Authentication\Storage\Session', ['write', 'clear', 'read']); - $this->mapper = $this->getMock('UnicaenApp\Mapper\Ldap\People', ['findOneByUsername']); + $this->serviceManager = $this->createMock('Zend\ServiceManager\ServiceManager'/*, ['get']*/); + $this->innerStorage = $this->createMock('Zend\Authentication\Storage\Session'/*, ['write', 'clear', 'read']*/); + $this->mapper = $this->createMock('UnicaenApp\Mapper\Ldap\People'/*, ['findOneByUsername']*/); $this->event = new ChainEvent(); $this->storage = new Ldap(); @@ -111,25 +123,14 @@ class LdapTest extends PHPUnit_Framework_TestCase $this->assertEquals(['ldap' => null], $this->event->getContents()); } - public function getException() - { - return [ - [new \Zend\Ldap\Exception\LdapException()], - [new \UnicaenApp\Exception()], - ]; - } - - /** - * @dataProvider getException - */ - public function testReadingReturnsNullIfFindByUsernameThrowsException($exception) + public function testReadingReturnsNullIfFindByUsernameThrowsException() { $this->innerStorage->expects($this->once()) ->method('read') ->will($this->returnValue(12)); $this->mapper->expects($this->once()) ->method('findOneByUsername') - ->will($this->throwException($exception)); + ->will($this->throwException(new \UnicaenApp\Exception\RuntimeException())); $this->storage->read($this->event); $this->assertEquals(['ldap' => null], $this->event->getContents()); diff --git a/tests/UnicaenAuthTest/Entity/Db/RoleTest.php b/tests/UnicaenAuthTest/Entity/Db/RoleTest.php index 73a6bc4c54a51ee1bf6b57036e665e097ac629cc..243a1ffc151b36d91d09cf127ec696281de93984 100644 --- a/tests/UnicaenAuthTest/Entity/Db/RoleTest.php +++ b/tests/UnicaenAuthTest/Entity/Db/RoleTest.php @@ -3,14 +3,14 @@ namespace UnicaenAuthTest\Entity\Db; use UnicaenAuth\Entity\Db\Role; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; /** * Description of UserTest * * @author Bertrand GAUTHIER */ -class RoleTest extends PHPUnit_Framework_TestCase +class RoleTest extends TestCase { protected $role; diff --git a/tests/UnicaenAuthTest/Entity/Db/UserTest.php b/tests/UnicaenAuthTest/Entity/Db/UserTest.php index 0276f65032f85815787de1b01a396d018372366c..a9efead6de0e3fcdc4f4b78a94f1c8d8f166ce8e 100644 --- a/tests/UnicaenAuthTest/Entity/Db/UserTest.php +++ b/tests/UnicaenAuthTest/Entity/Db/UserTest.php @@ -2,6 +2,7 @@ namespace UnicaenAuthTest\Entity\Db; +use Doctrine\Common\Collections\Collection; use UnicaenAuth\Entity\Db\User; use PHPUnit_Framework_TestCase; @@ -12,6 +13,9 @@ use PHPUnit_Framework_TestCase; */ class UserTest extends PHPUnit_Framework_TestCase { + /** + * @var User + */ protected $user; protected function setUp() @@ -27,7 +31,8 @@ class UserTest extends PHPUnit_Framework_TestCase public function testConstructorInitializeRoles() { - $this->assertEquals([], $this->user->getRoles()); + $this->assertInstanceOf(Collection::class, $this->user->getRoles()); + $this->assertEmpty($this->user->getRoles()); } public function testCanSetId() @@ -74,7 +79,7 @@ class UserTest extends PHPUnit_Framework_TestCase ]); $this->user->addRole($roles[0]); $this->user->addRole($roles[1]); - $this->assertEquals($roles->getValues(), $this->user->getRoles()); + $this->assertEquals($roles->toArray(), $this->user->getRoles()->toArray()); } public function testCanGetObjectToString() diff --git a/tests/UnicaenAuthTest/Options/ModuleOptionsFactoryTest.php b/tests/UnicaenAuthTest/Options/ModuleOptionsFactoryTest.php index fbf6f9876e6d181600558bdcc0e7fc366336c054..a7fb433787f5d64781474848131bcdf2b146fb40 100644 --- a/tests/UnicaenAuthTest/Options/ModuleOptionsFactoryTest.php +++ b/tests/UnicaenAuthTest/Options/ModuleOptionsFactoryTest.php @@ -27,7 +27,7 @@ class ModuleOptionsFactoryTest extends BaseServiceFactoryTest ->with('Configuration') ->will($this->returnValue($config)); - $service = $this->factory->createService($this->serviceManager); + $service = $this->factory->__invoke($this->serviceManager, ''); $this->assertInstanceOf($this->serviceClass, $service); } @@ -50,7 +50,7 @@ class ModuleOptionsFactoryTest extends BaseServiceFactoryTest ->with('Configuration') ->will($this->returnValue($config)); - $service = $this->factory->createService($this->serviceManager); /* @var $service \UnicaenAuth\Options\ModuleOptions */ + $service = $this->factory->__invoke($this->serviceManager, ''); /* @var $service \UnicaenAuth\Options\ModuleOptions */ $this->assertInstanceOf($this->serviceClass, $service); $this->assertEquals('other', $service->getLoginRedirectRoute()); diff --git a/tests/UnicaenAuthTest/Provider/Identity/BaseServiceFactoryTest.php b/tests/UnicaenAuthTest/Provider/Identity/BaseServiceFactoryTest.php index aa109b5dafa860a8ac718997522218394236bd81..481988bbccee6f7390766bf8a24b9939ec08563a 100644 --- a/tests/UnicaenAuthTest/Provider/Identity/BaseServiceFactoryTest.php +++ b/tests/UnicaenAuthTest/Provider/Identity/BaseServiceFactoryTest.php @@ -2,14 +2,14 @@ namespace UnicaenAuthTest\Provider\Identity; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; /** * Description of BaseServiceFactoryTest * * @author Bertrand GAUTHIER */ -abstract class BaseServiceFactoryTest extends PHPUnit_Framework_TestCase +abstract class BaseServiceFactoryTest extends TestCase { protected $serviceLocator; protected $userService; @@ -24,9 +24,9 @@ abstract class BaseServiceFactoryTest extends PHPUnit_Framework_TestCase protected function setUp() { $this->factory = new $this->factoryClass(); - $this->serviceLocator = $this->getMock('Zend\ServiceManager\ServiceLocatorInterface', []); - $this->authService = $this->getMock('Zend\Authentication\AuthenticationService', []); - $this->userService = $this->getMock('ZfcUser\Service\User', ['getAuthService']); + $this->serviceLocator = $this->createMock('Zend\ServiceManager\ServiceLocatorInterface'/*, []*/); + $this->authService = $this->createMock('Zend\Authentication\AuthenticationService'/*, []*/); + $this->userService = $this->createMock('ZfcUser\Service\User'/*, ['getAuthService']*/); } public function testCanCreateService() @@ -43,7 +43,7 @@ abstract class BaseServiceFactoryTest extends PHPUnit_Framework_TestCase ->method('get') ->will($this->returnValueMap($map)); - $service = $this->factory->createService($this->serviceLocator); + $service = $this->factory->__invoke($this->serviceLocator, ''); $this->assertInstanceOf($this->serviceClass, $service); $this->assertEquals('default', $service->getDefaultRole()); diff --git a/tests/UnicaenAuthTest/Provider/Identity/BaseTest.php b/tests/UnicaenAuthTest/Provider/Identity/BaseTest.php index dbaa293368fd691f6d472515d0515e905e039856..35c723c121372be5a7ecbf13c1986d535c7ef207 100644 --- a/tests/UnicaenAuthTest/Provider/Identity/BaseTest.php +++ b/tests/UnicaenAuthTest/Provider/Identity/BaseTest.php @@ -1,7 +1,7 @@ */ -abstract class BaseTest extends PHPUnit_Framework_TestCase +abstract class BaseTest extends TestCase { protected $providerClass; protected $provider; @@ -22,8 +22,8 @@ abstract class BaseTest extends PHPUnit_Framework_TestCase */ protected function setUp() { - $this->serviceManager = $this->getMock('Zend\ServiceManager\ServiceManager', ['get']); - $this->authService = $this->getMock('Zend\Authentication\AuthenticationService', ['getIdentity']); + $this->serviceManager = $this->createMock('Zend\ServiceManager\ServiceManager'/*, ['get']*/); + $this->authService = $this->createMock('Zend\Authentication\AuthenticationService'/*, ['getIdentity']*/); $this->provider = new $this->providerClass($this->authService); } @@ -65,7 +65,7 @@ abstract class BaseTest extends PHPUnit_Framework_TestCase { $event = new \UnicaenAuth\Provider\Identity\ChainEvent(); $roles = [new NamedRole('role id')]; - $provider = $this->getMock($this->providerClass, ['getIdentityRoles'], [$this->authService]); + $provider = $this->createMock($this->providerClass/*, ['getIdentityRoles'], [$this->authService]*/); $provider->expects($this->once()) ->method('getIdentityRoles') diff --git a/tests/UnicaenAuthTest/Provider/Identity/ChainServiceFactoryTest.php b/tests/UnicaenAuthTest/Provider/Identity/ChainServiceFactoryTest.php index f953e62ab52019048a1fa30566ccb17cb57ad222..bc6c7bd64fbb72c574b2c669a7ade9fb5ea85a2c 100644 --- a/tests/UnicaenAuthTest/Provider/Identity/ChainServiceFactoryTest.php +++ b/tests/UnicaenAuthTest/Provider/Identity/ChainServiceFactoryTest.php @@ -2,7 +2,7 @@ namespace UnicaenAuthTest\Provider\Identity; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; use UnicaenAuth\Provider\Identity\ChainServiceFactory; /** @@ -10,7 +10,7 @@ use UnicaenAuth\Provider\Identity\ChainServiceFactory; * * @author Bertrand GAUTHIER */ -class ChainServiceFactoryTest extends PHPUnit_Framework_TestCase +class ChainServiceFactoryTest extends TestCase { protected $serviceLocator; protected $eventManager; @@ -24,9 +24,9 @@ class ChainServiceFactoryTest extends PHPUnit_Framework_TestCase protected function setUp() { $this->factory = new ChainServiceFactory(); - $this->serviceLocator = $this->getMock('Zend\ServiceManager\ServiceLocatorInterface', []); - $this->ldapProvider = $this->getMock('UnicaenAuth\Provider\Identity\Ldap', $this->events, [], '', false); - $this->dbProvider = $this->getMock('UnicaenAuth\Provider\Identity\Db', $this->events, [], '', false); + $this->serviceLocator = $this->createMock('Zend\ServiceManager\ServiceLocatorInterface'/*, []*/); + $this->ldapProvider = $this->createMock('UnicaenAuth\Provider\Identity\Ldap'/**//*, $this->events, [], '', false*/); + $this->dbProvider = $this->createMock('UnicaenAuth\Provider\Identity\Db'/*, $this->events, [], '', false*/); } public function testCanCreateService() @@ -35,7 +35,7 @@ class ChainServiceFactoryTest extends PHPUnit_Framework_TestCase ->method('get') ->will($this->onConsecutiveCalls($this->dbProvider, $this->ldapProvider)); - $service = $this->factory->createService($this->serviceLocator); + $service = $this->factory->__invoke($this->serviceLocator, ''); $this->assertInstanceOf('UnicaenAuth\Provider\Identity\Chain', $service); diff --git a/tests/UnicaenAuthTest/Provider/Identity/ChainTest.php b/tests/UnicaenAuthTest/Provider/Identity/ChainTest.php index b9692d1ffe8f41f4b1e719a75936c534ddc939b6..7f22930dd0e778cf096be506a8b14a3edc47dc23 100644 --- a/tests/UnicaenAuthTest/Provider/Identity/ChainTest.php +++ b/tests/UnicaenAuthTest/Provider/Identity/ChainTest.php @@ -1,7 +1,7 @@ */ -class ChainTest extends PHPUnit_Framework_TestCase +class ChainTest extends TestCase { protected $provider; protected $authorize; @@ -26,13 +26,13 @@ class ChainTest extends PHPUnit_Framework_TestCase */ protected function setUp() { - $this->authorize = $this->getMock('BjyAuthorize\Service\Authorize', ['getAcl'], [], '', false); - $this->serviceManager = $this->getMock('Zend\ServiceManager\ServiceManager', ['get']); - $this->authService = $this->getMock('Zend\Authentication\AuthenticationService', ['getIdentity']); + $this->authorize = $this->createMock('BjyAuthorize\Service\Authorize'/*, ['getAcl'], [], '', false*/); + $this->serviceManager = $this->createMock('Zend\ServiceManager\ServiceManager'/*, ['get']*/); + $this->authService = $this->createMock('Zend\Authentication\AuthenticationService'/*, ['getIdentity']*/); $this->provider = new Chain($this->authService); - $this->eventManager = $this->getMock('Zend\EventManager\EventManager', ['trigger']); - $this->event = $this->getMock('UnicaenAuth\Provider\Identity\ChainEvent', ['getRoles']); - $this->acl = $this->getMock('Zend\Permissions\Acl\Acl', ['hasRole', 'getRole']); + $this->eventManager = $this->createMock('Zend\EventManager\EventManager'/*, ['trigger']*/); + $this->event = $this->createMock('UnicaenAuth\Provider\Identity\ChainEvent'/*, ['getRoles']*/); + $this->acl = $this->createMock('Zend\Permissions\Acl\Acl'/*, ['hasRole', 'getRole']*/); $this->authorize->expects($this->any()) ->method('getAcl') diff --git a/tests/UnicaenAuthTest/Provider/Identity/DbTest.php b/tests/UnicaenAuthTest/Provider/Identity/DbTest.php index 2390ed464ab131b174e81564484c1ef2dd4dfd67..b4a28d20f1daa1a5fee5fe00262bb6fcf090c07c 100644 --- a/tests/UnicaenAuthTest/Provider/Identity/DbTest.php +++ b/tests/UnicaenAuthTest/Provider/Identity/DbTest.php @@ -15,7 +15,7 @@ class DbTest extends BaseTest $role = new \UnicaenAuth\Entity\Db\Role(); $role->setRoleId('role id'); - $identity1 = $this->getMock('UnicaenAuth\Entity\Db\User', ['getRoles', 'getUsername']); + $identity1 = $this->createMock('UnicaenAuth\Entity\Db\User'/*, ['getRoles', 'getUsername']*/); $identity1->expects($this->once()) ->method('getRoles') ->will($this->returnValue([$role])); @@ -28,7 +28,7 @@ class DbTest extends BaseTest $role2 = new \UnicaenAuth\Entity\Db\Role(); $role2->setRoleId('role id 2'); - $identity2 = $this->getMock('UnicaenAuth\Entity\Db\User', ['getRoles', 'getUsername']); + $identity2 = $this->createMock('UnicaenAuth\Entity\Db\User'/*, ['getRoles', 'getUsername']*/); $identity2->expects($this->once()) ->method('getRoles') ->will($this->returnValue([$role])); diff --git a/tests/UnicaenAuthTest/Provider/Identity/LdapTest.php b/tests/UnicaenAuthTest/Provider/Identity/LdapTest.php index 13983418ae26c4da0c4b52167cd8fd0fdf7481af..c7da678f1cc218283c876d2bc09c2cbc41566cd7 100644 --- a/tests/UnicaenAuthTest/Provider/Identity/LdapTest.php +++ b/tests/UnicaenAuthTest/Provider/Identity/LdapTest.php @@ -19,12 +19,12 @@ class LdapTest extends BaseTest { parent::setUp(); - $this->mapper = $this->getMock('UnicaenApp\Mapper\Ldap\Db', ['findOneByDn']); + $this->mapper = $this->createMock('UnicaenApp\Mapper\Ldap\Db'/*, ['findOneByDn']*/); } public function provideAuthServiceIdentity() { - $identity1 = $this->getMock('UnicaenAuth\Entity\Ldap\People', ['getRoles', 'getUsername']); + $identity1 = $this->createMock('UnicaenAuth\Entity\Ldap\People'/*, ['getRoles', 'getUsername']*/); $identity1->expects($this->once()) ->method('getRoles') ->will($this->returnValue(['cn=admin_reseau,ou=groups,dc=unicaen,dc=fr'])); @@ -34,7 +34,7 @@ class LdapTest extends BaseTest $expectedRoles1 = ['cn=admin_reseau,ou=groups,dc=unicaen,dc=fr', 'username1']; - $identity2 = $this->getMock('UnicaenAuth\Entity\Ldap\People', ['getRoles', 'getUsername']); + $identity2 = $this->createMock('UnicaenAuth\Entity\Ldap\People'/*, ['getRoles', 'getUsername']*/); $identity2->expects($this->once()) ->method('getRoles') ->will($this->returnValue(['cn=admin_reseau,ou=groups,dc=unicaen,dc=fr'])); diff --git a/tests/UnicaenAuthTest/Provider/Role/BaseServiceFactoryTest.php b/tests/UnicaenAuthTest/Provider/Role/BaseServiceFactoryTest.php index bed4a74b14e24c19c9db8d9cd8266ac19e47fc5f..f60d335680ae75b1b2d82b8cd9837189d6056a26 100644 --- a/tests/UnicaenAuthTest/Provider/Role/BaseServiceFactoryTest.php +++ b/tests/UnicaenAuthTest/Provider/Role/BaseServiceFactoryTest.php @@ -2,14 +2,14 @@ namespace UnicaenAuthTest\Provider\Role; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; /** * Description of ConfigServiceFactoryTest * * @author Bertrand GAUTHIER */ -abstract class BaseServiceFactoryTest extends PHPUnit_Framework_TestCase +abstract class BaseServiceFactoryTest extends TestCase { protected $serviceLocator; protected $factoryClass; @@ -23,6 +23,6 @@ abstract class BaseServiceFactoryTest extends PHPUnit_Framework_TestCase protected function setUp() { $this->factory = new $this->factoryClass(); - $this->serviceLocator = $this->getMock('Zend\ServiceManager\ServiceLocatorInterface', []); + $this->serviceLocator = $this->createMock('Zend\ServiceManager\ServiceLocatorInterface'/*, []*/); } } \ No newline at end of file diff --git a/tests/UnicaenAuthTest/Provider/Role/ConfigServiceFactoryTest.php b/tests/UnicaenAuthTest/Provider/Role/ConfigServiceFactoryTest.php index 50738bb54d280c6306ea3b359426208f6dfc061b..8972ae1355a1a54da5acf11ece6c82f305edbeb3 100644 --- a/tests/UnicaenAuthTest/Provider/Role/ConfigServiceFactoryTest.php +++ b/tests/UnicaenAuthTest/Provider/Role/ConfigServiceFactoryTest.php @@ -21,7 +21,7 @@ class ConfigServiceFactoryTest extends BaseServiceFactoryTest { parent::setUp(); - $this->mapper = $this->getMock('UnicaenApp\Mapper\Ldap\Group', []); + $this->mapper = $this->createMock('UnicaenApp\Mapper\Ldap\Group'/*, []*/); } public function provideInvalidOptions() @@ -45,7 +45,7 @@ class ConfigServiceFactoryTest extends BaseServiceFactoryTest ->with('BjyAuthorize\Config') ->will($this->returnValue($options)); - $this->factory->createService($this->serviceLocator); + $this->factory->__invoke($this->serviceLocator, ''); } public function testCanCreateService() @@ -63,7 +63,7 @@ class ConfigServiceFactoryTest extends BaseServiceFactoryTest ->method('get') ->will($this->returnValueMap($map)); - $service = $this->factory->createService($this->serviceLocator); + $service = $this->factory->__invoke($this->serviceLocator, ''); $this->assertInstanceOf('UnicaenAuth\Provider\Role\Config', $service); } diff --git a/tests/UnicaenAuthTest/Provider/Role/ConfigTest.php b/tests/UnicaenAuthTest/Provider/Role/ConfigTest.php index ff49094dd47cabaf769bddc17bd6889013b2d65f..1da8ac9c767de1da331658e05003e006c4e958bf 100644 --- a/tests/UnicaenAuthTest/Provider/Role/ConfigTest.php +++ b/tests/UnicaenAuthTest/Provider/Role/ConfigTest.php @@ -1,7 +1,7 @@ */ -class ConfigTest extends PHPUnit_Framework_TestCase +class ConfigTest extends TestCase { protected $mapper; protected function setUp() { - $this->mapper = $this->getMock('UnicaenApp\Mapper\Ldap\Group', ['findOneByDn']); + $this->mapper = $this->createMock('UnicaenApp\Mapper\Ldap\Group'/*, ['findOneByDn']*/); } public function testLoadingRolesWithoutLdapDnCreatesNamedRoles() diff --git a/tests/UnicaenAuthTest/Provider/Role/DbServiceFactoryTest.php b/tests/UnicaenAuthTest/Provider/Role/DbServiceFactoryTest.php index 051a31944e6e51ff891558e40b6efa4042367adc..a9c99b88bc273ffc40a3c228bd78139da7d6434d 100644 --- a/tests/UnicaenAuthTest/Provider/Role/DbServiceFactoryTest.php +++ b/tests/UnicaenAuthTest/Provider/Role/DbServiceFactoryTest.php @@ -35,7 +35,7 @@ class DbServiceFactoryTest extends BaseServiceFactoryTest ->with('BjyAuthorize\Config') ->will($this->returnValue($options)); - $this->factory->createService($this->serviceLocator); + $this->factory->__invoke($this->serviceLocator, ''); } public function testCanCreateService() @@ -52,7 +52,7 @@ class DbServiceFactoryTest extends BaseServiceFactoryTest $objectManager = $this->getMockForAbstractClass('Doctrine\Common\Persistence\ObjectManager', ['getRepository']); $objectManager->expects($this->once()) ->method('getRepository') - ->will($this->returnValue($this->getMock('Doctrine\Common\Persistence\ObjectRepository', []))); + ->will($this->returnValue($this->createMock('Doctrine\Common\Persistence\ObjectRepository'/*, []*/))); $map = [ ['BjyAuthorize\Config', $options], @@ -62,7 +62,7 @@ class DbServiceFactoryTest extends BaseServiceFactoryTest ->method('get') ->will($this->returnValueMap($map)); - $service = $this->factory->createService($this->serviceLocator); + $service = $this->factory->__invoke($this->serviceLocator, ''); $this->assertInstanceOf('UnicaenAuth\Provider\Role\DbRole', $service); } diff --git a/tests/UnicaenAuthTest/Provider/Role/DbTest.php b/tests/UnicaenAuthTest/Provider/Role/DbTest.php index ab05e30b74333ebd631286b87619d59e377ef69e..2be58dda2227a9c4c779cf10449ca63fa7ae10ca 100644 --- a/tests/UnicaenAuthTest/Provider/Role/DbTest.php +++ b/tests/UnicaenAuthTest/Provider/Role/DbTest.php @@ -2,7 +2,7 @@ namespace UnicaenAuthTest\Provider\Role; -use PHPUnit_Framework_TestCase; +use PHPUnit\Framework\TestCase; use UnicaenAuth\Provider\Role\DbRole; use BjyAuthorize\Provider\Role\ObjectRepositoryProvider; @@ -11,14 +11,14 @@ use BjyAuthorize\Provider\Role\ObjectRepositoryProvider; * * @author Bertrand GAUTHIER */ -class DbTest extends PHPUnit_Framework_TestCase +class DbTest extends TestCase { protected $provider; protected $objectRepository; protected function setUp() { - $this->objectRepository = $this->getMock('Doctrine\Common\Persistence\ObjectRepository', []); + $this->objectRepository = $this->createMock('Doctrine\Common\Persistence\ObjectRepository'/*, []*/); $this->provider = new DbRole($this->objectRepository); } diff --git a/tests/UnicaenAuthTest/Service/UserTest.php b/tests/UnicaenAuthTest/Service/UserTest.php index 021355952fe4884dc4f27ee07bc5d2a27931924f..2b4a57f00782e3407f8b18d4052bd7e1eee73bb7 100644 --- a/tests/UnicaenAuthTest/Service/UserTest.php +++ b/tests/UnicaenAuthTest/Service/UserTest.php @@ -14,7 +14,11 @@ use ZfcUser\Authentication\Adapter\AdapterChainEvent; */ class UserTest extends PHPUnit_Framework_TestCase { + /** + * @var User + */ protected $service; + protected $authModuleOptions; protected $zfcMapper; protected $mapper; @@ -27,11 +31,11 @@ class UserTest extends PHPUnit_Framework_TestCase // 'usurpation_allowed_usernames' => array('usurpateur'), ]); - $this->zfcMapper = $zfcMapper = $this->getMock('ZfcUser\Mapper\User', ['findByUsername', 'insert', 'update']); + $this->zfcMapper = $zfcMapper = $this->createMock('ZfcUser\Mapper\User'/*, ['findByUsername', 'insert', 'update']*/); - $this->mapper = $mapper = $this->getMock('UnicaenApp\Mapper\Ldap\People', ['findOneByUsername']); + $this->mapper = $mapper = $this->createMock('UnicaenApp\Mapper\Ldap\People'/*, ['findOneByUsername']*/); - $serviceManager = $this->getMock('Zend\ServiceManager\ServiceManager', ['get']); + $serviceManager = $this->createMock('Zend\ServiceManager\ServiceManager'/*, ['get']*/); $serviceManager->expects($this->any()) ->method('get') ->will($this->returnCallback(function($serviceName) use ($authModuleOptions, $zfcMapper, $mapper) { @@ -98,7 +102,7 @@ class UserTest extends PHPUnit_Framework_TestCase } /** - * @expectedException \UnicaenApp\Exception + * @expectedException \UnicaenApp\Exception\RuntimeException */ public function testEntryPointThrowsExceptionIfUnexpectedNonEmptyIdentitySpecifiedInEvent() { @@ -116,7 +120,7 @@ class UserTest extends PHPUnit_Framework_TestCase } /** - * @expectedException \UnicaenApp\Exception + * @expectedException \UnicaenApp\Exception\RuntimeException */ public function testEntryPointThrowsExceptionIfPDOExceptionThrownDuringFetch() { @@ -170,7 +174,7 @@ class UserTest extends PHPUnit_Framework_TestCase } /** - * @expectedException \UnicaenApp\Exception + * @expectedException \UnicaenApp\Exception\RuntimeException */ public function testEntryPointThrowsExceptionIfPDOExceptionThrownDuringSave() { diff --git a/tests/UnicaenAuthTest/View/Helper/AppConnectionTest.php b/tests/UnicaenAuthTest/View/Helper/AppConnectionTest.php index f8d45dd4c5813222580e4458e96fc2e9f58853d0..49c574b584b0bae7073bdc430f12b7715facf38a 100644 --- a/tests/UnicaenAuthTest/View/Helper/AppConnectionTest.php +++ b/tests/UnicaenAuthTest/View/Helper/AppConnectionTest.php @@ -25,7 +25,7 @@ class AppConnectionTest extends AbstractTest { parent::setUp(); - $this->renderer = $this->getMock('Zend\View\Renderer\PhpRenderer', ['plugin']); + $this->renderer = $this->createMock('Zend\View\Renderer\PhpRenderer'/*, ['plugin']*/); $this->helper->setView($this->renderer); } @@ -33,7 +33,7 @@ class AppConnectionTest extends AbstractTest protected function getUserCurrentHelper() { if (null === $this->userCurrentHelper) { - $this->userCurrentHelper = $this->getMock('UnicaenAuth\View\Helper\UserCurrent', ['__toString']); + $this->userCurrentHelper = $this->createMock('UnicaenAuth\View\Helper\UserCurrent'/*, ['__toString']*/); $this->userCurrentHelper ->expects($this->any()) ->method('__toString') @@ -45,7 +45,7 @@ class AppConnectionTest extends AbstractTest protected function getUserConnectionHelper() { if (null === $this->userConnectionHelper) { - $this->userConnectionHelper = $this->getMock('UnicaenAuth\View\Helper\UserConnection', ['__toString']); + $this->userConnectionHelper = $this->createMock('UnicaenAuth\View\Helper\UserConnection'/*, ['__toString']*/); $this->userConnectionHelper ->expects($this->any()) ->method('__toString') diff --git a/tests/UnicaenAuthTest/View/Helper/UserAbstractTest.php b/tests/UnicaenAuthTest/View/Helper/UserAbstractTest.php index ca22d78a70d9cf0d727f3f4f4de8c3564e8bc1d6..80f089e223016cecc4db2d6a5664c09611e808d0 100644 --- a/tests/UnicaenAuthTest/View/Helper/UserAbstractTest.php +++ b/tests/UnicaenAuthTest/View/Helper/UserAbstractTest.php @@ -21,7 +21,7 @@ class UserAbstractTest extends PHPUnit_Framework_TestCase */ protected function setUp() { - $this->authService = $this->getMock('Zend\Authentication\AuthenticationService', ['hasIdentity', 'getIdentity']); + $this->authService = $this->createMock('Zend\Authentication\AuthenticationService'/*, ['hasIdentity', 'getIdentity']*/); $this->helper = $this->getMockForAbstractClass('UnicaenAuth\View\Helper\UserAbstract'); $this->helper->setAuthService($this->authService); diff --git a/tests/UnicaenAuthTest/View/Helper/UserConnectionFactoryTest.php b/tests/UnicaenAuthTest/View/Helper/UserConnectionFactoryTest.php index e63059c6222ebf6a1307b2e41b5b6eb830ba7b57..6bc518a1e0a22fe9783a05fda17b703043b63df5 100644 --- a/tests/UnicaenAuthTest/View/Helper/UserConnectionFactoryTest.php +++ b/tests/UnicaenAuthTest/View/Helper/UserConnectionFactoryTest.php @@ -16,14 +16,14 @@ class UserConnectionFactoryTest extends BaseServiceFactoryTest public function testCanCreateService() { - $authService = $this->getMock('Zend\Authentication\AuthenticationService', []); + $authService = $this->createMock('Zend\Authentication\AuthenticationService'); $this->serviceManager->expects($this->once()) ->method('get') ->with('zfcuser_auth_service') ->will($this->returnValue($authService)); - $service = $this->factory->createService($this->pluginManager); + $service = $this->factory->__invoke($this->serviceManager, ''); $this->assertInstanceOf($this->serviceClass, $service); } diff --git a/tests/UnicaenAuthTest/View/Helper/UserConnectionTest.php b/tests/UnicaenAuthTest/View/Helper/UserConnectionTest.php index 777a87f750c8811cf40a88e6e9d50fdfb7491452..9683566755a1e3e090206299e15c647a0751c812 100644 --- a/tests/UnicaenAuthTest/View/Helper/UserConnectionTest.php +++ b/tests/UnicaenAuthTest/View/Helper/UserConnectionTest.php @@ -26,15 +26,15 @@ class UserConnectionTest extends AbstractTest { parent::setUp(); - $this->urlHelper = $this->getMock('Zend\View\Helper\Url', ['__invoke']); + $this->urlHelper = $this->createMock('Zend\View\Helper\Url'/*, ['__invoke']*/); - $this->renderer = $this->getMock('Zend\View\Renderer\PhpRenderer', ['plugin']); + $this->renderer = $this->createMock('Zend\View\Renderer\PhpRenderer'/*, ['plugin']*/); $this->renderer->expects($this->any()) ->method('plugin') ->with('url') ->will($this->returnValue($this->urlHelper)); - $this->authService = $this->getMock('Zend\Authentication\AuthenticationService', ['hasIdentity', 'getIdentity']); + $this->authService = $this->createMock('Zend\Authentication\AuthenticationService'/*, ['hasIdentity', 'getIdentity']*/); $this->helper->setAuthService($this->authService) ->setView($this->renderer) diff --git a/tests/UnicaenAuthTest/View/Helper/UserCurrentFactoryTest.php b/tests/UnicaenAuthTest/View/Helper/UserCurrentFactoryTest.php index 6ec97961302d36ce4554357050940d47576d346c..c7690ffbef66a6f8304cfa3e245b88d1c4ee0b10 100644 --- a/tests/UnicaenAuthTest/View/Helper/UserCurrentFactoryTest.php +++ b/tests/UnicaenAuthTest/View/Helper/UserCurrentFactoryTest.php @@ -16,14 +16,14 @@ class UserCurrentFactoryTest extends BaseServiceFactoryTest public function testCanCreateService() { - $authService = $this->getMock('Zend\Authentication\AuthenticationService', []); + $authService = $this->createMock('Zend\Authentication\AuthenticationService'); $this->serviceManager->expects($this->once()) ->method('get') ->with('zfcuser_auth_service') ->will($this->returnValue($authService)); - $service = $this->factory->createService($this->pluginManager); + $service = $this->factory->__invoke($this->serviceManager, ''); $this->assertInstanceOf($this->serviceClass, $service); } diff --git a/tests/UnicaenAuthTest/View/Helper/UserCurrentTest.php b/tests/UnicaenAuthTest/View/Helper/UserCurrentTest.php index 6815ce774393c1ec2d80029bb7d04f93f2a660e6..7b01e0b1aece455ad61d64685a9d69146d299a1d 100644 --- a/tests/UnicaenAuthTest/View/Helper/UserCurrentTest.php +++ b/tests/UnicaenAuthTest/View/Helper/UserCurrentTest.php @@ -1,9 +1,18 @@ userStatusHelper = $userStatusHelper = $this->getMock('UnicaenAuth\View\Helper\UserStatus', ['__invoke']); - $this->userProfileHelper = $userProfileHelper = $this->getMock('UnicaenAuth\View\Helper\UserProfile', ['__toString']); - $this->userInfoHelper = $userInfoHelper = $this->getMock('UnicaenAuth\View\Helper\UserInfo', ['__invoke']); - $this->inlineScriptHelper = $inlineScriptHelper = $this->getMock('Zend\View\Helper\InlineScript', ['__invoke']); + $this->userStatusHelper = $userStatusHelper = $this->createMock(UserStatus::class/*, ['__invoke']*/); + $this->userProfileHelper = $userProfileHelper = $this->createMock(UserProfile::class/*, ['__toString']*/); + $this->userInfoHelper = $userInfoHelper = $this->createMock(UserInfo::class/*, ['__invoke']*/); + $this->inlineScriptHelper = $inlineScriptHelper = $this->createMock(InlineScript::class/*, ['__invoke']*/); $this->userStatusHelper ->expects($this->any()) @@ -50,7 +69,7 @@ class UserCurrentTest extends AbstractTest ->method('__invoke') ->will($this->returnValue('InlineScript Helper Markup')); - $this->renderer = $this->getMock('Zend\View\Renderer\PhpRenderer', ['plugin']); + $this->renderer = $this->createMock(PhpRenderer::class/*, ['plugin']*/); $this->renderer->expects($this->any()) ->method('plugin') ->will($this->returnCallback(function ($helper) use ($userStatusHelper, $userProfileHelper, $userInfoHelper, $inlineScriptHelper) { @@ -69,17 +88,18 @@ class UserCurrentTest extends AbstractTest return null; })); - $this->authService = $this->getMock('Zend\Authentication\AuthenticationService', ['hasIdentity', 'getIdentity']); + $this->userContext = $this->createMock(UserContext::class/*, ['hasIdentity', 'getIdentity']*/); - $this->helper->setAuthService($this->authService) - ->setView($this->renderer) - ->setTranslator(new Translator()); + $this->helper + ->setUserContext($this->userContext) + ->setTranslator(new Translator()) + ->setView($this->renderer); } - public function testCanConstructWithAuthService() + public function testCanConstructWithUserContextService() { - $helper = new UserCurrent($this->authService); - $this->assertSame($this->authService, $helper->getAuthService()); + $helper = new UserCurrent($this->userContext); + $this->assertSame($this->userContext, $helper->getUserContext()); } public function testEntryPointReturnsSelfInstance() @@ -95,34 +115,35 @@ class UserCurrentTest extends AbstractTest public function testCanRenderIfNoIdentityAvailable() { - $this->authService->expects($this->any()) - ->method('hasIdentity') - ->will($this->returnValue(false)); + $this->userContext->expects($this->any()) + ->method('getIdentity') + ->willReturn(false); - $markup = (string) $this->helper; + $markup = $this->helper->__toString(); $this->assertEquals($this->getExpected('user_current/logged-out.phtml'), $markup); // traduction $this->helper->setTranslator($this->_getTranslator()); - $markup = (string) $this->helper; + $markup = $this->helper->__toString(); $this->assertEquals($this->getExpected('user_current/logged-out-translated.phtml'), $markup); } public function testCanRenderLogoutLinkIfIdentityAvailable() { - $this->authService->expects($this->any()) - ->method('hasIdentity') - ->will($this->returnValue(true)); - $this->authService->expects($this->any()) + $this->userContext + ->expects($this->once()) + ->method('getSelectedIdentityRole') + ->willReturn($role = new Role('role id')); + $this->userContext->expects($this->once()) ->method('getIdentity') - ->will($this->returnValue($identity = 'Auth Service Identity')); + ->willReturn($identity = 'Auth Service Identity'); - $markup = (string) $this->helper; + $markup = $this->helper->__toString(); $this->assertEquals($this->getExpected('user_current/logged-in.phtml'), $markup); // traduction $this->helper->setTranslator($this->_getTranslator()); - $markup = (string) $this->helper; + $markup = $this->helper->__toString(); $this->assertEquals($this->getExpected('user_current/logged-in-translated.phtml'), $markup); } diff --git a/tests/UnicaenAuthTest/View/Helper/UserInfoFactoryTest.php b/tests/UnicaenAuthTest/View/Helper/UserInfoFactoryTest.php index 9e8edfe85a46bcbb3ec40d4e50e8a61a02270cd6..887ae0b9ad3648d5a9b86d57fe1ac16923302715 100644 --- a/tests/UnicaenAuthTest/View/Helper/UserInfoFactoryTest.php +++ b/tests/UnicaenAuthTest/View/Helper/UserInfoFactoryTest.php @@ -16,8 +16,8 @@ class UserInfoFactoryTest extends BaseServiceFactoryTest public function testCanCreateService() { - $authService = $this->getMock('Zend\Authentication\AuthenticationService', []); - $mapper = $this->getMock('UnicaenApp\Mapper\Ldap\Structure', []); + $authService = $this->createMock('Zend\Authentication\AuthenticationService'); + $mapper = $this->createMock('UnicaenApp\Mapper\Ldap\Structure'); $this->serviceManager->expects($this->exactly(2)) ->method('get') @@ -25,7 +25,7 @@ class UserInfoFactoryTest extends BaseServiceFactoryTest ['zfcuser_auth_service', $authService], ['ldap_structure_mapper', $mapper]])); - $service = $this->factory->createService($this->pluginManager); + $service = $this->factory->__invoke($this->serviceManager, ''); $this->assertInstanceOf($this->serviceClass, $service); $this->assertSame($mapper, $service->getMapperStructure()); diff --git a/tests/UnicaenAuthTest/View/Helper/UserInfoTest.php b/tests/UnicaenAuthTest/View/Helper/UserInfoTest.php index f91f80d6d63624fcc927c0c02c9d64adad2510f8..5ddc757fcc3d2982a711215fec59ec9fbf9c3209 100644 --- a/tests/UnicaenAuthTest/View/Helper/UserInfoTest.php +++ b/tests/UnicaenAuthTest/View/Helper/UserInfoTest.php @@ -26,10 +26,10 @@ class UserInfoTest extends AbstractTest { parent::setUp(); - $this->authService = $this->getMock('Zend\Authentication\AuthenticationService', ['hasIdentity', 'getIdentity']); + $this->authService = $this->createMock('Zend\Authentication\AuthenticationService'/*, ['hasIdentity', 'getIdentity']*/); - $this->mapperStructure = $this->getMock('UnicaenApp\Mapper\Ldap\Structure', - ['findOneByDn', 'findOnePathByCodeStructure', 'findAllPathByCodeStructure', 'findOneByCodeEntite']); + $this->mapperStructure = $this->createMock('UnicaenApp\Mapper\Ldap\Structure'/*, + ['findOneByDn', 'findOnePathByCodeStructure', 'findAllPathByCodeStructure', 'findOneByCodeEntite']*/); $this->helper->setMapperStructure($this->mapperStructure) ->setAuthService($this->authService) @@ -158,12 +158,12 @@ class UserInfoTest extends AbstractTest $expectedScript, $expectedScriptTranslated) { - $identity = $this->getMock( - 'UnicaenApp\Entity\Ldap\People', + $identity = $this->createMock( + 'UnicaenApp\Entity\Ldap\People'/*, ['getAffectationsAdmin', 'getAffectationsRecherche', 'getFonctionsStructurelles'], [], '', - false); + false*/); $identity->expects($this->any()) ->method('getAffectationsAdmin') ->will($this->returnValue($affectationsAdmin)); diff --git a/tests/UnicaenAuthTest/View/Helper/UserProfileFactoryTest.php b/tests/UnicaenAuthTest/View/Helper/UserProfileFactoryTest.php index 307be516b275899b533ad6c62df9bdb1a7d1ab61..049ba254da7e19d01ff913dfd0d5f0d1c4a81f9b 100644 --- a/tests/UnicaenAuthTest/View/Helper/UserProfileFactoryTest.php +++ b/tests/UnicaenAuthTest/View/Helper/UserProfileFactoryTest.php @@ -16,8 +16,8 @@ class UserProfileFactoryTest extends BaseServiceFactoryTest public function testCanCreateService() { - $authService = $this->getMock('Zend\Authentication\AuthenticationService', []); - $authorize = $this->getMock('BjyAuthorize\Service\Authorize', ['getIdentityProvider'], [], '', false); + $authService = $this->createMock('Zend\Authentication\AuthenticationService'); + $authorize = $this->createMock('BjyAuthorize\Service\Authorize'/*, ['getIdentityProvider'], [], '', false*/); $identityProvider = $this->getMockForAbstractClass('BjyAuthorize\Provider\Identity\ProviderInterface', []); $authorize->expects($this->once()) @@ -30,9 +30,8 @@ class UserProfileFactoryTest extends BaseServiceFactoryTest ['zfcuser_auth_service', $authService], ['BjyAuthorize\Service\Authorize', $authorize]])); - $service = $this->factory->createService($this->pluginManager); + $service = $this->factory->__invoke($this->serviceManager, ''); $this->assertInstanceOf($this->serviceClass, $service); - $this->assertSame($identityProvider, $service->getIdentityProvider()); } } \ No newline at end of file diff --git a/tests/UnicaenAuthTest/View/Helper/UserStatusFactoryTest.php b/tests/UnicaenAuthTest/View/Helper/UserStatusFactoryTest.php index 49615373eb8df5680898a514c17c3176ec062418..a1b53d6f1843a97fbe47ac2c424906d9f9d9aa8b 100644 --- a/tests/UnicaenAuthTest/View/Helper/UserStatusFactoryTest.php +++ b/tests/UnicaenAuthTest/View/Helper/UserStatusFactoryTest.php @@ -16,14 +16,14 @@ class UserStatusFactoryTest extends BaseServiceFactoryTest public function testCanCreateService() { - $authService = $this->getMock('Zend\Authentication\AuthenticationService', []); + $authService = $this->createMock('Zend\Authentication\AuthenticationService'); $this->serviceManager->expects($this->once()) ->method('get') ->with('zfcuser_auth_service') ->will($this->returnValue($authService)); - $service = $this->factory->createService($this->pluginManager); + $service = $this->factory->__invoke($this->serviceManager, ''); $this->assertInstanceOf($this->serviceClass, $service); } diff --git a/tests/UnicaenAuthTest/View/Helper/UserStatusTest.php b/tests/UnicaenAuthTest/View/Helper/UserStatusTest.php index 3cec962f1dea7d96a0c4f8651e24937422456363..3e2757e96be8a8bed8069a3bcf07de7ee0958b08 100644 --- a/tests/UnicaenAuthTest/View/Helper/UserStatusTest.php +++ b/tests/UnicaenAuthTest/View/Helper/UserStatusTest.php @@ -1,9 +1,9 @@ authService = $this->getMock('Zend\Authentication\AuthenticationService', ['hasIdentity', 'getIdentity']); + $this->userContext = $this->createMock(UserContext::class/*, ['hasIdentity', 'getIdentity']*/); - $userConnectionHelper = $this->getMock('UnicaenAuth\View\Helper\UserConnection', ['__toString']); + $userConnectionHelper = $this->createMock('UnicaenAuth\View\Helper\UserConnection'/*, ['__toString']*/); $userConnectionHelper->expects($this->any()) ->method('__toString') ->will($this->returnValue('UserConnection Helper Markup')); @@ -35,7 +40,7 @@ class UserStatusTest extends AbstractTest $this->helper->getView()->getHelperPluginManager()->setService('userConnection', $userConnectionHelper); $this->helper->setDisplayConnectionLink() - ->setAuthService($this->authService); + ->setUserContext($this->userContext); } public function testEntryPointReturnsSelfInstance() @@ -51,7 +56,7 @@ class UserStatusTest extends AbstractTest public function testRenderingWithoutConnectionLinkReturnsNoneIfNoIdentityAvailable() { - $this->authService->expects($this->any()) + $this->userContext->expects($this->any()) ->method('hasIdentity') ->will($this->returnValue(false)); @@ -106,10 +111,10 @@ class UserStatusTest extends AbstractTest $identity, $expectedScriptWithoutLink) { - $this->authService->expects($this->any()) + $this->userContext->expects($this->any()) ->method('hasIdentity') ->will($this->returnValue(true)); - $this->authService->expects($this->any()) + $this->userContext->expects($this->any()) ->method('getIdentity') ->will($this->returnValue($identity)); @@ -121,7 +126,7 @@ class UserStatusTest extends AbstractTest public function testRenderingWithConnectionLinkReturnsNoneIfNoIdentityAvailable() { - $this->authService->expects($this->any()) + $this->userContext->expects($this->any()) ->method('hasIdentity') ->will($this->returnValue(false)); @@ -147,10 +152,10 @@ class UserStatusTest extends AbstractTest $expectedScriptWithoutLink, $expectedScriptWithLink) { - $this->authService->expects($this->any()) + $this->userContext->expects($this->any()) ->method('hasIdentity') ->will($this->returnValue(true)); - $this->authService->expects($this->any()) + $this->userContext->expects($this->any()) ->method('getIdentity') ->will($this->returnValue($identity)); diff --git a/tests/phpunit.xml b/tests/phpunit.xml new file mode 100644 index 0000000000000000000000000000000000000000..5532f7db65bd66b955cdb1641b399fc7e92f1071 --- /dev/null +++ b/tests/phpunit.xml @@ -0,0 +1,45 @@ + + + + + + ./UnicaenAuthTest + + + ./functional + + + + + + + + + + + + ../src + + + + + + + + + + + + + + + +