commit ed29fb7f977a22e111cb6521ffbd872998a05b9a Author: Dávid Danyi Date: Fri Feb 17 15:48:05 2017 +0100 * initial commit diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..4da80f1 --- /dev/null +++ b/.gitignore @@ -0,0 +1,7 @@ +.idea +composer.phar + +clover.xml +coveralls-upload.json +phpunit.xml +vendor/ diff --git a/README.md b/README.md new file mode 100644 index 0000000..62365b9 --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +Daily ci backend \ No newline at end of file diff --git a/cli-config.php b/cli-config.php new file mode 100644 index 0000000..92a0dbd --- /dev/null +++ b/cli-config.php @@ -0,0 +1,9 @@ + new \Doctrine\ORM\Tools\Console\Helper\EntityManagerHelper( + $container->get('doctrine.entity_manager.orm_default') + ), +]); diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..79b0461 --- /dev/null +++ b/composer.json @@ -0,0 +1,47 @@ +{ + "name": "zendframework/zend-expressive-skeleton", + "description": "Zend expressive skeleton. Begin developing PSR-7 middleware applications in seconds!", + "type": "project", + "homepage": "https://github.com/zendframework/zend-expressive-skeleton", + "license": "BSD-3-Clause", + "require": { + "php": "^5.6 || ^7.0", + "roave/security-advisories": "dev-master", + "zendframework/zend-expressive": "^1.0", + "zendframework/zend-expressive-helpers": "^2.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0", + "zendframework/zend-expressive-fastroute": "^1.0", + "zendframework/zend-servicemanager": "^2.7.3 || ^3.0", + "zendframework/zend-json": "3.0.0", + "zendframework/zend-hydrator": "2.2.1", + "zendframework/zend-filter": "2.7.1", + "dasprid/container-interop-doctrine": "0.2.3" + }, + "require-dev": { + "phpunit/phpunit": "^4.8", + "squizlabs/php_codesniffer": "^2.3", + "filp/whoops": "^1.1 || ^2.0" + }, + "autoload": { + "psr-4": { + "App\\": "src/App/" + } + }, + "autoload-dev": { + "psr-4": { + "AppTest\\": "test/AppTest/" + } + }, + "scripts": { + "check": [ + "@cs-check", + "@test" + ], + "cs-check": "phpcs", + "cs-fix": "phpcbf", + "serve": "php -S 0.0.0.0:8080 -t public public/index.php", + "test": "phpunit --colors=always", + "test-coverage": "phpunit --colors=always --coverage-clover clover.xml", + "upload-coverage": "coveralls -v" + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..1d7b9d7 --- /dev/null +++ b/composer.lock @@ -0,0 +1,3144 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "content-hash": "205a6bbd450a35d78247da6c3cb34d01", + "packages": [ + { + "name": "container-interop/container-interop", + "version": "1.1.0", + "source": { + "type": "git", + "url": "https://github.com/container-interop/container-interop.git", + "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/container-interop/container-interop/zipball/fc08354828f8fd3245f77a66b9e23a6bca48297e", + "reference": "fc08354828f8fd3245f77a66b9e23a6bca48297e", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-4": { + "Interop\\Container\\": "src/Interop/Container/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Promoting the interoperability of container objects (DIC, SL, etc.)", + "time": "2014-12-30T15:22:37+00:00" + }, + { + "name": "dasprid/container-interop-doctrine", + "version": "0.2.3", + "source": { + "type": "git", + "url": "https://github.com/DASPRiD/container-interop-doctrine.git", + "reference": "1804073003928aaba19071c4c0479238aff1f099" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/DASPRiD/container-interop-doctrine/zipball/1804073003928aaba19071c4c0479238aff1f099", + "reference": "1804073003928aaba19071c4c0479238aff1f099", + "shasum": "" + }, + "require": { + "container-interop/container-interop": "^1.1", + "doctrine/common": "^2.6", + "doctrine/dbal": "^2.5", + "doctrine/orm": "^2.5", + "php": "^5.5|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8", + "squizlabs/php_codesniffer": "^2.5" + }, + "type": "library", + "autoload": { + "psr-4": { + "ContainerInteropDoctrine\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-2-Clause" + ], + "description": "Doctrine factories for container-interop", + "homepage": "https://github.com/DASPRiD/container-interop-doctrine", + "time": "2017-02-10T10:38:05+00:00" + }, + { + "name": "doctrine/annotations", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/annotations.git", + "reference": "bd4461328621bde0ae6b1b2675fbc6aca4ceb558" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/bd4461328621bde0ae6b1b2675fbc6aca4ceb558", + "reference": "bd4461328621bde0ae6b1b2675fbc6aca4ceb558", + "shasum": "" + }, + "require": { + "doctrine/lexer": "1.*", + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "doctrine/cache": "1.*", + "phpunit/phpunit": "^5.6.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Annotations\\": "lib/Doctrine/Common/Annotations" + } + }, + "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" + } + ], + "description": "Docblock Annotations Parser", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "docblock", + "parser" + ], + "time": "2016-12-30T15:59:45+00:00" + }, + { + "name": "doctrine/cache", + "version": "v1.6.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/cache.git", + "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/cache/zipball/b6f544a20f4807e81f7044d31e679ccbb1866dc3", + "reference": "b6f544a20f4807e81f7044d31e679ccbb1866dc3", + "shasum": "" + }, + "require": { + "php": "~5.5|~7.0" + }, + "conflict": { + "doctrine/common": ">2.2,<2.4" + }, + "require-dev": { + "phpunit/phpunit": "~4.8|~5.0", + "predis/predis": "~1.0", + "satooshi/php-coveralls": "~0.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Common\\Cache\\": "lib/Doctrine/Common/Cache" + } + }, + "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" + } + ], + "description": "Caching library offering an object-oriented API for many cache backends", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "cache", + "caching" + ], + "time": "2016-10-29T11:16:17+00:00" + }, + { + "name": "doctrine/collections", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/collections.git", + "reference": "1a4fb7e902202c33cce8c55989b945612943c2ba" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/collections/zipball/1a4fb7e902202c33cce8c55989b945612943c2ba", + "reference": "1a4fb7e902202c33cce8c55989b945612943c2ba", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "doctrine/coding-standard": "~0.1@dev", + "phpunit/phpunit": "^5.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Collections\\": "lib/" + } + }, + "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" + } + ], + "description": "Collections Abstraction library", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "array", + "collections", + "iterator" + ], + "time": "2017-01-03T10:49:41+00:00" + }, + { + "name": "doctrine/common", + "version": "v2.7.2", + "source": { + "type": "git", + "url": "https://github.com/doctrine/common.git", + "reference": "930297026c8009a567ac051fd545bf6124150347" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/common/zipball/930297026c8009a567ac051fd545bf6124150347", + "reference": "930297026c8009a567ac051fd545bf6124150347", + "shasum": "" + }, + "require": { + "doctrine/annotations": "1.*", + "doctrine/cache": "1.*", + "doctrine/collections": "1.*", + "doctrine/inflector": "1.*", + "doctrine/lexer": "1.*", + "php": "~5.6|~7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.7.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" + } + ], + "description": "Common Library for Doctrine projects", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "annotations", + "collections", + "eventmanager", + "persistence", + "spl" + ], + "time": "2017-01-13T14:02:13+00:00" + }, + { + "name": "doctrine/dbal", + "version": "v2.5.12", + "source": { + "type": "git", + "url": "https://github.com/doctrine/dbal.git", + "reference": "7b9e911f9d8b30d43b96853dab26898c710d8f44" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/7b9e911f9d8b30d43b96853dab26898c710d8f44", + "reference": "7b9e911f9d8b30d43b96853dab26898c710d8f44", + "shasum": "" + }, + "require": { + "doctrine/common": ">=2.4,<2.8-dev", + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*", + "symfony/console": "2.*||^3.0" + }, + "suggest": { + "symfony/console": "For helpful console commands such as SQL execution and import of files." + }, + "bin": [ + "bin/doctrine-dbal" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\DBAL\\": "lib/" + } + }, + "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" + } + ], + "description": "Database Abstraction Layer", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "persistence", + "queryobject" + ], + "time": "2017-02-08T12:53:47+00:00" + }, + { + "name": "doctrine/inflector", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/doctrine/inflector.git", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/90b2128806bfde671b6952ab8bea493942c1fdae", + "reference": "90b2128806bfde671b6952ab8bea493942c1fdae", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Inflector\\": "lib/" + } + }, + "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" + } + ], + "description": "Common String Manipulations with regard to casing and singular/plural rules.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "inflection", + "pluralize", + "singularize", + "string" + ], + "time": "2015-11-06T14:35:42+00:00" + }, + { + "name": "doctrine/instantiator", + "version": "1.0.5", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", + "shasum": "" + }, + "require": { + "php": ">=5.3,<8.0-DEV" + }, + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "~2.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://github.com/doctrine/instantiator", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2015-06-14T21:17:01+00:00" + }, + { + "name": "doctrine/lexer", + "version": "v1.0.1", + "source": { + "type": "git", + "url": "https://github.com/doctrine/lexer.git", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/lexer/zipball/83893c552fd2045dd78aef794c31e694c37c0b8c", + "reference": "83893c552fd2045dd78aef794c31e694c37c0b8c", + "shasum": "" + }, + "require": { + "php": ">=5.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Common\\Lexer\\": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com" + }, + { + "name": "Johannes Schmitt", + "email": "schmittjoh@gmail.com" + } + ], + "description": "Base library for a lexer that can be used in Top-Down, Recursive Descent Parsers.", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "lexer", + "parser" + ], + "time": "2014-09-09T13:34:57+00:00" + }, + { + "name": "doctrine/orm", + "version": "v2.5.6", + "source": { + "type": "git", + "url": "https://github.com/doctrine/doctrine2.git", + "reference": "e6c434196c8ef058239aaa0724b4aadb0107940b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/e6c434196c8ef058239aaa0724b4aadb0107940b", + "reference": "e6c434196c8ef058239aaa0724b4aadb0107940b", + "shasum": "" + }, + "require": { + "doctrine/cache": "~1.4", + "doctrine/collections": "~1.2", + "doctrine/common": ">=2.5-dev,<2.8-dev", + "doctrine/dbal": ">=2.5-dev,<2.6-dev", + "doctrine/instantiator": "~1.0.1", + "ext-pdo": "*", + "php": ">=5.4", + "symfony/console": "~2.5|~3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "symfony/yaml": "~2.3|~3.0" + }, + "suggest": { + "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" + }, + "bin": [ + "bin/doctrine", + "bin/doctrine.php" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\ORM\\": "lib/" + } + }, + "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" + } + ], + "description": "Object-Relational-Mapper for PHP", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "orm" + ], + "time": "2016-12-18T15:42:34+00:00" + }, + { + "name": "fig/http-message-util", + "version": "1.1.2", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message-util.git", + "reference": "20b2c280cb6914b7b83089720df44e490f4b42f0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message-util/zipball/20b2c280cb6914b7b83089720df44e490f4b42f0", + "reference": "20b2c280cb6914b7b83089720df44e490f4b42f0", + "shasum": "" + }, + "require": { + "php": "^5.3 || ^7.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Fig\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Utility classes and constants for use with PSR-7 (psr/http-message)", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2017-02-09T16:10:21+00:00" + }, + { + "name": "http-interop/http-middleware", + "version": "0.2.0", + "source": { + "type": "git", + "url": "https://github.com/http-interop/http-middleware.git", + "reference": "ff545c87e97bf4d88f0cb7eb3e89f99aaa53d7a9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/http-interop/http-middleware/zipball/ff545c87e97bf4d88f0cb7eb3e89f99aaa53d7a9", + "reference": "ff545c87e97bf4d88f0cb7eb3e89f99aaa53d7a9", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Interop\\Http\\Middleware\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP middleware", + "keywords": [ + "factory", + "http", + "middleware", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "time": "2016-09-25T13:30:27+00:00" + }, + { + "name": "nikic/fast-route", + "version": "v1.2.0", + "source": { + "type": "git", + "url": "https://github.com/nikic/FastRoute.git", + "reference": "b5f95749071c82a8e0f58586987627054400cdf6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/nikic/FastRoute/zipball/b5f95749071c82a8e0f58586987627054400cdf6", + "reference": "b5f95749071c82a8e0f58586987627054400cdf6", + "shasum": "" + }, + "require": { + "php": ">=5.4.0" + }, + "type": "library", + "autoload": { + "psr-4": { + "FastRoute\\": "src/" + }, + "files": [ + "src/functions.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Nikita Popov", + "email": "nikic@php.net" + } + ], + "description": "Fast request router for PHP", + "keywords": [ + "router", + "routing" + ], + "time": "2017-01-19T11:35:12+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", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2016-10-10T12:19:37+00:00" + }, + { + "name": "roave/security-advisories", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/Roave/SecurityAdvisories.git", + "reference": "411283676149d8b8e8ee53ec621d84099e548090" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Roave/SecurityAdvisories/zipball/411283676149d8b8e8ee53ec621d84099e548090", + "reference": "411283676149d8b8e8ee53ec621d84099e548090", + "shasum": "" + }, + "conflict": { + "adodb/adodb-php": "<5.20.6", + "amphp/artax": ">=2,<2.0.4|>0.7.1,<1.0.4", + "aws/aws-sdk-php": ">=3,<3.2.1", + "bugsnag/bugsnag-laravel": ">=2,<2.0.2", + "cakephp/cakephp": ">=3,<3.0.15|>=2,<2.4.99|>=2.5,<2.5.99|>=2.6,<2.6.12|>=1.3,<1.3.18|>=2.7,<2.7.6|>=3.1,<3.1.4", + "cart2quote/module-quotation": ">=4.1.6,<=4.4.5|>=5,<5.4.4", + "cartalyst/sentry": "<2.1", + "codeigniter/framework": "<=3.0.6", + "composer/composer": "<=1.0.0-alpha11", + "contao-components/mediaelement": ">=2.14.2,<2.21.1", + "contao/core": ">=2.11,<3.5.15", + "doctrine/annotations": ">=1,<1.2.7", + "doctrine/cache": ">=1,<1.3.2|>=1.4,<1.4.2", + "doctrine/common": ">=2,<2.4.3|>=2.5,<2.5.1", + "doctrine/dbal": ">=2,<2.0.8|>=2.1,<2.1.2", + "doctrine/doctrine-bundle": "<1.5.2", + "doctrine/doctrine-module": "<=0.7.1", + "doctrine/mongodb-odm": ">=1,<1.0.2", + "doctrine/mongodb-odm-bundle": ">=2,<3.0.1", + "doctrine/orm": ">=2,<2.4.8|>=2.5,<2.5.1", + "dompdf/dompdf": ">=0.6,<0.6.2", + "drupal/core": ">=8,<8.2.3", + "drupal/drupal": ">=8,<8.2.3", + "firebase/php-jwt": "<2", + "friendsofsymfony/rest-bundle": ">=1.2,<1.2.2", + "friendsofsymfony/user-bundle": ">=1.2,<1.3.5", + "gregwar/rst": "<1.0.3", + "guzzlehttp/guzzle": ">=6,<6.2.1|>=4.0.0-rc2,<4.2.4|>=5,<5.3.1", + "illuminate/auth": ">=4,<4.0.99|>=4.1,<4.1.26", + "illuminate/database": ">=4,<4.0.99|>=4.1,<4.1.29", + "joomla/session": "<1.3.1", + "laravel/framework": ">=4,<4.0.99|>=4.1,<4.1.29", + "laravel/socialite": ">=1,<1.0.99|>=2,<2.0.10", + "magento/magento1ce": ">=1.5.0.1,<1.9.3.2", + "magento/magento1ee": ">=1.9,<1.14.3.2", + "magento/magento2ce": ">=2,<2.2", + "monolog/monolog": ">=1.8,<1.12", + "namshi/jose": "<2.2", + "oro/crm": ">=1.7,<1.7.4", + "oro/platform": ">=1.7,<1.7.4", + "phpmailer/phpmailer": ">=5,<5.2.22", + "pusher/pusher-php-server": "<2.2.1", + "sabre/dav": ">=1.6,<1.6.99|>=1.7,<1.7.11|>=1.8,<1.8.9", + "shopware/shopware": "<4.4|>=5,<5.2.16", + "silverstripe/cms": ">=3.1,<3.1.11|>=3,<=3.0.11", + "silverstripe/forum": "<=0.6.1|>=0.7,<=0.7.3", + "silverstripe/framework": ">=3,<3.3", + "silverstripe/userforms": "<3", + "simplesamlphp/saml2": "<1.8.1|>=1.9,<1.9.1|>=1.10,<1.10.3|>=2,<2.3.3", + "simplesamlphp/simplesamlphp": "<1.14.11", + "simplesamlphp/simplesamlphp-module-infocard": "<1.0.1", + "socalnick/scn-social-auth": "<1.15.2", + "swiftmailer/swiftmailer": ">=4,<5.4.5", + "symfony/dependency-injection": ">=2,<2.0.17", + "symfony/form": ">=2.3,<2.3.35|>=2.4,<2.6.12|>=2.7,<2.7.7", + "symfony/framework-bundle": ">=2,<2.3.18|>=2.4,<2.4.8|>=2.5,<2.5.2", + "symfony/http-foundation": ">=2,<2.3.27|>=2.4,<2.5.11|>=2.6,<2.6.6", + "symfony/http-kernel": ">=2,<2.3.29|>=2.4,<2.5.12|>=2.6,<2.6.8", + "symfony/routing": ">=2,<2.0.19", + "symfony/security": ">=2.3,<2.3.37|>=2.4,<2.6.13|>=2.7,<2.7.9|>=2,<2.0.25|>=2.1,<2.1.13|>=2.2,<2.2.9", + "symfony/security-core": ">=2.8,<2.8.6|>=3,<3.0.6|>=2.4,<2.6.13|>=2.7,<2.7.9", + "symfony/security-http": ">=2.4,<2.7.13|>=2.3,<2.3.41|>=2.8,<2.8.6|>=3,<3.0.6", + "symfony/serializer": ">=2,<2.0.11", + "symfony/symfony": ">=2,<2.3.41|>=2.4,<2.7.13|>=2.8,<2.8.6|>=3,<3.0.6", + "symfony/translation": ">=2,<2.0.17", + "symfony/validator": ">=2,<2.0.24|>=2.1,<2.1.12|>=2.2,<2.2.5|>=2.3,<2.3.3", + "symfony/web-profiler-bundle": ">=2,<2.3.19|>=2.4,<2.4.9|>=2.5,<2.5.4", + "symfony/yaml": ">=2,<2.0.22|>=2.1,<2.1.7", + "thelia/backoffice-default-template": ">=2.1,<2.1.2", + "thelia/thelia": ">=2.1.0-beta1,<2.1.3|>=2.1,<2.1.2", + "twig/twig": "<1.20", + "typo3/cms": ">=6.2,<6.2.30|>=8,<8.4.1|>=7,<7.6.13", + "typo3/flow": ">=2.3,<2.3.16|>=3,<3.0.10|>=3.1,<3.1.7|>=3.2,<3.2.7|>=3.3,<3.3.5|>=1,<1.0.4|>=1.1,<1.1.1|>=2,<2.0.1", + "typo3/neos": ">=1.1,<1.1.3|>=1.2,<1.2.13|>=2,<2.0.4", + "willdurand/js-translation-bundle": "<2.1.1", + "yiisoft/yii": ">=1.1.14,<1.1.15", + "yiisoft/yii2": "<2.0.5", + "yiisoft/yii2-bootstrap": "<2.0.4", + "yiisoft/yii2-dev": "<2.0.4", + "yiisoft/yii2-gii": "<2.0.4", + "yiisoft/yii2-jui": "<2.0.4", + "zendframework/zend-cache": ">=2.4,<2.4.8|>=2.5,<2.5.3", + "zendframework/zend-captcha": ">=2,<2.4.9|>=2.5,<2.5.2", + "zendframework/zend-crypt": ">=2,<2.4.9|>=2.5,<2.5.2", + "zendframework/zend-db": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.10|>=2.3,<2.3.5", + "zendframework/zend-diactoros": ">=1,<1.0.4", + "zendframework/zend-form": ">=2,<2.2.7|>=2.3,<2.3.1", + "zendframework/zend-http": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.3,<2.3.8|>=2.4,<2.4.1", + "zendframework/zend-json": ">=2.1,<2.1.6|>=2.2,<2.2.6", + "zendframework/zend-ldap": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.8|>=2.3,<2.3.3", + "zendframework/zend-mail": ">=2,<2.4.11|>=2.5,<2.7.2", + "zendframework/zend-navigation": ">=2,<2.2.7|>=2.3,<2.3.1", + "zendframework/zend-session": ">=2,<2.0.99|>=2.1,<2.1.99|>=2.2,<2.2.9|>=2.3,<2.3.4", + "zendframework/zend-validator": ">=2.3,<2.3.6", + "zendframework/zend-view": ">=2,<2.2.7|>=2.3,<2.3.1", + "zendframework/zend-xmlrpc": ">=2.1,<2.1.6|>=2.2,<2.2.6", + "zendframework/zendframework": ">=2,<2.4.11|>=2.5,<2.5.1", + "zendframework/zendframework1": "<1.12.20", + "zendframework/zendopenid": ">=2,<2.0.2", + "zendframework/zendxml": ">=1,<1.0.1", + "zf-commons/zfc-user": "<1.2.2", + "zfcampus/zf-apigility-doctrine": ">=1,<1.0.3", + "zfr/zfr-oauth2-server-module": "<0.1.2" + }, + "type": "metapackage", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "role": "maintainer" + } + ], + "description": "Prevents installation of composer packages with known security vulnerabilities: no API, simply require it", + "time": "2017-02-08T16:26:47+00:00" + }, + { + "name": "symfony/console", + "version": "v3.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/console.git", + "reference": "7a8405a9fc175f87fed8a3c40856b0d866d61936" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/console/zipball/7a8405a9fc175f87fed8a3c40856b0d866d61936", + "reference": "7a8405a9fc175f87fed8a3c40856b0d866d61936", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/debug": "~2.8|~3.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/event-dispatcher": "~2.8|~3.0", + "symfony/filesystem": "~2.8|~3.0", + "symfony/process": "~2.8|~3.0" + }, + "suggest": { + "psr/log": "For using the console logger", + "symfony/event-dispatcher": "", + "symfony/filesystem": "", + "symfony/process": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Console\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Console Component", + "homepage": "https://symfony.com", + "time": "2017-02-06T12:04:21+00:00" + }, + { + "name": "symfony/debug", + "version": "v3.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/debug.git", + "reference": "b4d9818f127c60ce21ed62c395da7df868dc8477" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/debug/zipball/b4d9818f127c60ce21ed62c395da7df868dc8477", + "reference": "b4d9818f127c60ce21ed62c395da7df868dc8477", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "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" + }, + "require-dev": { + "symfony/class-loader": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Debug\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Debug Component", + "homepage": "https://symfony.com", + "time": "2017-01-28T02:37:08+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2016-11-14T01:06:16+00:00" + }, + { + "name": "zendframework/zend-diactoros", + "version": "1.3.10", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-diactoros.git", + "reference": "83e8d98b9915de76c659ce27d683c02a0f99fa90" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-diactoros/zipball/83e8d98b9915de76c659ce27d683c02a0f99fa90", + "reference": "83e8d98b9915de76c659ce27d683c02a0f99fa90", + "shasum": "" + }, + "require": { + "php": "^5.4 || ^7.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "~1.0.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6 || ^5.5", + "zendframework/zend-coding-standard": "~1.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev", + "dev-develop": "1.4-dev" + } + }, + "autoload": { + "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": "2017-01-23T04:53:24+00:00" + }, + { + "name": "zendframework/zend-escaper", + "version": "2.5.2", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-escaper.git", + "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-escaper/zipball/2dcd14b61a72d8b8e27d579c6344e12c26141d4e", + "reference": "2dcd14b61a72d8b8e27d579c6344e12c26141d4e", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev", + "dev-develop": "2.6-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Escaper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-escaper", + "keywords": [ + "escaper", + "zf2" + ], + "time": "2016-06-30T19:48:38+00:00" + }, + { + "name": "zendframework/zend-expressive", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-expressive.git", + "reference": "b315ea9269ea3ee2e5fd3adb712fc278a2904eb1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-expressive/zipball/b315ea9269ea3ee2e5fd3adb712fc278a2904eb1", + "reference": "b315ea9269ea3ee2e5fd3adb712fc278a2904eb1", + "shasum": "" + }, + "require": { + "container-interop/container-interop": "^1.1", + "php": "^5.6 || ^7.0", + "psr/http-message": "^1.0", + "zendframework/zend-diactoros": "^1.1", + "zendframework/zend-expressive-router": "^1.1", + "zendframework/zend-expressive-template": "^1.0.1", + "zendframework/zend-stratigility": ">=1.1.0 < 1.3.0 || >=1.3.1 <2.0.0" + }, + "require-dev": { + "filp/whoops": "^1.1 || ^2.0", + "malukenho/docheader": "^0.1.5", + "phpunit/phpunit": "^4.7", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-expressive-aurarouter": "^1.0", + "zendframework/zend-expressive-fastroute": "^1.0", + "zendframework/zend-expressive-zendrouter": "^1.0", + "zendframework/zend-servicemanager": "^2.6" + }, + "suggest": { + "aura/di": "3.0.*@beta to make use of Aura.Di dependency injection container", + "filp/whoops": "^2.0 to use the Whoops error handler", + "xtreamwayz/pimple-container-interop": "^1.0 to use Pimple for dependency injection", + "zendframework/zend-expressive-helpers": "^1.0 for its UrlHelper, ServerUrlHelper, and BodyParseMiddleware", + "zendframework/zend-servicemanager": "^2.5 to use zend-servicemanager for dependency injection" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev", + "dev-develop": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Expressive\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "PSR-7 Middleware Microframework based on Stratigility", + "keywords": [ + "http", + "middleware", + "psr", + "psr-7" + ], + "time": "2017-01-09T16:08:29+00:00" + }, + { + "name": "zendframework/zend-expressive-fastroute", + "version": "1.3.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-expressive-fastroute.git", + "reference": "825c93ff72c0f629bb427a6da8ebfe9d4735c296" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-expressive-fastroute/zipball/825c93ff72c0f629bb427a6da8ebfe9d4735c296", + "reference": "825c93ff72c0f629bb427a6da8ebfe9d4735c296", + "shasum": "" + }, + "require": { + "fig/http-message-util": "^1.1", + "nikic/fast-route": "^1.0.0", + "php": "^5.6 || ^7.0", + "psr/http-message": "^1.0", + "zendframework/zend-expressive-router": "^1.3.2" + }, + "require-dev": { + "malukenho/docheader": "^0.1.5", + "phpunit/phpunit": "^4.7 || ^5.6", + "zendframework/zend-coding-standard": "~1.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev", + "dev-develop": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Expressive\\Router\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "FastRoute integration for Expressive", + "keywords": [ + "FastRoute", + "expressive", + "http", + "middleware", + "psr", + "psr-7" + ], + "time": "2016-12-14T19:47:05+00:00" + }, + { + "name": "zendframework/zend-expressive-helpers", + "version": "2.2.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-expressive-helpers.git", + "reference": "b60666a7a2928bda15fceadcf15116c7df03b5e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-expressive-helpers/zipball/b60666a7a2928bda15fceadcf15116c7df03b5e3", + "reference": "b60666a7a2928bda15fceadcf15116c7df03b5e3", + "shasum": "" + }, + "require": { + "container-interop/container-interop": "^1.1", + "php": "^5.5 || ^7.0", + "psr/http-message": "^1.0", + "zendframework/zend-expressive-router": "^1.1" + }, + "require-dev": { + "mockery/mockery": "^0.9.5", + "phpunit/phpunit": "^4.7", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-diactoros": "^1.2" + }, + "suggest": { + "aura/di": "3.0.*@beta to make use of Aura.Di dependency injection container", + "mouf/pimple-interop": "^1.0 to use Pimple for dependency injection", + "zendframework/zend-servicemanager": "^2.5 to use zend-servicemanager for dependency injection" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev", + "dev-develop": "2.3-dev", + "dev-dev-3.0.0": "3.0.0-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Expressive\\Helper\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Helper/Utility classes for Expressive", + "keywords": [ + "expressive", + "http", + "middleware", + "psr", + "psr-7" + ], + "time": "2016-12-24T05:02:55+00:00" + }, + { + "name": "zendframework/zend-expressive-router", + "version": "1.3.2", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-expressive-router.git", + "reference": "50c9e4dff0cf65d9937c56b597c530e1bf5f8ef0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-expressive-router/zipball/50c9e4dff0cf65d9937c56b597c530e1bf5f8ef0", + "reference": "50c9e4dff0cf65d9937c56b597c530e1bf5f8ef0", + "shasum": "" + }, + "require": { + "fig/http-message-util": "^1.1", + "php": "^5.6 || ^7.0", + "psr/http-message": "^1.0" + }, + "require-dev": { + "malukenho/docheader": "^0.1.5", + "phpunit/phpunit": "^4.7 || ^5.6", + "zendframework/zend-coding-standard": "~1.0.0" + }, + "suggest": { + "zendframework/zend-expressive-aurarouter": "^1.0 to use the Aura.Router routing adapter", + "zendframework/zend-expressive-fastroute": "^1.2 to use the FastRoute routing adapter", + "zendframework/zend-expressive-zendrouter": "^1.2 to use the zend-router routing adapter" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev", + "dev-develop": "2.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Expressive\\Router\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Router subcomponent for Expressive", + "keywords": [ + "expressive", + "http", + "middleware", + "psr", + "psr-7" + ], + "time": "2016-12-14T13:49:15+00:00" + }, + { + "name": "zendframework/zend-expressive-template", + "version": "1.0.4", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-expressive-template.git", + "reference": "23922f96b32ab6e64fc551ec06b81fd047828765" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-expressive-template/zipball/23922f96b32ab6e64fc551ec06b81fd047828765", + "reference": "23922f96b32ab6e64fc551ec06b81fd047828765", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.7", + "zendframework/zend-coding-standard": "~1.0.0" + }, + "suggest": { + "zendframework/zend-expressive-platesrenderer": "^0.1 to use the Plates template renderer", + "zendframework/zend-expressive-twigrenderer": "^0.1 to use the Twig template renderer", + "zendframework/zend-expressive-zendviewrenderer": "^0.1 to use the zend-view PhpRenderer template renderer" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev", + "dev-develop": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Expressive\\Template\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Template subcomponent for Expressive", + "keywords": [ + "expressive", + "template" + ], + "time": "2017-01-11T18:42:34+00:00" + }, + { + "name": "zendframework/zend-filter", + "version": "2.7.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-filter.git", + "reference": "84c50246428efb0a1e52868e162dab3e149d5b80" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-filter/zipball/84c50246428efb0a1e52868e162dab3e149d5b80", + "reference": "84c50246428efb0a1e52868e162dab3e149d5b80", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "zendframework/zend-stdlib": "^2.7 || ^3.0" + }, + "require-dev": { + "fabpot/php-cs-fixer": "1.7.*", + "pear/archive_tar": "^1.4", + "phpunit/phpunit": "~4.0", + "zendframework/zend-crypt": "^2.6", + "zendframework/zend-servicemanager": "^2.7.5 || ^3.0.3", + "zendframework/zend-uri": "^2.5" + }, + "suggest": { + "zendframework/zend-crypt": "Zend\\Crypt component, 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.7-dev", + "dev-develop": "2.8-dev" + }, + "zf": { + "component": "Zend\\Filter", + "config-provider": "Zend\\Filter\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Zend\\Filter\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides a set of commonly needed data filters", + "homepage": "https://github.com/zendframework/zend-filter", + "keywords": [ + "filter", + "zf2" + ], + "time": "2016-04-18T18:32:43+00:00" + }, + { + "name": "zendframework/zend-hydrator", + "version": "2.2.1", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-hydrator.git", + "reference": "0ac0d3e569781f1895670b0c8d0dc7f25b8a3182" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-hydrator/zipball/0ac0d3e569781f1895670b0c8d0dc7f25b8a3182", + "reference": "0ac0d3e569781f1895670b0c8d0dc7f25b8a3182", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0", + "zendframework/zend-stdlib": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.5", + "squizlabs/php_codesniffer": "^2.3.1", + "zendframework/zend-eventmanager": "^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.2-dev", + "dev-develop": "2.3-dev" + }, + "zf": { + "component": "Zend\\Hydrator", + "config-provider": "Zend\\Hydrator\\ConfigProvider" + } + }, + "autoload": { + "psr-4": { + "Zend\\Hydrator\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-hydrator", + "keywords": [ + "hydrator", + "zf2" + ], + "time": "2016-04-18T17:59:29+00:00" + }, + { + "name": "zendframework/zend-json", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-json.git", + "reference": "f42a1588e75c2a3e338cd94c37906231e616daab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-json/zipball/f42a1588e75c2a3e338cd94c37906231e616daab", + "reference": "f42a1588e75c2a3e338cd94c37906231e616daab", + "shasum": "" + }, + "require": { + "php": "^5.5 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "^2.3", + "zendframework/zend-stdlib": "^2.7 || ^3.0" + }, + "suggest": { + "zendframework/zend-json-server": "For implementing JSON-RPC servers", + "zendframework/zend-xml2json": "For converting XML documents to JSON" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev", + "dev-develop": "3.1-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Json\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "provides convenience methods for serializing native PHP to JSON and decoding JSON to native PHP", + "homepage": "https://github.com/zendframework/zend-json", + "keywords": [ + "json", + "zf2" + ], + "time": "2016-04-01T02:34:00+00:00" + }, + { + "name": "zendframework/zend-servicemanager", + "version": "3.2.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-servicemanager.git", + "reference": "596a2cde85a92c3366514ae0f55ea32ef59536ac" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-servicemanager/zipball/596a2cde85a92c3366514ae0f55ea32ef59536ac", + "reference": "596a2cde85a92c3366514ae0f55ea32ef59536ac", + "shasum": "" + }, + "require": { + "container-interop/container-interop": "~1.0", + "php": "^5.6 || ^7.0", + "zendframework/zend-stdlib": "^3.1" + }, + "provide": { + "container-interop/container-interop-implementation": "^1.1" + }, + "require-dev": { + "mikey179/vfsstream": "^1.6", + "ocramius/proxy-manager": "^1.0 || ^2.0", + "phpbench/phpbench": "^0.10.0", + "phpunit/phpunit": "^4.6 || ^5.2.10", + "zendframework/zend-coding-standard": "~1.0.0" + }, + "suggest": { + "ocramius/proxy-manager": "ProxyManager 1.* to handle lazy initialization of services", + "zendframework/zend-stdlib": "zend-stdlib ^2.5 if you wish to use the MergeReplaceKey or MergeRemoveKey features in Config instances" + }, + "bin": [ + "bin/generate-deps-for-config-factory", + "bin/generate-factory-for-class" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev", + "dev-develop": "3.3-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\ServiceManager\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-servicemanager", + "keywords": [ + "service-manager", + "servicemanager", + "zf" + ], + "time": "2016-12-19T20:04:51+00:00" + }, + { + "name": "zendframework/zend-stdlib", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-stdlib.git", + "reference": "debedcfc373a293f9250cc9aa03cf121428c8e78" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-stdlib/zipball/debedcfc373a293f9250cc9aa03cf121428c8e78", + "reference": "debedcfc373a293f9250cc9aa03cf121428c8e78", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "athletic/athletic": "~0.1", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "^2.6.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev", + "dev-develop": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Stdlib\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "homepage": "https://github.com/zendframework/zend-stdlib", + "keywords": [ + "stdlib", + "zf2" + ], + "time": "2016-09-13T14:38:50+00:00" + }, + { + "name": "zendframework/zend-stratigility", + "version": "1.3.3", + "source": { + "type": "git", + "url": "https://github.com/zendframework/zend-stratigility.git", + "reference": "2c4120d2af215c8261a36e0bc3aa8e179e05e148" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/zendframework/zend-stratigility/zipball/2c4120d2af215c8261a36e0bc3aa8e179e05e148", + "reference": "2c4120d2af215c8261a36e0bc3aa8e179e05e148", + "shasum": "" + }, + "require": { + "http-interop/http-middleware": "^0.2.0", + "php": "^5.6 || ^7.0", + "psr/http-message": "^1.0", + "zendframework/zend-escaper": "^2.3" + }, + "require-dev": { + "phpunit/phpunit": "^5.6", + "zendframework/zend-coding-standard": "~1.0.0", + "zendframework/zend-diactoros": "^1.0" + }, + "suggest": { + "psr/http-message-implementation": "Please install a psr/http-message-implementation to consume Stratigility; e.g., zendframework/zend-diactoros" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.0-dev", + "dev-develop": "2.0.0-dev" + } + }, + "autoload": { + "psr-4": { + "Zend\\Stratigility\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "Middleware for PHP", + "homepage": "https://github.com/zendframework/zend-stratigility", + "keywords": [ + "http", + "middleware", + "psr-7" + ], + "time": "2017-01-23T22:59:03+00:00" + } + ], + "packages-dev": [ + { + "name": "filp/whoops", + "version": "2.1.5", + "source": { + "type": "git", + "url": "https://github.com/filp/whoops.git", + "reference": "2abce9d956589122c6443d6265f01cf7e9388e3c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/filp/whoops/zipball/2abce9d956589122c6443d6265f01cf7e9388e3c", + "reference": "2abce9d956589122c6443d6265f01cf7e9388e3c", + "shasum": "" + }, + "require": { + "php": "^5.5.9 || ^7.0" + }, + "require-dev": { + "mockery/mockery": "0.9.*", + "phpunit/phpunit": "^4.8 || ^5.0", + "symfony/var-dumper": "^2.6 || ^3.0" + }, + "suggest": { + "symfony/var-dumper": "Pretty print complex values better with var-dumper available", + "whoops/soap": "Formats errors as SOAP responses" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "psr-4": { + "Whoops\\": "src/Whoops/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Filipe Dobreira", + "homepage": "https://github.com/filp", + "role": "Developer" + } + ], + "description": "php error handling for cool kids", + "homepage": "https://filp.github.io/whoops/", + "keywords": [ + "error", + "exception", + "handling", + "library", + "whoops", + "zf2" + ], + "time": "2016-12-26T16:13:31+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "1.0", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", + "shasum": "" + }, + "require": { + "php": ">=5.5" + }, + "require-dev": { + "phpunit/phpunit": "^4.6" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2015-12-27T11:43:31+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "3.1.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0@dev", + "phpdocumentor/type-resolver": "^0.2.0", + "webmozart/assert": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^4.4" + }, + "type": "library", + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2016-09-30T07:12:33+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "0.2.1", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", + "shasum": "" + }, + "require": { + "php": ">=5.5", + "phpdocumentor/reflection-common": "^1.0" + }, + "require-dev": { + "mockery/mockery": "^0.9.4", + "phpunit/phpunit": "^5.2||^4.8.24" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": [ + "src/" + ] + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "time": "2016-11-25T06:54:22+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.6.2", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "6c52c2722f8460122f96f86346600e1077ce22cb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/6c52c2722f8460122f96f86346600e1077ce22cb", + "reference": "6c52c2722f8460122f96f86346600e1077ce22cb", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", + "sebastian/comparator": "^1.1", + "sebastian/recursion-context": "^1.0|^2.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.0", + "phpunit/phpunit": "^4.8 || ^5.6.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.6.x-dev" + } + }, + "autoload": { + "psr-0": { + "Prophecy\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2016-11-21T14:58:47+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "2.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "reference": "eabf68b476ac7d0f73793aada060f1c1a9bf8979", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "^1.3.2", + "sebastian/version": "~1.0" + }, + "require-dev": { + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "~4" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2015-10-06T15:47:00+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2016-10-03T07:40:28+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4|~5" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2016-05-12T18:03:57+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.4.9", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3b402f65a4cc90abf6e1104e388b896ce209631b", + "reference": "3b402f65a4cc90abf6e1104e388b896ce209631b", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2016-11-15T14:06:22+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "4.8.35", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/791b1a67c25af50e230f841ee7a9c6eba507dc87", + "reference": "791b1a67c25af50e230f841ee7a9c6eba507dc87", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpspec/prophecy": "^1.3.1", + "phpunit/php-code-coverage": "~2.1", + "phpunit/php-file-iterator": "~1.4", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "^1.0.6", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.2.2", + "sebastian/diff": "~1.2", + "sebastian/environment": "~1.3", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", + "sebastian/version": "~1.0", + "symfony/yaml": "~2.1|~3.0" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.8.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2017-02-06T05:18:07+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "2.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "reference": "ac8e7a3db35738d56ee9a76e78a4e03d97628983", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": ">=5.3.3", + "phpunit/php-text-template": "~1.2", + "sebastian/exporter": "~1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2015-10-02T06:51:40+00:00" + }, + { + "name": "sebastian/comparator", + "version": "1.2.4", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2 || ~2.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2017-01-29T09:50:25+00:00" + }, + { + "name": "sebastian/diff", + "version": "1.4.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2015-12-08T07:14:41+00:00" + }, + { + "name": "sebastian/environment", + "version": "1.3.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "reference": "be2c607e43ce4c89ecd60e75c6a85c126e754aea", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8 || ^5.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2016-08-18T05:49:44+00:00" + }, + { + "name": "sebastian/exporter", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/42c4c2eec485ee3e159ec9884f95b431287edde4", + "reference": "42c4c2eec485ee3e159ec9884f95b431287edde4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "~4.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2016-06-17T09:04:28+00:00" + }, + { + "name": "sebastian/global-state", + "version": "1.1.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2015-10-12T03:26:01+00:00" + }, + { + "name": "sebastian/recursion-context", + "version": "1.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/913401df809e99e4f47b27cdd781f4a258d58791", + "reference": "913401df809e99e4f47b27cdd781f4a258d58791", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.4" + }, + "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": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + } + ], + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2015-11-11T19:50:13+00:00" + }, + { + "name": "sebastian/version", + "version": "1.0.6", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6", + "shasum": "" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2015-06-21T13:59:46+00:00" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "2.8.0", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "86dd55a522238211f9f3631e3361703578941d9a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/86dd55a522238211f9f3631e3361703578941d9a", + "reference": "86dd55a522238211f9f3631e3361703578941d9a", + "shasum": "" + }, + "require": { + "ext-simplexml": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": ">=5.1.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "bin": [ + "scripts/phpcs", + "scripts/phpcbf" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Fixer.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenizes PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2017-02-02T03:30:00+00:00" + }, + { + "name": "symfony/yaml", + "version": "v3.2.3", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "e1718c6bf57e1efbb8793ada951584b2ab27775b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/e1718c6bf57e1efbb8793ada951584b2ab27775b", + "reference": "e1718c6bf57e1efbb8793ada951584b2ab27775b", + "shasum": "" + }, + "require": { + "php": ">=5.5.9" + }, + "require-dev": { + "symfony/console": "~2.8|~3.0" + }, + "suggest": { + "symfony/console": "For validating YAML files using the lint command" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2017-01-21T17:06:35+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.6", + "sebastian/version": "^1.0.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3-dev" + } + }, + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2016-11-23T20:04:58+00:00" + } + ], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": { + "roave/security-advisories": 20 + }, + "prefer-stable": false, + "prefer-lowest": false, + "platform": { + "php": "^5.6 || ^7.0" + }, + "platform-dev": [] +} diff --git a/config/autoload/.gitignore b/config/autoload/.gitignore new file mode 100644 index 0000000..1a83fda --- /dev/null +++ b/config/autoload/.gitignore @@ -0,0 +1,2 @@ +local.php +*.local.php diff --git a/config/autoload/dependencies.global.php b/config/autoload/dependencies.global.php new file mode 100644 index 0000000..8679f4a --- /dev/null +++ b/config/autoload/dependencies.global.php @@ -0,0 +1,28 @@ + [ + // Use 'invokables' for constructor-less services, or services that do + // not require arguments to the constructor. Map a service name to the + // class name. + 'invokables' => [ + // Fully\Qualified\InterfaceName::class => Fully\Qualified\ClassName::class, + Helper\ServerUrlHelper::class => Helper\ServerUrlHelper::class, + ], + // Use 'factories' for services provided by callbacks/factory classes. + 'factories' => [ + Application::class => ApplicationFactory::class, + Helper\UrlHelper::class => Helper\UrlHelperFactory::class, + 'doctrine.entity_manager.orm_default' => \ContainerInteropDoctrine\EntityManagerFactory::class, + 'doctrine.hydrator' => \App\Hydrator\DoctrineObjectFactory::class, + \App\Service\CiConfigService::class => \App\Service\CiConfigServiceFactory::class, + ], + ], +]; diff --git a/config/autoload/doctrine.global.php b/config/autoload/doctrine.global.php new file mode 100644 index 0000000..83e0fb7 --- /dev/null +++ b/config/autoload/doctrine.global.php @@ -0,0 +1,68 @@ + [ + 'driver' => [ + 'orm_default' => [ + 'class' => \Doctrine\Common\Persistence\Mapping\Driver\MappingDriverChain::class, + 'drivers' => [ + 'App\Entity' => 'my_entity', + ], + ], + 'my_entity' => [ + 'class' => \Doctrine\ORM\Mapping\Driver\AnnotationDriver::class, + 'cache' => 'array', + 'paths' => __DIR__ . '/../../src/App/Entity', + ], + ], + 'configuration' => [ + 'orm_default' => [ +// 'datetime_functions' => [ +// 'date' => Oro\ORM\Query\AST\Functions\SimpleFunction::class, +// 'time' => Oro\ORM\Query\AST\Functions\SimpleFunction::class, +// 'timestamp' => Oro\ORM\Query\AST\Functions\SimpleFunction::class, +// 'convert_tz' => Oro\ORM\Query\AST\Functions\DateTime\ConvertTz::class, +// ], + 'numeric_functions' => [ +// 'timestampdiff' => Oro\ORM\Query\AST\Functions\Numeric\TimestampDiff::class, +// 'dayofyear' => Oro\ORM\Query\AST\Functions\SimpleFunction::class, +// 'dayofmonth' => Oro\ORM\Query\AST\Functions\SimpleFunction::class, +// 'dayofweek' => Oro\ORM\Query\AST\Functions\SimpleFunction::class, +// 'week' => Oro\ORM\Query\AST\Functions\SimpleFunction::class, +// 'day' => Oro\ORM\Query\AST\Functions\SimpleFunction::class, +// 'hour' => Oro\ORM\Query\AST\Functions\SimpleFunction::class, +// 'minute' => Oro\ORM\Query\AST\Functions\SimpleFunction::class, +// 'month' => Oro\ORM\Query\AST\Functions\SimpleFunction::class, +// 'quarter' => Oro\ORM\Query\AST\Functions\SimpleFunction::class, +// 'second' => Oro\ORM\Query\AST\Functions\SimpleFunction::class, +// 'year' => Oro\ORM\Query\AST\Functions\SimpleFunction::class, +// 'sign' => Oro\ORM\Query\AST\Functions\Numeric\Sign::class, +// 'pow' => Oro\ORM\Query\AST\Functions\Numeric\Pow::class, + ], +// 'string_functions' => [ +// 'md5' => Oro\ORM\Query\AST\Functions\SimpleFunction::class, +// 'group_concat' => Oro\ORM\Query\AST\Functions\String\GroupConcat::class, +// 'cast' => Oro\ORM\Query\AST\Functions\Cast::class, +// 'concat_ws' => Oro\ORM\Query\AST\Functions\String\ConcatWs::class +// ] +// 'filters' => [ +// 'soft-deleteable' => Gedmo\SoftDeleteable\Filter\SoftDeleteableFilter::class, +// ], + ], + ], + 'event_manager' => [ + 'orm_default' => [ + 'subscribers' => [ +// Gedmo\Timestampable\TimestampableListener::class, + // 'Gedmo\Tree\TreeListener', + // 'Gedmo\SoftDeleteable\SoftDeleteableListener', + // 'Gedmo\Translatable\TranslatableListener', + // 'Gedmo\Blameable\BlameableListener', + // 'Gedmo\Loggable\LoggableListener', + // 'Gedmo\Sortable\SortableListener', + // 'Gedmo\Sluggable\SluggableListener', + ], + ], + ], + ], +]; diff --git a/config/autoload/doctrine.local.dist.php b/config/autoload/doctrine.local.dist.php new file mode 100644 index 0000000..6549fbe --- /dev/null +++ b/config/autoload/doctrine.local.dist.php @@ -0,0 +1,14 @@ + [ + 'connection' => [ + 'orm_default' => [ + 'params' => [ + 'url' => 'mysqli://user:passwd@host/database', + 'charset' => 'UTF8', + ], + ], + ], + ], +]; diff --git a/config/autoload/local.php.dist b/config/autoload/local.php.dist new file mode 100644 index 0000000..75c8b9c --- /dev/null +++ b/config/autoload/local.php.dist @@ -0,0 +1,7 @@ + true, + + 'config_cache_enabled' => false, +]; diff --git a/config/autoload/middleware-pipeline.global.php b/config/autoload/middleware-pipeline.global.php new file mode 100644 index 0000000..bfd33eb --- /dev/null +++ b/config/autoload/middleware-pipeline.global.php @@ -0,0 +1,70 @@ + [ + 'factories' => [ + Helper\ServerUrlMiddleware::class => Helper\ServerUrlMiddlewareFactory::class, + Helper\UrlHelperMiddleware::class => Helper\UrlHelperMiddlewareFactory::class, + ], + ], + // This can be used to seed pre- and/or post-routing middleware + 'middleware_pipeline' => [ + // An array of middleware to register. Each item is of the following + // specification: + // + // [ + // Required: + // 'middleware' => 'Name or array of names of middleware services and/or callables', + // Optional: + // 'path' => '/path/to/match', // string; literal path prefix to match + // // middleware will not execute + // // if path does not match! + // 'error' => true, // boolean; true for error middleware + // 'priority' => 1, // int; higher values == register early; + // // lower/negative == register last; + // // default is 1, if none is provided. + // ], + // + // While the ApplicationFactory ignores the keys associated with + // specifications, they can be used to allow merging related values + // defined in multiple configuration files/locations. This file defines + // some conventional keys for middleware to execute early, routing + // middleware, and error middleware. + 'always' => [ + 'middleware' => [ + // Add more middleware here that you want to execute on + // every request: + // - bootstrapping + // - pre-conditions + // - modifications to outgoing responses + Helper\ServerUrlMiddleware::class, + \App\Middleware\PreFlightMiddleware::class, + ], + 'priority' => 10000, + ], + + 'routing' => [ + 'middleware' => [ + ApplicationFactory::ROUTING_MIDDLEWARE, + Helper\UrlHelperMiddleware::class, + // Add more middleware here that needs to introspect the routing + // results; this might include: + // - route-based authentication + // - route-based validation + // - etc. + ApplicationFactory::DISPATCH_MIDDLEWARE, + ], + 'priority' => 1, + ], + + 'error' => [ + 'middleware' => [ + // Add error middleware here. + ], + 'error' => true, + 'priority' => -10000, + ], + ], +]; diff --git a/config/autoload/routes.global.php b/config/autoload/routes.global.php new file mode 100644 index 0000000..f4aad0d --- /dev/null +++ b/config/autoload/routes.global.php @@ -0,0 +1,55 @@ + [ + 'invokables' => [ + Zend\Expressive\Router\RouterInterface::class => Zend\Expressive\Router\FastRouteRouter::class, + App\Action\PingAction::class => App\Action\PingAction::class, + ], + 'factories' => [ + App\Action\CiConfigAction::class => App\Action\CiConfigFactory::class, + App\Action\CiConfigItemAction::class => App\Action\CiConfigItemFactory::class, + App\Action\HomePageAction::class => App\Action\HomePageFactory::class, + ], + ], + + 'routes' => [ + [ + 'name' => 'home', + 'path' => '/', + 'middleware' => App\Action\HomePageAction::class, + 'allowed_methods' => ['GET'], + ], + [ + 'name' => 'api.ping', + 'path' => '/api/ping', + 'middleware' => App\Action\PingAction::class, + 'allowed_methods' => ['GET'], + ], + [ + 'name' => 'api.ci-config', + 'path' => '/api/ci-config', + 'middleware' => App\Action\CiConfigAction::class, + 'allowed_methods' => ['GET','POST'], + ], + [ + 'name' => 'api.ci-config-id', + 'path' => '/api/ci-config/{id:\d+}', + 'middleware' => App\Action\CiConfigAction::class, + 'allowed_methods' => ['GET','DELETE'], + ], +// [ +// 'name' => 'api.ci-config-item', +// 'path' => '/api/ci-config-item', +// 'middleware' => App\Action\CiConfigItemAction::class, +// 'allowed_methods' => ['GET','POST'], +// ], + [ + 'name' => 'api.ci-config-item-id', + 'path' => '/api/ci-config-item/{id:\d+}', + 'middleware' => App\Action\CiConfigItemAction::class, + 'allowed_methods' => ['DELETE'], +// 'allowed_methods' => ['GET','DELETE'], + ], + ], +]; diff --git a/config/autoload/zend-expressive.global.php b/config/autoload/zend-expressive.global.php new file mode 100644 index 0000000..44e980c --- /dev/null +++ b/config/autoload/zend-expressive.global.php @@ -0,0 +1,14 @@ + false, + + 'config_cache_enabled' => false, + + 'zend-expressive' => [ + 'error_handler' => [ + 'template_404' => 'error::404', + 'template_error' => 'error::error', + ], + ], +]; diff --git a/config/config.php b/config/config.php new file mode 100644 index 0000000..a5446be --- /dev/null +++ b/config/config.php @@ -0,0 +1,35 @@ +configureServiceManager($container); + +// Inject config +$container->setService('config', $config); + +return $container; diff --git a/data/.gitignore b/data/.gitignore new file mode 100644 index 0000000..d6b7ef3 --- /dev/null +++ b/data/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/phpcs.xml b/phpcs.xml new file mode 100644 index 0000000..f032dbb --- /dev/null +++ b/phpcs.xml @@ -0,0 +1,20 @@ + + + Zend Framework coding standard + + + + + + + + + + + + + + + + src + diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..4c66f07 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,17 @@ + + + + + ./test + + + + + + ./src + + + diff --git a/public/.htaccess b/public/.htaccess new file mode 100644 index 0000000..a5c4081 --- /dev/null +++ b/public/.htaccess @@ -0,0 +1,17 @@ +RewriteEngine On +# The following rule tells Apache that if the requested filename +# exists, simply serve it. +RewriteCond %{REQUEST_FILENAME} -s [OR] +RewriteCond %{REQUEST_FILENAME} -l [OR] +RewriteCond %{REQUEST_FILENAME} -d +RewriteRule ^.*$ - [NC,L] + +# The following rewrites all other queries to index.php. The +# condition ensures that if you are using Apache aliases to do +# mass virtual hosting, the base path will be prepended to +# allow proper resolution of the index.php file; it will work +# in non-aliased environments as well, providing a safe, one-size +# fits all solution. +RewriteCond %{REQUEST_URI}::$1 ^(/.+)(.+)::\2$ +RewriteRule ^(.*) - [E=BASE:%1] +RewriteRule ^(.*)$ %{ENV:BASE}index.php [NC,L] diff --git a/public/favicon.ico b/public/favicon.ico new file mode 100644 index 0000000..17f1199 Binary files /dev/null and b/public/favicon.ico differ diff --git a/public/index.php b/public/index.php new file mode 100644 index 0000000..f84c136 --- /dev/null +++ b/public/index.php @@ -0,0 +1,18 @@ +get(\Zend\Expressive\Application::class); +$app->run(); diff --git a/public/zf-logo.png b/public/zf-logo.png new file mode 100644 index 0000000..ea5880e Binary files /dev/null and b/public/zf-logo.png differ diff --git a/src/App/Action/AbstractAction.php b/src/App/Action/AbstractAction.php new file mode 100644 index 0000000..244b47a --- /dev/null +++ b/src/App/Action/AbstractAction.php @@ -0,0 +1,158 @@ +getMethod()); + $id = $request->getAttribute(static::IDENTIFIER_NAME); + + switch ($requestMethod) { + case 'GET': + return isset($id) + ? $this->get($request, $response, $next) + : $this->getList($request, $response, $next); + case 'POST': + return $this->create($request, $response, $next); + case 'PUT': + return $this->update($request, $response, $next); + case 'DELETE': + return isset($id) + ? $this->delete($request, $response, $next) + : $this->deleteList($request, $response, $next); + case 'HEAD': + return $this->head($request, $response, $next); + case 'OPTIONS': + return $this->options($request, $response, $next); + case 'PATCH': + return $this->patch($request, $response, $next); + default: + return $next($request, $response); + } + } + + public function get(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) + { + return $this->createResponse(['content' => 'Method not allowed'], 405); + } + + public function getList(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) + { + return $this->createResponse(['content' => 'Method not allowed'], 405); + } + + public function create(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) + { + return $this->createResponse(['content' => 'Method not allowed'], 405); + } + + public function update(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) + { + return $this->createResponse(['content' => 'Method not allowed'], 405); + } + + public function delete(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) + { + return $this->createResponse(['content' => 'Method not allowed'], 405); + } + + public function deleteList(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) + { + return $this->createResponse(['content' => 'Method not allowed'], 405); + } + + public function head(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) + { + return $this->createResponse(['content' => 'Method not allowed'], 405); + } + + public function options(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) + { + return $this->createResponse(['content' => 'Method not allowed'], 405); + } + + public function patch(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) + { + return $this->createResponse(['content' => 'Method not allowed'], 405); + } + + final protected function createResponse($data, $status = 200) + { + return new JsonResponse($data, $status); + } + + /** + * + * @param ServerRequestInterface $request + * @return array|object + */ + public function getRequestData(ServerRequestInterface $request) + { + $body = $request->getParsedBody(); + + if (!empty($body)) { + return $body; + } + + return $this->parseRequestData( + $request->getBody()->getContents(), + $request->getHeaderLine('content-type') + ); + } + + /** + * + * @param string $input + * @param string $contentType + * @return mixed + */ + private function parseRequestData($input, $contentType) + { + $contentTypeParts = preg_split('/\s*[;,]\s*/', $contentType); + $parser = $this->returnParserContentType($contentTypeParts[0]); + + return $parser($input); + } + + /** + * + * @param string $contentType + * @return callable + */ + private function returnParserContentType(string $contentType) + { + if ($contentType === 'application/x-www-form-urlencoded') { + return function ($input) { + parse_str($input, $data); + return $data; + }; + } elseif ($contentType === 'application/json') { + return function ($input) { + $jsonDecoder = new Json(); + try { + return $jsonDecoder->decode($input, Json::TYPE_ARRAY); + } catch (\Exception $e) { + return false; + } + }; + } elseif ($contentType === 'multipart/form-data') { + return function ($input) { + return $input; + }; + } + + return function ($input) { + return $input; + }; + } +} diff --git a/src/App/Action/CiConfigAction.php b/src/App/Action/CiConfigAction.php new file mode 100644 index 0000000..108089d --- /dev/null +++ b/src/App/Action/CiConfigAction.php @@ -0,0 +1,45 @@ +ciConfigService = $ciConfigService; + } + + public function getList(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) + { + return new JsonCorsResponse($this->ciConfigService->getList()); + } + + public function get(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) + { + $id = $request->getAttribute('id'); + return new JsonCorsResponse($this->ciConfigService->get($id)); + } + + public function create(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) + { + $data = $this->getRequestData($request); + return new JsonCorsResponse($this->ciConfigService->create($data)); + } + + public function delete(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) + { + $id = $request->getAttribute('id'); + return new JsonCorsResponse($this->ciConfigService->delete($id)); + } +} diff --git a/src/App/Action/CiConfigFactory.php b/src/App/Action/CiConfigFactory.php new file mode 100644 index 0000000..e0e8f8d --- /dev/null +++ b/src/App/Action/CiConfigFactory.php @@ -0,0 +1,15 @@ +get(CiConfigService::class); + return new CiConfigAction($service); + } +} diff --git a/src/App/Action/CiConfigItemAction.php b/src/App/Action/CiConfigItemAction.php new file mode 100644 index 0000000..1db9a77 --- /dev/null +++ b/src/App/Action/CiConfigItemAction.php @@ -0,0 +1,28 @@ +ciConfigService = $ciConfigService; + } + + public function delete(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) + { + $id = $request->getAttribute('id'); + return new JsonCorsResponse($this->ciConfigService->deleteItem($id)); + } +} diff --git a/src/App/Action/CiConfigItemFactory.php b/src/App/Action/CiConfigItemFactory.php new file mode 100644 index 0000000..7ac5db1 --- /dev/null +++ b/src/App/Action/CiConfigItemFactory.php @@ -0,0 +1,15 @@ +get(CiConfigService::class); + return new CiConfigItemAction($service); + } +} diff --git a/src/App/Action/HomePageAction.php b/src/App/Action/HomePageAction.php new file mode 100644 index 0000000..8486f5a --- /dev/null +++ b/src/App/Action/HomePageAction.php @@ -0,0 +1,62 @@ +router = $router; + $this->template = $template; + } + + public function __invoke(ServerRequestInterface $request, ResponseInterface $response, callable $next = null) + { + $data = []; + + if ($this->router instanceof Router\AuraRouter) { + $data['routerName'] = 'Aura.Router'; + $data['routerDocs'] = 'http://auraphp.com/packages/2.x/Router.html'; + } elseif ($this->router instanceof Router\FastRouteRouter) { + $data['routerName'] = 'FastRoute'; + $data['routerDocs'] = 'https://github.com/nikic/FastRoute'; + } elseif ($this->router instanceof Router\ZendRouter) { + $data['routerName'] = 'Zend Router'; + $data['routerDocs'] = 'http://framework.zend.com/manual/current/en/modules/zend.mvc.routing.html'; + } + + if ($this->template instanceof PlatesRenderer) { + $data['templateName'] = 'Plates'; + $data['templateDocs'] = 'http://platesphp.com/'; + } elseif ($this->template instanceof TwigRenderer) { + $data['templateName'] = 'Twig'; + $data['templateDocs'] = 'http://twig.sensiolabs.org/documentation'; + } elseif ($this->template instanceof ZendViewRenderer) { + $data['templateName'] = 'Zend View'; + $data['templateDocs'] = 'http://framework.zend.com/manual/current/en/modules/zend.view.quick-start.html'; + } + + if (!$this->template) { + return new JsonResponse([ + 'welcome' => 'Congratulations! You have installed the zend-expressive skeleton application.', + 'docsUrl' => 'zend-expressive.readthedocs.org', + ]); + } + + return new HtmlResponse($this->template->render('app::home-page', $data)); + } +} diff --git a/src/App/Action/HomePageFactory.php b/src/App/Action/HomePageFactory.php new file mode 100644 index 0000000..8366ff8 --- /dev/null +++ b/src/App/Action/HomePageFactory.php @@ -0,0 +1,20 @@ +get(RouterInterface::class); + $template = ($container->has(TemplateRendererInterface::class)) + ? $container->get(TemplateRendererInterface::class) + : null; + + return new HomePageAction($router, $template); + } +} diff --git a/src/App/Action/PingAction.php b/src/App/Action/PingAction.php new file mode 100644 index 0000000..ea2ae22 --- /dev/null +++ b/src/App/Action/PingAction.php @@ -0,0 +1,15 @@ + time()]); + } +} diff --git a/src/App/Entity/CiConfig.php b/src/App/Entity/CiConfig.php new file mode 100644 index 0000000..1f7cb8d --- /dev/null +++ b/src/App/Entity/CiConfig.php @@ -0,0 +1,130 @@ +configItems = new ArrayCollection(); + } + + /** + * @return int + */ + public function getId(): int + { + return $this->id; + } + + /** + * @param int $id + * @return CiConfig + */ + public function setId(int $id): CiConfig + { + $this->id = $id; + return $this; + } + + /** + * @return mixed + */ + public function getConfigItems() + { + return $this->configItems; + } + + /** + * @param mixed $configItems + * @return CiConfig + */ + public function setConfigItems($configItems): CiConfig + { + $this->configItems = $configItems; + return $this; + } + + /** + * @param CiConfigItem $item + * @return CiConfig + */ + public function addConfigItem(CiConfigItem $item): CiConfig + { + if(!$this->configItems->contains($item)) { + $this->configItems->add($item); + $item->setDailyConfig($this); + } + return $this; + } + + /** + * @param ArrayCollection $items + * @return CiConfig + */ + public function addConfigItems($items): CiConfig + { + foreach ($items as $item) { + $this->addConfigItem($item); + } + return $this; + } + + /** + * @param CiConfigItem $item + * @return CiConfig + */ + public function removeConfigItem(CiConfigItem $item): CiConfig + { + if($this->configItems->contains($item)) { + $this->configItems->removeElement($item); + } + return $this; + } + + /** + * @param ArrayCollection $items + * @return CiConfig + */ + public function removeConfigItems($items): CiConfig + { + foreach ($items as $item) { + $this->removeConfigItem($item); + } + return $this; + } + + /** + * @return array + */ + public function jsonSerialize() + { + return [ + 'id' => $this->getId(), + 'configItems' => $this->getConfigItems()->getValues(), + ]; + } +} diff --git a/src/App/Entity/CiConfigItem.php b/src/App/Entity/CiConfigItem.php new file mode 100644 index 0000000..d262683 --- /dev/null +++ b/src/App/Entity/CiConfigItem.php @@ -0,0 +1,529 @@ +id; + } + + /** + * @param mixed $id + * @return CiConfigItem + */ + public function setId($id): CiConfigItem + { + $this->id = $id; + return $this; + } + + /** + * @return CiConfig + */ + public function getDailyConfig(): CiConfig + { + return $this->dailyConfig; + } + + /** + * @param CiConfig $dailyConfig + * @return CiConfigItem + */ + public function setDailyConfig(CiConfig $dailyConfig): CiConfigItem + { + $this->dailyConfig = $dailyConfig; + return $this; + } + + /** + * @return mixed + */ + public function getStream() + { + return $this->stream; + } + + /** + * @param mixed $stream + * @return CiConfigItem + */ + public function setStream($stream): CiConfigItem + { + $this->stream = $stream; + return $this; + } + + /** + * @return \string[] + */ + public function getNodes(): array + { + return $this->nodes; + } + + /** + * @param \string[] $nodes + * @return CiConfigItem + */ + public function setNodes(array $nodes): CiConfigItem + { + $this->nodes = $nodes; + return $this; + } + + /** + * @param string $node + * @return CiConfigItem + */ + public function addNode(string $node): CiConfigItem + { + array_push($this->nodes, $node); + $this->nodes = array_unique($this->nodes); + sort($this->nodes); + return $this; + } + + /** + * @param string $node + * @return CiConfigItem + */ + public function removeNode(string $node): CiConfigItem + { + $this->nodes = array_filter($this->nodes, function($item) use ($node) { + return $item != $node; + }); + return $this; + } + + /** + * @return string + */ + public function getJcat(): string + { + return $this->jcat; + } + + /** + * @param string $jcat + * @return CiConfigItem + */ + public function setJcat(string $jcat): CiConfigItem + { + $this->jcat = $jcat; + return $this; + } + + /** + * @return string + */ + public function getTestType(): string + { + return $this->testType; + } + + /** + * @param string $testType + * @return CiConfigItem + */ + public function setTestType(string $testType): CiConfigItem + { + $this->testType = $testType; + return $this; + } + + /** + * @return bool + */ + public function isDoRollbackBefore(): bool + { + return $this->doRollbackBefore; + } + + /** + * @param bool $doRollbackBefore + * @return CiConfigItem + */ + public function setDoRollbackBefore(bool $doRollbackBefore): CiConfigItem + { + $this->doRollbackBefore = $doRollbackBefore; + return $this; + } + + /** + * @return bool + */ + public function isDoUpgrade(): bool + { + return $this->doUpgrade; + } + + /** + * @param bool $doUpgrade + * @return CiConfigItem + */ + public function setDoUpgrade(bool $doUpgrade): CiConfigItem + { + $this->doUpgrade = $doUpgrade; + return $this; + } + + /** + * @return bool + */ + public function isDoLrt(): bool + { + return $this->doLrt; + } + + /** + * @param bool $doLrt + * @return CiConfigItem + */ + public function setDoLrt(bool $doLrt): CiConfigItem + { + $this->doLrt = $doLrt; + return $this; + } + + /** + * @return bool + */ + public function isDoDsv(): bool + { + return $this->doDsv; + } + + /** + * @param bool $doDsv + * @return CiConfigItem + */ + public function setDoDsv(bool $doDsv): CiConfigItem + { + $this->doDsv = $doDsv; + return $this; + } + + /** + * @return bool + */ + public function isDoNmDsv(): bool + { + return $this->doNmDsv; + } + + /** + * @param bool $doNmDsv + * @return CiConfigItem + */ + public function setDoNmDsv(bool $doNmDsv): CiConfigItem + { + $this->doNmDsv = $doNmDsv; + return $this; + } + + /** + * @return bool + */ + public function isDoRollbackAfter(): bool + { + return $this->doRollbackAfter; + } + + /** + * @param bool $doRollbackAfter + * @return CiConfigItem + */ + public function setDoRollbackAfter(bool $doRollbackAfter): CiConfigItem + { + $this->doRollbackAfter = $doRollbackAfter; + return $this; + } + + /** + * @return bool + */ + public function isDoSubsystemRegressionLoop(): bool + { + return $this->doSubsystemRegressionLoop; + } + + /** + * @param bool $doSubsystemRegressionLoop + * @return CiConfigItem + */ + public function setDoSubsystemRegressionLoop(bool $doSubsystemRegressionLoop): CiConfigItem + { + $this->doSubsystemRegressionLoop = $doSubsystemRegressionLoop; + return $this; + } + + /** + * @return bool + */ + public function isDoUpgradeabilityLoop(): bool + { + return $this->doUpgradeabilityLoop; + } + + /** + * @param bool $doUpgradeabilityLoop + * @return CiConfigItem + */ + public function setDoUpgradeabilityLoop(bool $doUpgradeabilityLoop): CiConfigItem + { + $this->doUpgradeabilityLoop = $doUpgradeabilityLoop; + return $this; + } + + /** + * @return bool + */ + public function isDoClusterControlCharacteristicsLoop(): bool + { + return $this->doClusterControlCharacteristicsLoop; + } + + /** + * @param bool $doClusterControlCharacteristicsLoop + * @return CiConfigItem + */ + public function setDoClusterControlCharacteristicsLoop(bool $doClusterControlCharacteristicsLoop): CiConfigItem + { + $this->doClusterControlCharacteristicsLoop = $doClusterControlCharacteristicsLoop; + return $this; + } + + /** + * @return \string[] + */ + public function getTests(): array + { + return $this->tests; + } + + /** + * @param \string[] $tests + * @return CiConfigItem + */ + public function setTests(array $tests): CiConfigItem + { + $this->tests = $tests; + return $this; + } + + /** + * @return bool + */ + public function isNightly(): bool + { + return $this->nightly; + } + + /** + * @param bool $nightly + * @return CiConfigItem + */ + public function setNightly(bool $nightly): CiConfigItem + { + $this->nightly = $nightly; + return $this; + } + + /** + * @return string + */ + public function getNote(): string + { + return $this->note; + } + + /** + * @param string $note + * @return CiConfigItem + */ + public function setNote(string $note): CiConfigItem + { + $this->note = $note; + return $this; + } + + /** + * @return bool + */ + public function isRan(): bool + { + return $this->ran; + } + + /** + * @param bool $ran + * @return CiConfigItem + */ + public function setRan(bool $ran): CiConfigItem + { + $this->ran = $ran; + return $this; + } + + /** + * @return array + */ + public function jsonSerialize() + { + return [ + 'id' => $this->getId(), + 'stream' => $this->getStream(), + 'nodes' => $this->getNodes(), + 'jcat' => $this->getJcat(), + 'testType' => $this->getTestType(), + 'doRollbackBefore' => $this->isDoRollbackBefore(), + 'doUpgrade' => $this->isDoUpgrade(), + 'doLrt' => $this->isDoLrt(), + 'doDsv' => $this->isDoDsv(), + 'doNmDsv' => $this->isDoNmDsv(), + 'doRollbackAfter' => $this->isDoRollbackAfter(), + 'doSubsystemRegressionLoop' => $this->isDoSubsystemRegressionLoop(), + 'doUpgradeabilityLoop' => $this->isDoUpgradeabilityLoop(), + 'doClusterControlCharacteristicsLoop' => $this->isDoClusterControlCharacteristicsLoop(), + 'nightly' => $this->isNightly(), + 'note' => $this->getNote(), + 'ran' => $this->isRan(), + ]; + } +} diff --git a/src/App/Hydrator/DoctrineObject.php b/src/App/Hydrator/DoctrineObject.php new file mode 100644 index 0000000..912e5c2 --- /dev/null +++ b/src/App/Hydrator/DoctrineObject.php @@ -0,0 +1,594 @@ +. + */ + +namespace App\Hydrator; + +use DateTime; +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Doctrine\Common\Persistence\ObjectManager; +use Doctrine\Common\Util\Inflector; +use InvalidArgumentException; +use RuntimeException; +use Traversable; +use Zend\Stdlib\ArrayUtils; +use Zend\Hydrator\AbstractHydrator; +use Zend\Hydrator\Filter\FilterProviderInterface; + +/** + * This hydrator has been completely refactored for DoctrineModule 0.7.0. It provides an easy and powerful way + * of extracting/hydrator objects in Doctrine, by handling most associations types. + * + * Starting from DoctrineModule 0.8.0, the hydrator can be used multiple times with different objects + * + * @license MIT + * @link http://www.doctrine-project.org/ + * @since 0.7.0 + * @author Michael Gallego + */ +class DoctrineObject extends AbstractHydrator +{ + /** + * @var ObjectManager + */ + protected $objectManager; + + /** + * @var ClassMetadata + */ + protected $metadata; + + /** + * @var bool + */ + protected $byValue = true; + + + /** + * Constructor + * + * @param ObjectManager $objectManager The ObjectManager to use + * @param bool $byValue If set to true, hydrator will always use entity's public API + */ + public function __construct(ObjectManager $objectManager, $byValue = true) + { + parent::__construct(); + + $this->objectManager = $objectManager; + $this->byValue = (bool) $byValue; + } + + /** + * Extract values from an object + * + * @param object $object + * @return array + */ + public function extract($object) + { + $this->prepare($object); + + if ($this->byValue) { + return $this->extractByValue($object); + } + + return $this->extractByReference($object); + } + + /** + * Hydrate $object with the provided $data. + * + * @param array $data + * @param object $object + * @return object + */ + public function hydrate(array $data, $object) + { + $this->prepare($object); + + if ($this->byValue) { + return $this->hydrateByValue($data, $object); + } + + return $this->hydrateByReference($data, $object); + } + + /** + * Prepare the hydrator by adding strategies to every collection valued associations + * + * @param object $object + * @return void + */ + protected function prepare($object) + { + $this->metadata = $this->objectManager->getClassMetadata(get_class($object)); + $this->prepareStrategies(); + } + + /** + * Prepare strategies before the hydrator is used + * + * @throws \InvalidArgumentException + * @return void + */ + protected function prepareStrategies() + { + $associations = $this->metadata->getAssociationNames(); + + foreach ($associations as $association) { + if ($this->metadata->isCollectionValuedAssociation($association)) { + // Add a strategy if the association has none set by user + if (!$this->hasStrategy($association)) { + if ($this->byValue) { + $this->addStrategy($association, new Strategy\AllowRemoveByValue()); + } else { + $this->addStrategy($association, new Strategy\AllowRemoveByReference()); + } + } + + $strategy = $this->getStrategy($association); + + if (!$strategy instanceof Strategy\AbstractCollectionStrategy) { + throw new InvalidArgumentException( + sprintf( + 'Strategies used for collections valued associations must inherit from ' + . 'Strategy\AbstractCollectionStrategy, %s given', + get_class($strategy) + ) + ); + } + + $strategy->setCollectionName($association) + ->setClassMetadata($this->metadata); + } + } + } + + /** + * Extract values from an object using a by-value logic (this means that it uses the entity + * API, in this case, getters) + * + * @param object $object + * @throws RuntimeException + * @return array + */ + protected function extractByValue($object) + { + $fieldNames = array_merge($this->metadata->getFieldNames(), $this->metadata->getAssociationNames()); + $methods = get_class_methods($object); + $filter = $object instanceof FilterProviderInterface + ? $object->getFilter() + : $this->filterComposite; + + $data = []; + foreach ($fieldNames as $fieldName) { + if ($filter && !$filter->filter($fieldName)) { + continue; + } + + $getter = 'get' . Inflector::classify($fieldName); + $isser = 'is' . Inflector::classify($fieldName); + + $dataFieldName = $this->computeExtractFieldName($fieldName); + if (in_array($getter, $methods)) { + $data[$dataFieldName] = $this->extractValue($fieldName, $object->$getter(), $object); + } elseif (in_array($isser, $methods)) { + $data[$dataFieldName] = $this->extractValue($fieldName, $object->$isser(), $object); + } elseif (substr($fieldName, 0, 2) === 'is' + && ctype_upper(substr($fieldName, 2, 1)) + && in_array($fieldName, $methods)) { + $data[$dataFieldName] = $this->extractValue($fieldName, $object->$fieldName(), $object); + } + + // Unknown fields are ignored + } + + return $data; + } + + /** + * Extract values from an object using a by-reference logic (this means that values are + * directly fetched without using the public API of the entity, in this case, getters) + * + * @param object $object + * @return array + */ + protected function extractByReference($object) + { + $fieldNames = array_merge($this->metadata->getFieldNames(), $this->metadata->getAssociationNames()); + $refl = $this->metadata->getReflectionClass(); + $filter = $object instanceof FilterProviderInterface + ? $object->getFilter() + : $this->filterComposite; + + $data = []; + foreach ($fieldNames as $fieldName) { + if ($filter && !$filter->filter($fieldName)) { + continue; + } + $reflProperty = $refl->getProperty($fieldName); + $reflProperty->setAccessible(true); + + $dataFieldName = $this->computeExtractFieldName($fieldName); + $data[$dataFieldName] = $this->extractValue($fieldName, $reflProperty->getValue($object), $object); + } + + return $data; + } + + /** + * Hydrate the object using a by-value logic (this means that it uses the entity API, in this + * case, setters) + * + * @param array $data + * @param object $object + * @throws RuntimeException + * @return object + */ + protected function hydrateByValue(array $data, $object) + { + $tryObject = $this->tryConvertArrayToObject($data, $object); + $metadata = $this->metadata; + + if (is_object($tryObject)) { + $object = $tryObject; + } + + foreach ($data as $field => $value) { + $field = $this->computeHydrateFieldName($field); + $value = $this->handleTypeConversions($value, $metadata->getTypeOfField($field)); + $setter = 'set' . Inflector::classify($field); + + if ($metadata->hasAssociation($field)) { + $target = $metadata->getAssociationTargetClass($field); + + if ($metadata->isSingleValuedAssociation($field)) { + if (! method_exists($object, $setter)) { + continue; + } + + $value = $this->toOne($target, $this->hydrateValue($field, $value, $data)); + + if (null === $value + && !current($metadata->getReflectionClass()->getMethod($setter)->getParameters())->allowsNull() + ) { + continue; + } + + $object->$setter($value); + } elseif ($metadata->isCollectionValuedAssociation($field)) { + $this->toMany($object, $field, $target, $value); + } + } else { + if (! method_exists($object, $setter)) { + continue; + } + + $object->$setter($this->hydrateValue($field, $value, $data)); + } + } + + return $object; + } + + /** + * Hydrate the object using a by-reference logic (this means that values are modified directly without + * using the public API, in this case setters, and hence override any logic that could be done in those + * setters) + * + * @param array $data + * @param object $object + * @return object + */ + protected function hydrateByReference(array $data, $object) + { + $tryObject = $this->tryConvertArrayToObject($data, $object); + $metadata = $this->metadata; + $refl = $metadata->getReflectionClass(); + + if (is_object($tryObject)) { + $object = $tryObject; + } + + foreach ($data as $field => $value) { + $field = $this->computeHydrateFieldName($field); + + // Ignore unknown fields + if (!$refl->hasProperty($field)) { + continue; + } + + $value = $this->handleTypeConversions($value, $metadata->getTypeOfField($field)); + $reflProperty = $refl->getProperty($field); + $reflProperty->setAccessible(true); + + if ($metadata->hasAssociation($field)) { + $target = $metadata->getAssociationTargetClass($field); + + if ($metadata->isSingleValuedAssociation($field)) { + $value = $this->toOne($target, $this->hydrateValue($field, $value, $data)); + $reflProperty->setValue($object, $value); + } elseif ($metadata->isCollectionValuedAssociation($field)) { + $this->toMany($object, $field, $target, $value); + } + } else { + $reflProperty->setValue($object, $this->hydrateValue($field, $value, $data)); + } + } + + return $object; + } + + /** + * This function tries, given an array of data, to convert it to an object if the given array contains + * an identifier for the object. This is useful in a context of updating existing entities, without ugly + * tricks like setting manually the existing id directly into the entity + * + * @param array $data The data that may contain identifiers keys + * @param object $object + * @return object + */ + protected function tryConvertArrayToObject($data, $object) + { + $metadata = $this->metadata; + $identifierNames = $metadata->getIdentifierFieldNames($object); + $identifierValues = []; + + if (empty($identifierNames)) { + return $object; + } + + foreach ($identifierNames as $identifierName) { + if (!isset($data[$identifierName])) { + return $object; + } + + $identifierValues[$identifierName] = $data[$identifierName]; + } + + return $this->find($identifierValues, $metadata->getName()); + } + + /** + * Handle ToOne associations + * + * When $value is an array but is not the $target's identifiers, $value is + * most likely an array of fieldset data. The identifiers will be determined + * and a target instance will be initialized and then hydrated. The hydrated + * target will be returned. + * + * @param string $target + * @param mixed $value + * @return object + */ + protected function toOne($target, $value) + { + $metadata = $this->objectManager->getClassMetadata($target); + + if (is_array($value) && array_keys($value) != $metadata->getIdentifier()) { + // $value is most likely an array of fieldset data + $identifiers = array_intersect_key( + $value, + array_flip($metadata->getIdentifier()) + ); + $object = $this->find($identifiers, $target) ?: new $target; + return $this->hydrate($value, $object); + } + + return $this->find($value, $target); + } + + /** + * Handle ToMany associations. In proper Doctrine design, Collections should not be swapped, so + * collections are always handled by reference. Internally, every collection is handled using specials + * strategies that inherit from AbstractCollectionStrategy class, and that add or remove elements but without + * changing the collection of the object + * + * @param object $object + * @param mixed $collectionName + * @param string $target + * @param mixed $values + * + * @throws \InvalidArgumentException + * + * @return void + */ + protected function toMany($object, $collectionName, $target, $values) + { + $metadata = $this->objectManager->getClassMetadata(ltrim($target, '\\')); + $identifier = $metadata->getIdentifier(); + + if (!is_array($values) && !$values instanceof Traversable) { + $values = (array)$values; + } + + $collection = []; + + // If the collection contains identifiers, fetch the objects from database + foreach ($values as $value) { + if ($value instanceof $target) { + // assumes modifications have already taken place in object + $collection[] = $value; + continue; + } elseif (empty($value)) { + // assumes no id and retrieves new $target + $collection[] = $this->find($value, $target); + continue; + } + + $find = []; + if (is_array($identifier)) { + foreach ($identifier as $field) { + switch (gettype($value)) { + case 'object': + $getter = 'get' . ucfirst($field); + if (method_exists($value, $getter)) { + $find[$field] = $value->$getter(); + } elseif (property_exists($value, $field)) { + $find[$field] = $value->$field; + } + break; + case 'array': + if (array_key_exists($field, $value) && $value[$field] != null) { + $find[$field] = $value[$field]; + unset($value[$field]); // removed identifier from persistable data + } + break; + default: + $find[$field] = $value; + break; + } + } + } + + if (!empty($find) && $found = $this->find($find, $target)) { + $collection[] = (is_array($value)) ? $this->hydrate($value, $found) : $found; + } else { + $collection[] = (is_array($value)) ? $this->hydrate($value, new $target) : new $target; + } + } + + $collection = array_filter( + $collection, + function ($item) { + return null !== $item; + } + ); + + // Set the object so that the strategy can extract the Collection from it + + /** @var \DoctrineModule\Stdlib\Hydrator\Strategy\AbstractCollectionStrategy $collectionStrategy */ + $collectionStrategy = $this->getStrategy($collectionName); + $collectionStrategy->setObject($object); + + // We could directly call hydrate method from the strategy, but if people want to override + // hydrateValue function, they can do it and do their own stuff + $this->hydrateValue($collectionName, $collection, $values); + } + + /** + * Handle various type conversions that should be supported natively by Doctrine (like DateTime) + * + * @param mixed $value + * @param string $typeOfField + * @return DateTime + */ + protected function handleTypeConversions($value, $typeOfField) + { + switch ($typeOfField) { + case 'datetimetz': + case 'datetime': + case 'time': + case 'date': + if ('' === $value) { + return null; + } + + if (is_int($value)) { + $dateTime = new DateTime(); + $dateTime->setTimestamp($value); + $value = $dateTime; + } elseif (is_string($value)) { + $value = new DateTime($value); + } + + break; + default: + } + + return $value; + } + + /** + * Find an object by a given target class and identifier + * + * @param mixed $identifiers + * @param string $targetClass + * + * @return object|null + */ + protected function find($identifiers, $targetClass) + { + if ($identifiers instanceof $targetClass) { + return $identifiers; + } + + if ($this->isNullIdentifier($identifiers)) { + return null; + } + + return $this->objectManager->find($targetClass, $identifiers); + } + + /** + * Verifies if a provided identifier is to be considered null + * + * @param mixed $identifier + * + * @return bool + */ + private function isNullIdentifier($identifier) + { + if (null === $identifier) { + return true; + } + + if ($identifier instanceof Traversable || is_array($identifier)) { + $nonNullIdentifiers = array_filter( + ArrayUtils::iteratorToArray($identifier), + function ($value) { + return null !== $value; + } + ); + + return empty($nonNullIdentifiers); + } + + return false; + } + + /** + * Applies the naming strategy if there is one set + * + * @param string $field + * + * @return string + */ + protected function computeHydrateFieldName($field) + { + if ($this->hasNamingStrategy()) { + $field = $this->getNamingStrategy()->hydrate($field); + } + return $field; + } + + /** + * Applies the naming strategy if there is one set + * + * @param string $field + * + * @return string + */ + protected function computeExtractFieldName($field) + { + if ($this->hasNamingStrategy()) { + $field = $this->getNamingStrategy()->extract($field); + } + return $field; + } +} diff --git a/src/App/Hydrator/DoctrineObjectFactory.php b/src/App/Hydrator/DoctrineObjectFactory.php new file mode 100644 index 0000000..d7d10ea --- /dev/null +++ b/src/App/Hydrator/DoctrineObjectFactory.php @@ -0,0 +1,15 @@ +get('doctrine.entity_manager.orm_default'); + return new DoctrineObject($em); + } +} diff --git a/src/App/Hydrator/Filter/PropertyName.php b/src/App/Hydrator/Filter/PropertyName.php new file mode 100644 index 0000000..daafc86 --- /dev/null +++ b/src/App/Hydrator/Filter/PropertyName.php @@ -0,0 +1,66 @@ +. + */ + +namespace App\Hydrator\Filter; + +use Zend\Hydrator\Filter\FilterInterface; + +/** + * Provides a filter to restrict returned fields by whitelisting or + * blacklisting property names. + * + * @license MIT + * @link http://www.doctrine-project.org/ + * @author Liam O'Boyle + */ +class PropertyName implements FilterInterface +{ + /** + * The propteries to exclude. + * + * @var array + */ + protected $properties = []; + + /** + * Either an exclude or an include. + * + * @var bool + */ + protected $exclude = null; + + /** + * @param [ string | array ] $properties The properties to exclude or include. + * @param bool $exclude If the method should be excluded + */ + public function __construct($properties, $exclude = true) + { + $this->exclude = $exclude; + $this->properties = is_array($properties) + ? $properties + : [$properties]; + } + + public function filter($property) + { + return in_array($property, $this->properties) + ? !$this->exclude + : $this->exclude; + } +} diff --git a/src/App/Hydrator/Strategy/AbstractCollectionStrategy.php b/src/App/Hydrator/Strategy/AbstractCollectionStrategy.php new file mode 100644 index 0000000..37e6738 --- /dev/null +++ b/src/App/Hydrator/Strategy/AbstractCollectionStrategy.php @@ -0,0 +1,190 @@ +. + */ + +namespace App\Hydrator\Strategy; + +use InvalidArgumentException; +use Doctrine\Common\Collections\Collection; +use Doctrine\Common\Persistence\Mapping\ClassMetadata; +use Zend\Hydrator\Strategy\StrategyInterface; + +/** + * @license MIT + * @link http://www.doctrine-project.org/ + * @since 0.7.0 + * @author Michael Gallego + */ +abstract class AbstractCollectionStrategy implements StrategyInterface +{ + /** + * @var string + */ + protected $collectionName; + + /** + * @var ClassMetadata + */ + protected $metadata; + + /** + * @var object + */ + protected $object; + + + /** + * Set the name of the collection + * + * @param string $collectionName + * @return AbstractCollectionStrategy + */ + public function setCollectionName($collectionName) + { + $this->collectionName = (string) $collectionName; + return $this; + } + + /** + * Get the name of the collection + * + * @return string + */ + public function getCollectionName() + { + return $this->collectionName; + } + + /** + * Set the class metadata + * + * @param ClassMetadata $classMetadata + * @return AbstractCollectionStrategy + */ + public function setClassMetadata(ClassMetadata $classMetadata) + { + $this->metadata = $classMetadata; + return $this; + } + + /** + * Get the class metadata + * + * @return ClassMetadata + */ + public function getClassMetadata() + { + return $this->metadata; + } + + /** + * Set the object + * + * @param object $object + * + * @throws \InvalidArgumentException + * + * @return AbstractCollectionStrategy + */ + public function setObject($object) + { + if (!is_object($object)) { + throw new InvalidArgumentException( + sprintf('The parameter given to setObject method of %s class is not an object', get_called_class()) + ); + } + + $this->object = $object; + return $this; + } + + /** + * Get the object + * + * @return object + */ + public function getObject() + { + return $this->object; + } + + /** + * {@inheritDoc} + */ + public function extract($value) + { + return $value; + } + + /** + * Return the collection by value (using the public API) + * + * @throws \InvalidArgumentException + * + * @return Collection + */ + protected function getCollectionFromObjectByValue() + { + $object = $this->getObject(); + $getter = 'get' . ucfirst($this->getCollectionName()); + + if (!method_exists($object, $getter)) { + throw new InvalidArgumentException( + sprintf( + 'The getter %s to access collection %s in object %s does not exist', + $getter, + $this->getCollectionName(), + get_class($object) + ) + ); + } + + return $object->$getter(); + } + + /** + * Return the collection by reference (not using the public API) + * + * @return Collection + */ + protected function getCollectionFromObjectByReference() + { + $object = $this->getObject(); + $refl = $this->getClassMetadata()->getReflectionClass(); + $reflProperty = $refl->getProperty($this->getCollectionName()); + + $reflProperty->setAccessible(true); + + return $reflProperty->getValue($object); + } + + + /** + * This method is used internally by array_udiff to check if two objects are equal, according to their + * SPL hash. This is needed because the native array_diff only compare strings + * + * @param object $a + * @param object $b + * + * @return int + */ + protected function compareObjects($a, $b) + { + return strcmp(spl_object_hash($a), spl_object_hash($b)); + } +} diff --git a/src/App/Hydrator/Strategy/AllowRemoveByReference.php b/src/App/Hydrator/Strategy/AllowRemoveByReference.php new file mode 100644 index 0000000..57e4222 --- /dev/null +++ b/src/App/Hydrator/Strategy/AllowRemoveByReference.php @@ -0,0 +1,58 @@ +. + */ + +namespace App\Hydrator\Strategy; + +/** + * When this strategy is used for Collections, if the new collection does not contain elements that are present in + * the original collection, then this strategy remove elements from the original collection. For instance, if the + * collection initially contains elements A and B, and that the new collection contains elements B and C, then the + * final collection will contain elements B and C (while element A will be asked to be removed). + * + * This strategy is by reference, this means it won't use public API to add/remove elements to the collection + * + * @license MIT + * @link http://www.doctrine-project.org/ + * @since 0.7.0 + * @author Michael Gallego + */ +class AllowRemoveByReference extends AbstractCollectionStrategy +{ + /** + * {@inheritDoc} + */ + public function hydrate($value) + { + $collection = $this->getCollectionFromObjectByReference(); + $collectionArray = $collection->toArray(); + + $toAdd = array_udiff($value, $collectionArray, [$this, 'compareObjects']); + $toRemove = array_udiff($collectionArray, $value, [$this, 'compareObjects']); + + foreach ($toAdd as $element) { + $collection->add($element); + } + + foreach ($toRemove as $element) { + $collection->removeElement($element); + } + + return $collection; + } +} diff --git a/src/App/Hydrator/Strategy/AllowRemoveByValue.php b/src/App/Hydrator/Strategy/AllowRemoveByValue.php new file mode 100644 index 0000000..2ac85ae --- /dev/null +++ b/src/App/Hydrator/Strategy/AllowRemoveByValue.php @@ -0,0 +1,76 @@ +. + */ + +namespace App\Hydrator\Strategy; + +use Doctrine\Common\Collections\Collection; +use LogicException; +use Doctrine\Common\Collections\ArrayCollection; + +/** + * When this strategy is used for Collections, if the new collection does not contain elements that are present in + * the original collection, then this strategy remove elements from the original collection. For instance, if the + * collection initially contains elements A and B, and that the new collection contains elements B and C, then the + * final collection will contain elements B and C (while element A will be asked to be removed). + * + * This strategy is by value, this means it will use the public API (in this case, adder and remover) + * + * @license MIT + * @link http://www.doctrine-project.org/ + * @since 0.7.0 + * @author Michael Gallego + */ +class AllowRemoveByValue extends AbstractCollectionStrategy +{ + /** + * {@inheritDoc} + */ + public function hydrate($value) + { + // AllowRemove strategy need "adder" and "remover" + $adder = 'add' . ucfirst($this->collectionName); + $remover = 'remove' . ucfirst($this->collectionName); + + if (!method_exists($this->object, $adder) || !method_exists($this->object, $remover)) { + throw new LogicException( + sprintf( + 'AllowRemove strategy for DoctrineModule hydrator requires both %s and %s to be defined in %s + entity domain code, but one or both seem to be missing', + $adder, + $remover, + get_class($this->object) + ) + ); + } + + $collection = $this->getCollectionFromObjectByValue(); + + if ($collection instanceof Collection) { + $collection = $collection->toArray(); + } + + $toAdd = new ArrayCollection(array_udiff($value, $collection, [$this, 'compareObjects'])); + $toRemove = new ArrayCollection(array_udiff($collection, $value, [$this, 'compareObjects'])); + + $this->object->$adder($toAdd); + $this->object->$remover($toRemove); + + return $collection; + } +} diff --git a/src/App/Hydrator/Strategy/DisallowRemoveByReference.php b/src/App/Hydrator/Strategy/DisallowRemoveByReference.php new file mode 100644 index 0000000..e1cbb41 --- /dev/null +++ b/src/App/Hydrator/Strategy/DisallowRemoveByReference.php @@ -0,0 +1,53 @@ +. + */ + +namespace App\Hydrator\Strategy; + +/** + * When this strategy is used for Collections, if the new collection does not contain elements that are present in + * the original collection, then this strategy will not remove those elements. At most, it will add new elements. For + * instance, if the collection initially contains elements A and B, and that the new collection contains elements B + * and C, then the final collection will contain elements A, B and C. + * + * This strategy is by reference, this means it won't use the public API to remove elements + * + * @license MIT + * @link http://www.doctrine-project.org/ + * @since 0.7.0 + * @author Michael Gallego + */ +class DisallowRemoveByReference extends AbstractCollectionStrategy +{ + /** + * {@inheritDoc} + */ + public function hydrate($value) + { + $collection = $this->getCollectionFromObjectByReference(); + $collectionArray = $collection->toArray(); + + $toAdd = array_udiff($value, $collectionArray, [$this, 'compareObjects']); + + foreach ($toAdd as $element) { + $collection->add($element); + } + + return $collection; + } +} diff --git a/src/App/Hydrator/Strategy/DisallowRemoveByValue.php b/src/App/Hydrator/Strategy/DisallowRemoveByValue.php new file mode 100644 index 0000000..6f2bbcc --- /dev/null +++ b/src/App/Hydrator/Strategy/DisallowRemoveByValue.php @@ -0,0 +1,72 @@ +. + */ + +namespace App\Hydrator\Strategy; + +use Doctrine\Common\Collections\Collection; +use LogicException; +use Doctrine\Common\Collections\ArrayCollection; + +/** + * When this strategy is used for Collections, if the new collection does not contain elements that are present in + * the original collection, then this strategy will not remove those elements. At most, it will add new elements. For + * instance, if the collection initially contains elements A and B, and that the new collection contains elements B + * and C, then the final collection will contain elements A, B and C. + * + * This strategy is by value, this means it will use the public API (in this case, remover) + * + * @license MIT + * @link http://www.doctrine-project.org/ + * @since 0.7.0 + * @author Michael Gallego + */ +class DisallowRemoveByValue extends AbstractCollectionStrategy +{ + /** + * {@inheritDoc} + */ + public function hydrate($value) + { + // AllowRemove strategy need "adder" + $adder = 'add' . ucfirst($this->collectionName); + + if (!method_exists($this->object, $adder)) { + throw new LogicException( + sprintf( + 'DisallowRemove strategy for DoctrineModule hydrator requires %s to + be defined in %s entity domain code, but it seems to be missing', + $adder, + get_class($this->object) + ) + ); + } + + $collection = $this->getCollectionFromObjectByValue(); + + if ($collection instanceof Collection) { + $collection = $collection->toArray(); + } + + $toAdd = new ArrayCollection(array_udiff($value, $collection, [$this, 'compareObjects'])); + + $this->object->$adder($toAdd); + + return $collection; + } +} diff --git a/src/App/Middleware/PreFlightMiddleware.php b/src/App/Middleware/PreFlightMiddleware.php new file mode 100644 index 0000000..3f8736e --- /dev/null +++ b/src/App/Middleware/PreFlightMiddleware.php @@ -0,0 +1,22 @@ +getMethod()); + if ($requestMethod == 'OPTIONS') { + return $response + ->withHeader('Accept', 'OPTIONS,GET,POST,PUT,PATCH,DELETE') + ->withHeader('Access-Control-Allow-Origin', '*') + ->withHeader('Access-Control-Allow-Methods', 'OPTIONS,GET,POST,PUT,PATCH,DELETE') + ->withHeader('Access-Control-Allow-Headers', 'DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Authorization'); + } + return $next($request, $response); + } +} diff --git a/src/App/Response/JsonCorsResponse.php b/src/App/Response/JsonCorsResponse.php new file mode 100644 index 0000000..e556627 --- /dev/null +++ b/src/App/Response/JsonCorsResponse.php @@ -0,0 +1,19 @@ +em = $em; + $this->hydrator = $hydrator; + } + + /** + * @return array + */ + public function getList() + { + $qb = $this->em->createQueryBuilder(); + $result = $qb->select('c', 'i') + ->from(CiConfig::class, 'c') + ->leftJoin('c.configItems', 'i') + ->getQuery() + ->getArrayResult(); + return $result; + } + + /** + * @param int $id + * @return bool|object + */ + public function get(int $id) + { + $qb = $this->em->createQueryBuilder(); + try { + $result = $qb->select('c', 'i') + ->from(CiConfig::class, 'c') + ->leftJoin('c.configItems', 'i') + ->where('c.id = :id') + ->setParameter('id', $id) + ->getQuery() + ->getSingleResult(); + } catch (NoResultException $ex) { + return false; + } + return $result; + } + + /** + * @param $data + * @return mixed + */ + public function create(array $data) + { + $entity = new CiConfig(); + $entity = $this->hydrator->hydrate($data, $entity); + $this->em->persist($entity); + $this->em->flush(); + return $data; + } + + /** + * @param int $id + * @param array $data + * @return mixed + */ + public function update(int $id, array $data) + { + if(null === ($entity = $this->em->find(CiConfig::class, $id))) { + return false; + } + $this->hydrator->hydrate($data, $entity); + $this->em->flush(); + return $data; + } + + /** + * @param int $id + * @return bool + */ + public function delete(int $id) + { + $entity = $this->em->find(CiConfig::class, $id); + $this->em->remove($entity); + $this->em->flush(); + return true; + } + + /** + * @param int $id + * @return bool + */ + public function deleteItem(int $id) + { + $entity = $this->em->find(CiConfigItem::class, $id); + $this->em->remove($entity); + $this->em->flush(); + return true; + } +} diff --git a/src/App/Service/CiConfigServiceFactory.php b/src/App/Service/CiConfigServiceFactory.php new file mode 100644 index 0000000..61432bf --- /dev/null +++ b/src/App/Service/CiConfigServiceFactory.php @@ -0,0 +1,15 @@ +get('doctrine.entity_manager.orm_default'); + $hydrator = $container->get('doctrine.hydrator'); + return new CiConfigService($em, $hydrator); + } +} diff --git a/templates/.gitkeep b/templates/.gitkeep new file mode 100644 index 0000000..e69de29 diff --git a/test/AppTest/Action/HomePageActionTest.php b/test/AppTest/Action/HomePageActionTest.php new file mode 100644 index 0000000..3a083c7 --- /dev/null +++ b/test/AppTest/Action/HomePageActionTest.php @@ -0,0 +1,28 @@ +router = $this->prophesize(RouterInterface::class); + } + + public function testResponse() + { + $homePage = new HomePageAction($this->router->reveal(), null); + $response = $homePage(new ServerRequest(['/']), new Response(), function () { + }); + + $this->assertTrue($response instanceof Response); + } +} diff --git a/test/AppTest/Action/HomePageFactoryTest.php b/test/AppTest/Action/HomePageFactoryTest.php new file mode 100644 index 0000000..3a98fcd --- /dev/null +++ b/test/AppTest/Action/HomePageFactoryTest.php @@ -0,0 +1,50 @@ +container = $this->prophesize(ContainerInterface::class); + $router = $this->prophesize(RouterInterface::class); + + $this->container->get(RouterInterface::class)->willReturn($router); + } + + public function testFactoryWithoutTemplate() + { + $factory = new HomePageFactory(); + $this->container->has(TemplateRendererInterface::class)->willReturn(false); + + $this->assertTrue($factory instanceof HomePageFactory); + + $homePage = $factory($this->container->reveal()); + + $this->assertTrue($homePage instanceof HomePageAction); + } + + public function testFactoryWithTemplate() + { + $factory = new HomePageFactory(); + $this->container->has(TemplateRendererInterface::class)->willReturn(true); + $this->container + ->get(TemplateRendererInterface::class) + ->willReturn($this->prophesize(TemplateRendererInterface::class)); + + $this->assertTrue($factory instanceof HomePageFactory); + + $homePage = $factory($this->container->reveal()); + + $this->assertTrue($homePage instanceof HomePageAction); + } +} diff --git a/test/AppTest/Action/PingActionTest.php b/test/AppTest/Action/PingActionTest.php new file mode 100644 index 0000000..d0911f5 --- /dev/null +++ b/test/AppTest/Action/PingActionTest.php @@ -0,0 +1,22 @@ +getBody()); + + $this->assertTrue($response instanceof Response); + $this->assertTrue($response instanceof Response\JsonResponse); + $this->assertTrue(isset($json->ack)); + } +}