From 693e3d73d638c9a4324d01f48156cb180f8f1486 Mon Sep 17 00:00:00 2001 From: lucaszz Date: Mon, 2 Nov 2015 21:49:53 +0100 Subject: [PATCH 01/18] composer.lock - removed --- composer.lock | 2073 ------------------------------------------------- 1 file changed, 2073 deletions(-) delete mode 100644 composer.lock diff --git a/composer.lock b/composer.lock deleted file mode 100644 index fe1e0c0..0000000 --- a/composer.lock +++ /dev/null @@ -1,2073 +0,0 @@ -{ - "_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" - ], - "hash": "650c7b2c2c65a8f9b6d2bae779cf71ec", - "content-hash": "f2912ce44973a657dd2a4c1aac63145a", - "packages": [ - { - "name": "beberlei/assert", - "version": "v2.4", - "source": { - "type": "git", - "url": "https://github.com/beberlei/assert.git", - "reference": "7281b1fd8118b31cb9162c2fb5a4cc6f01d62ed6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/beberlei/assert/zipball/7281b1fd8118b31cb9162c2fb5a4cc6f01d62ed6", - "reference": "7281b1fd8118b31cb9162c2fb5a4cc6f01d62ed6", - "shasum": "" - }, - "require": { - "ext-mbstring": "*", - "php": ">=5.3" - }, - "require-dev": { - "phpunit/phpunit": "@stable" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.3-dev" - } - }, - "autoload": { - "psr-0": { - "Assert": "lib/" - }, - "files": [ - "lib/Assert/functions.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-2-Clause" - ], - "authors": [ - { - "name": "Benjamin Eberlei", - "email": "kontakt@beberlei.de" - } - ], - "description": "Thin assertion library for input validation in business models.", - "keywords": [ - "assert", - "assertion", - "validation" - ], - "time": "2015-08-21 16:50:17" - }, - { - "name": "clearcodehq/command-bus-launcher", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/JacekJagiello/command-bus-launcher.git", - "reference": "6eb511ca24af795542839da4e13a36adf25d88f1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/JacekJagiello/command-bus-launcher/zipball/6eb511ca24af795542839da4e13a36adf25d88f1", - "reference": "6eb511ca24af795542839da4e13a36adf25d88f1", - "shasum": "" - }, - "require": { - "beberlei/assert": "~2.4", - "mathiasverraes/money": "~1.2", - "nesbot/carbon": "1.*", - "ramsey/uuid": "~3.0", - "simple-bus/message-bus": "~2.0" - }, - "require-dev": { - "phpunit/phpunit": "~5.0" - }, - "type": "library", - "autoload": { - "psr-4": { - "ClearcodeHQ\\CommandBusLauncher\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Clearcode", - "email": "dev@clearcode.cc" - } - ], - "description": "Console command to run commands of command bus", - "time": "2015-10-26 16:10:16" - }, - { - "name": "doctrine/annotations", - "version": "v1.2.7", - "source": { - "type": "git", - "url": "https://github.com/doctrine/annotations.git", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/f25c8aab83e0c3e976fd7d19875f198ccf2f7535", - "reference": "f25c8aab83e0c3e976fd7d19875f198ccf2f7535", - "shasum": "" - }, - "require": { - "doctrine/lexer": "1.*", - "php": ">=5.3.2" - }, - "require-dev": { - "doctrine/cache": "1.*", - "phpunit/phpunit": "4.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Annotations\\": "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": "Docblock Annotations Parser", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "docblock", - "parser" - ], - "time": "2015-08-31 12:32:49" - }, - { - "name": "doctrine/cache", - "version": "v1.4.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/cache.git", - "reference": "8c434000f420ade76a07c64cbe08ca47e5c101ca" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/8c434000f420ade76a07c64cbe08ca47e5c101ca", - "reference": "8c434000f420ade76a07c64cbe08ca47e5c101ca", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "conflict": { - "doctrine/common": ">2.2,<2.4" - }, - "require-dev": { - "phpunit/phpunit": ">=3.7", - "predis/predis": "~1.0", - "satooshi/php-coveralls": "~0.6" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.5.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\Cache\\": "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": "Caching library offering an object-oriented API for many cache backends", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "cache", - "caching" - ], - "time": "2015-08-31 12:36:41" - }, - { - "name": "doctrine/collections", - "version": "v1.3.0", - "source": { - "type": "git", - "url": "https://github.com/doctrine/collections.git", - "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/6c1e4eef75f310ea1b3e30945e9f06e652128b8a", - "reference": "6c1e4eef75f310ea1b3e30945e9f06e652128b8a", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.2.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": "2015-04-14 22:21:58" - }, - { - "name": "doctrine/common", - "version": "v2.5.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/common.git", - "reference": "0009b8f0d4a917aabc971fb089eba80e872f83f9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/0009b8f0d4a917aabc971fb089eba80e872f83f9", - "reference": "0009b8f0d4a917aabc971fb089eba80e872f83f9", - "shasum": "" - }, - "require": { - "doctrine/annotations": "1.*", - "doctrine/cache": "1.*", - "doctrine/collections": "1.*", - "doctrine/inflector": "1.*", - "doctrine/lexer": "1.*", - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "~3.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6.x-dev" - } - }, - "autoload": { - "psr-0": { - "Doctrine\\Common\\": "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 Library for Doctrine projects", - "homepage": "http://www.doctrine-project.org", - "keywords": [ - "annotations", - "collections", - "eventmanager", - "persistence", - "spl" - ], - "time": "2015-08-31 13:00:22" - }, - { - "name": "doctrine/inflector", - "version": "v1.0.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/inflector.git", - "reference": "0bcb2e79d8571787f18b7eb036ed3d004908e604" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/0bcb2e79d8571787f18b7eb036ed3d004908e604", - "reference": "0bcb2e79d8571787f18b7eb036ed3d004908e604", - "shasum": "" - }, - "require": { - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "4.*" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.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": "2014-12-20 21:24:13" - }, - { - "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-09 13:34:57" - }, - { - "name": "mathiasverraes/money", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/mathiasverraes/money.git", - "reference": "b9e258119041fed20e4704f72e3ebb94ed10bea2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/mathiasverraes/money/zipball/b9e258119041fed20e4704f72e3ebb94ed10bea2", - "reference": "b9e258119041fed20e4704f72e3ebb94ed10bea2", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*" - }, - "suggest": { - "Sylius/SyliusMoneyBundle": "Sylius' Symfony2 integration with Money library", - "TheBigBrainsCompany/TbbcMoneyBundle": "Very complete Symfony2 bundle with support for Twig, Doctrine, Forms, ...", - "pink-tie/money-bundle": "Pink-Tie's Symfony2 integration with Money library" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3.x-dev" - } - }, - "autoload": { - "psr-0": { - "Money": "lib" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mathias Verraes", - "email": "mathias@verraes.net" - } - ], - "description": "PHP implementation of Fowler's Money pattern", - "homepage": "http://verraes.net/2011/04/fowler-money-pattern-in-php/", - "keywords": [ - "Generic Sub-domain", - "Value Object", - "money" - ], - "time": "2014-10-07 12:54:10" - }, - { - "name": "nesbot/carbon", - "version": "1.20.0", - "source": { - "type": "git", - "url": "https://github.com/briannesbitt/Carbon.git", - "reference": "bfd3eaba109c9a2405c92174c8e17f20c2b9caf3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/briannesbitt/Carbon/zipball/bfd3eaba109c9a2405c92174c8e17f20c2b9caf3", - "reference": "bfd3eaba109c9a2405c92174c8e17f20c2b9caf3", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "symfony/translation": "~2.6|~3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "type": "library", - "autoload": { - "psr-0": { - "Carbon": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brian Nesbitt", - "email": "brian@nesbot.com", - "homepage": "http://nesbot.com" - } - ], - "description": "A simple API extension for DateTime.", - "homepage": "http://carbon.nesbot.com", - "keywords": [ - "date", - "datetime", - "time" - ], - "time": "2015-06-25 04:19:39" - }, - { - "name": "psr/log", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/fe0936ee26643249e916849d48e3a51d5f5e278b", - "reference": "fe0936ee26643249e916849d48e3a51d5f5e278b", - "shasum": "" - }, - "type": "library", - "autoload": { - "psr-0": { - "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", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2012-12-21 11:40:51" - }, - { - "name": "ramsey/uuid", - "version": "3.0.1", - "source": { - "type": "git", - "url": "https://github.com/ramsey/uuid.git", - "reference": "3c84b9e2965a5fa666dec8617a3a66a8179c6ca8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/ramsey/uuid/zipball/3c84b9e2965a5fa666dec8617a3a66a8179c6ca8", - "reference": "3c84b9e2965a5fa666dec8617a3a66a8179c6ca8", - "shasum": "" - }, - "require": { - "php": ">=5.4" - }, - "replace": { - "rhumsaa/uuid": "self.version" - }, - "require-dev": { - "apigen/apigen": "^4.1", - "ircmaxell/random-lib": "^1.1", - "jakub-onderka/php-parallel-lint": "^0.9.0", - "moontoast/math": "^1.1", - "phpunit/phpunit": "^4.7", - "satooshi/php-coveralls": "^0.6.1", - "squizlabs/php_codesniffer": "^2.3" - }, - "suggest": { - "ext-uuid": "Provides the PECL UUID extension for use with the PeclUuidTimeGenerator and PeclUuidRandomGenerator", - "ircmaxell/random-lib": "Provides RandomLib for use with the RandomLibAdapter", - "moontoast/math": "Provides support for converting UUID to 128-bit integer (in string form).", - "ramsey/uuid-console": "A console application for generating UUIDs with ramsey/uuid", - "ramsey/uuid-doctrine": "Allows the use of Ramsey\\Uuid\\Uuid as Doctrine field type." - }, - "type": "library", - "autoload": { - "psr-4": { - "Ramsey\\Uuid\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Marijn Huizendveld", - "email": "marijn.huizendveld@gmail.com" - }, - { - "name": "Thibaud Fabre", - "email": "thibaud@aztech.io" - }, - { - "name": "Ben Ramsey", - "email": "ben@benramsey.com", - "homepage": "https://benramsey.com" - } - ], - "description": "Formerly rhumsaa/uuid. A PHP 5.4+ library for generating RFC 4122 version 1, 3, 4, and 5 universally unique identifiers (UUID).", - "homepage": "https://github.com/ramsey/uuid", - "keywords": [ - "guid", - "identifier", - "uuid" - ], - "time": "2015-10-21 16:27:25" - }, - { - "name": "simple-bus/message-bus", - "version": "v2.2.0", - "source": { - "type": "git", - "url": "https://github.com/SimpleBus/MessageBus.git", - "reference": "757e1027c60d86cdf031200da7755d6015ad9c64" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/SimpleBus/MessageBus/zipball/757e1027c60d86cdf031200da7755d6015ad9c64", - "reference": "757e1027c60d86cdf031200da7755d6015ad9c64", - "shasum": "" - }, - "require": { - "beberlei/assert": "~2.0", - "php": ">=5.4", - "psr/log": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "~0.6" - }, - "type": "library", - "autoload": { - "psr-4": { - "SimpleBus\\Message\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthias Noback", - "email": "matthiasnoback@gmail.com", - "homepage": "http://php-and-symfony.matthiasnoback.nl" - } - ], - "description": "Generic classes and interfaces for messages and message buses", - "homepage": "http://github.com/SimpleBus/MessageBus", - "keywords": [ - "command bus", - "event bus", - "message", - "message bus" - ], - "time": "2015-07-29 09:33:21" - }, - { - "name": "simple-bus/symfony-bridge", - "version": "v4.1.1", - "source": { - "type": "git", - "url": "https://github.com/SimpleBus/SymfonyBridge.git", - "reference": "e41b92fc1c977412b9a91b0606c25af998cdf0a3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/SimpleBus/SymfonyBridge/zipball/e41b92fc1c977412b9a91b0606c25af998cdf0a3", - "reference": "e41b92fc1c977412b9a91b0606c25af998cdf0a3", - "shasum": "" - }, - "require": { - "php": ">=5.4", - "simple-bus/message-bus": "~2.0", - "symfony/dependency-injection": "~2.3|~3.0", - "symfony/http-kernel": "~2.3|~3.0", - "symfony/yaml": "~2.3|~3.0" - }, - "require-dev": { - "doctrine/doctrine-bundle": "~1.0", - "doctrine/orm": "~2.3", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "~0.6", - "simple-bus/doctrine-orm-bridge": "~4.0", - "symfony/monolog-bundle": "~2.3|~3.0" - }, - "suggest": { - "doctrine/doctrine-bundle": "For integration with Doctrine ORM", - "doctrine/orm": "For integration with Doctrine ORM", - "simple-bus/doctrine-orm-bridge": "For integration with Doctrine ORM", - "symfony/monolog-bundle": "For logging messages" - }, - "type": "library", - "autoload": { - "psr-4": { - "SimpleBus\\SymfonyBridge\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Matthias Noback", - "email": "matthiasnoback@gmail.com", - "homepage": "http://php-and-symfony.matthiasnoback.nl" - } - ], - "description": "Bridge for using command buses and event buses in Symfony projects", - "homepage": "http://github.com/SimpleBus/SymfonyBridge", - "keywords": [ - "command bus", - "doctrine", - "event bus", - "symfony" - ], - "time": "2015-08-23 11:37:08" - }, - { - "name": "symfony/symfony", - "version": "v2.7.5", - "source": { - "type": "git", - "url": "https://github.com/symfony/symfony.git", - "reference": "619528a274647cffc1792063c3ea04c4fa8266a0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/symfony/zipball/619528a274647cffc1792063c3ea04c4fa8266a0", - "reference": "619528a274647cffc1792063c3ea04c4fa8266a0", - "shasum": "" - }, - "require": { - "doctrine/common": "~2.4", - "php": ">=5.3.9", - "psr/log": "~1.0", - "twig/twig": "~1.20|~2.0" - }, - "replace": { - "symfony/asset": "self.version", - "symfony/browser-kit": "self.version", - "symfony/class-loader": "self.version", - "symfony/config": "self.version", - "symfony/console": "self.version", - "symfony/css-selector": "self.version", - "symfony/debug": "self.version", - "symfony/debug-bundle": "self.version", - "symfony/dependency-injection": "self.version", - "symfony/doctrine-bridge": "self.version", - "symfony/dom-crawler": "self.version", - "symfony/event-dispatcher": "self.version", - "symfony/expression-language": "self.version", - "symfony/filesystem": "self.version", - "symfony/finder": "self.version", - "symfony/form": "self.version", - "symfony/framework-bundle": "self.version", - "symfony/http-foundation": "self.version", - "symfony/http-kernel": "self.version", - "symfony/intl": "self.version", - "symfony/locale": "self.version", - "symfony/monolog-bridge": "self.version", - "symfony/options-resolver": "self.version", - "symfony/process": "self.version", - "symfony/property-access": "self.version", - "symfony/proxy-manager-bridge": "self.version", - "symfony/routing": "self.version", - "symfony/security": "self.version", - "symfony/security-acl": "self.version", - "symfony/security-bundle": "self.version", - "symfony/security-core": "self.version", - "symfony/security-csrf": "self.version", - "symfony/security-http": "self.version", - "symfony/serializer": "self.version", - "symfony/stopwatch": "self.version", - "symfony/swiftmailer-bridge": "self.version", - "symfony/templating": "self.version", - "symfony/translation": "self.version", - "symfony/twig-bridge": "self.version", - "symfony/twig-bundle": "self.version", - "symfony/validator": "self.version", - "symfony/var-dumper": "self.version", - "symfony/web-profiler-bundle": "self.version", - "symfony/yaml": "self.version" - }, - "require-dev": { - "doctrine/data-fixtures": "1.0.*", - "doctrine/dbal": "~2.4", - "doctrine/doctrine-bundle": "~1.2", - "doctrine/orm": "~2.4,>=2.4.5", - "egulias/email-validator": "~1.2", - "ircmaxell/password-compat": "~1.0", - "monolog/monolog": "~1.11", - "ocramius/proxy-manager": "~0.4|~1.0", - "symfony/phpunit-bridge": "self.version" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.7-dev" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Bridge\\Doctrine\\": "src/Symfony/Bridge/Doctrine/", - "Symfony\\Bridge\\Monolog\\": "src/Symfony/Bridge/Monolog/", - "Symfony\\Bridge\\ProxyManager\\": "src/Symfony/Bridge/ProxyManager/", - "Symfony\\Bridge\\Swiftmailer\\": "src/Symfony/Bridge/Swiftmailer/", - "Symfony\\Bridge\\Twig\\": "src/Symfony/Bridge/Twig/", - "Symfony\\Bundle\\": "src/Symfony/Bundle/", - "Symfony\\Component\\": "src/Symfony/Component/" - }, - "classmap": [ - "src/Symfony/Component/HttpFoundation/Resources/stubs", - "src/Symfony/Component/Intl/Resources/stubs" - ], - "files": [ - "src/Symfony/Component/Intl/Resources/stubs/functions.php" - ] - }, - "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": "The Symfony PHP framework", - "homepage": "https://symfony.com", - "keywords": [ - "framework" - ], - "time": "2015-09-25 11:16:52" - }, - { - "name": "twig/twig", - "version": "v1.22.3", - "source": { - "type": "git", - "url": "https://github.com/twigphp/Twig.git", - "reference": "ebfc36b7e77b0c1175afe30459cf943010245540" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/ebfc36b7e77b0c1175afe30459cf943010245540", - "reference": "ebfc36b7e77b0c1175afe30459cf943010245540", - "shasum": "" - }, - "require": { - "php": ">=5.2.7" - }, - "require-dev": { - "symfony/debug": "~2.7", - "symfony/phpunit-bridge": "~2.7" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.22-dev" - } - }, - "autoload": { - "psr-0": { - "Twig_": "lib/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Armin Ronacher", - "email": "armin.ronacher@active-4.com", - "role": "Project Founder" - }, - { - "name": "Twig Team", - "homepage": "http://twig.sensiolabs.org/contributors", - "role": "Contributors" - } - ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org", - "keywords": [ - "templating" - ], - "time": "2015-10-13 07:07:02" - } - ], - "packages-dev": [ - { - "name": "doctrine/dbal", - "version": "v2.5.2", - "source": { - "type": "git", - "url": "https://github.com/doctrine/dbal.git", - "reference": "01dbcbc5cd0a913d751418e635434a18a2f2a75c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/dbal/zipball/01dbcbc5cd0a913d751418e635434a18a2f2a75c", - "reference": "01dbcbc5cd0a913d751418e635434a18a2f2a75c", - "shasum": "" - }, - "require": { - "doctrine/common": ">=2.4,<2.6-dev", - "php": ">=5.3.2" - }, - "require-dev": { - "phpunit/phpunit": "4.*", - "symfony/console": "2.*" - }, - "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": "2015-09-16 16:29:33" - }, - { - "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-14 21:17:01" - }, - { - "name": "doctrine/orm", - "version": "v2.5.1", - "source": { - "type": "git", - "url": "https://github.com/doctrine/doctrine2.git", - "reference": "e6a83bedbe67579cb0bfb688e982e617943a2945" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/e6a83bedbe67579cb0bfb688e982e617943a2945", - "reference": "e6a83bedbe67579cb0bfb688e982e617943a2945", - "shasum": "" - }, - "require": { - "doctrine/cache": "~1.4", - "doctrine/collections": "~1.2", - "doctrine/common": ">=2.5-dev,<2.6-dev", - "doctrine/dbal": ">=2.5-dev,<2.6-dev", - "doctrine/instantiator": "~1.0.1", - "ext-pdo": "*", - "php": ">=5.4", - "symfony/console": "~2.5" - }, - "require-dev": { - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "dev-master", - "symfony/yaml": "~2.1" - }, - "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": "2015-08-31 12:59:39" - }, - { - "name": "phpdocumentor/reflection-docblock", - "version": "2.0.4", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/d68dbdc53dc358a816f00b300704702b2eaff7b8", - "reference": "d68dbdc53dc358a816f00b300704702b2eaff7b8", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.0" - }, - "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "phpDocumentor": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Mike van Riel", - "email": "mike.vanriel@naenius.com" - } - ], - "time": "2015-02-03 12:10:50" - }, - { - "name": "phpspec/prophecy", - "version": "v1.5.0", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "reference": "4745ded9307786b730d7a60df5cb5a6c43cf95f7", - "shasum": "" - }, - "require": { - "doctrine/instantiator": "^1.0.2", - "phpdocumentor/reflection-docblock": "~2.0", - "sebastian/comparator": "~1.1" - }, - "require-dev": { - "phpspec/phpspec": "~2.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.4.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": "2015-08-13 10:07:40" - }, - { - "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-06 15:47:00" - }, - { - "name": "phpunit/php-file-iterator", - "version": "1.4.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "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": "2015-06-21 13:08:43" - }, - { - "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-21 13:50:34" - }, - { - "name": "phpunit/php-timer", - "version": "1.0.7", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b", - "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": "sb@sebastian-bergmann.de", - "role": "lead" - } - ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2015-06-21 08:01:12" - }, - { - "name": "phpunit/php-token-stream", - "version": "1.4.8", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da", - "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": "2015-09-15 10:49:45" - }, - { - "name": "phpunit/phpunit", - "version": "4.8.16", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "625f8c345606ed0f3a141dfb88f4116f0e22978e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/625f8c345606ed0f3a141dfb88f4116f0e22978e", - "reference": "625f8c345606ed0f3a141dfb88f4116f0e22978e", - "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.1", - "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": "2015-10-23 06:48:33" - }, - { - "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-02 06:51:40" - }, - { - "name": "sebastian/comparator", - "version": "1.2.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22", - "reference": "937efb279bd37a375bcadf584dec0726f84dbf22", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/diff": "~1.2", - "sebastian/exporter": "~1.2" - }, - "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": "2015-07-26 15:48:44" - }, - { - "name": "sebastian/diff", - "version": "1.3.0", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", - "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-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": "http://www.github.com/sebastianbergmann/diff", - "keywords": [ - "diff" - ], - "time": "2015-02-22 15:13:53" - }, - { - "name": "sebastian/environment", - "version": "1.3.2", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44", - "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "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": "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": "2015-08-03 06:14:51" - }, - { - "name": "sebastian/exporter", - "version": "1.2.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e", - "reference": "7ae5513327cb536431847bcc0c10edba2701064e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/recursion-context": "~1.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" - }, - { - "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": "2015-06-21 07:55:53" - }, - { - "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-12 03:26:01" - }, - { - "name": "sebastian/recursion-context", - "version": "1.0.1", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba", - "reference": "994d4a811bafe801fb06dccbee797863ba2792ba", - "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-06-21 08:04:50" - }, - { - "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-21 13:59:46" - } - ], - "aliases": [], - "minimum-stability": "stable", - "stability-flags": { - "clearcodehq/command-bus-launcher": 20 - }, - "prefer-stable": false, - "prefer-lowest": false, - "platform": { - "php": ">=5.4" - }, - "platform-dev": [] -} From de3b6a6f233a9bdd8888ddacb99cdbcdf11caab4 Mon Sep 17 00:00:00 2001 From: lucaszz Date: Mon, 2 Nov 2015 22:06:25 +0100 Subject: [PATCH 02/18] composer.json - dependencies simplification --- composer.json | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index f8242c4..e22157b 100644 --- a/composer.json +++ b/composer.json @@ -15,15 +15,12 @@ "clearcodehq/command-bus-launcher": "dev-master" }, "require-dev": { - "phpunit/phpunit": "~4.0", - "doctrine/orm": "~2.3", - "symfony/symfony": "~2.7", - "symfony/browser-kit": "~2.7" + "phpunit/phpunit": "~4.0" }, "autoload": { - "psr-4" : { "ClearcodeHQ\\CommandBusLauncherBundle\\": "src/" } + "psr-4" : { "ClearcodeHQ\\CommandBusLauncherBundle\\": "src" } }, "autoload-dev": { - "psr-4" : { "tests\\ClearcodeHQ\\CommandBusLauncherBundle\\" : "tests/" } + "psr-4" : { "tests\\ClearcodeHQ\\CommandBusLauncherBundle\\" : "tests" } } } From 2f4abe491cf1b501489a99db464aa661bc7fb914 Mon Sep 17 00:00:00 2001 From: lucaszz Date: Mon, 2 Nov 2015 22:08:36 +0100 Subject: [PATCH 03/18] phpunit.xml => phpunit.xml.dist --- phpunit.xml => phpunit.xml.dist | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename phpunit.xml => phpunit.xml.dist (100%) diff --git a/phpunit.xml b/phpunit.xml.dist similarity index 100% rename from phpunit.xml rename to phpunit.xml.dist From d5c278cb836aa1a0c8e90ac1262b0800c07868f5 Mon Sep 17 00:00:00 2001 From: lucaszz Date: Mon, 2 Nov 2015 22:22:06 +0100 Subject: [PATCH 04/18] travis CI configuration --- .travis.yml | 30 ++++++++++++++++++++++++++++++ composer.json | 3 ++- 2 files changed, 32 insertions(+), 1 deletion(-) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..24e3bd0 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,30 @@ +language: php + +php: + - 5.4 + - 5.5 + - 5.6 + - 7.0 + +matrix: + include: + - php: 5.6 + env: SYMFONY_VERSION="2.3.*" + - php: 5.6 + env: SYMFONY_VERSION="2.4.*" + - php: 5.6 + env: SYMFONY_VERSION="2.5.*" + - php: 5.6 + env: SYMFONY_VERSION="2.6.*" + - php: 5.6 + env: SYMFONY_VERSION="2.7.*" + +before_install: + - composer self-update + - if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/http-kernel:$SYMFONY_VERSION symfony/dependency-injection:$SYMFONY_VERSION; fi + +install: + - composer update --prefer-dist + +script: +- ./vendor/bin/phpunit --configuration phpunit.xml.dist --testsuite tests \ No newline at end of file diff --git a/composer.json b/composer.json index e22157b..81aa92a 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,8 @@ "clearcodehq/command-bus-launcher": "dev-master" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.0", + "doctrine/orm": "~2.3" }, "autoload": { "psr-4" : { "ClearcodeHQ\\CommandBusLauncherBundle\\": "src" } From 01c007a2c3508646dbe346a7deff62c14ea6901f Mon Sep 17 00:00:00 2001 From: lucaszz Date: Mon, 2 Nov 2015 22:48:57 +0100 Subject: [PATCH 05/18] CLI Test Case simplification --- .travis.yml | 2 +- composer.json | 3 ++- tests/CLITestCase.php | 55 +++++++++++++------------------------------ 3 files changed, 20 insertions(+), 40 deletions(-) diff --git a/.travis.yml b/.travis.yml index 24e3bd0..24a7ee3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,7 +21,7 @@ matrix: before_install: - composer self-update - - if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/http-kernel:$SYMFONY_VERSION symfony/dependency-injection:$SYMFONY_VERSION; fi + - if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/http-kernel:$SYMFONY_VERSION symfony/dependency-injection:$SYMFONY_VERSION symfony/framework-bundle:$SYMFONY_VERSION; fi install: - composer update --prefer-dist diff --git a/composer.json b/composer.json index 81aa92a..270cca9 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,8 @@ "require": { "php": ">=5.4", "simple-bus/symfony-bridge": "^4.1", - "clearcodehq/command-bus-launcher": "dev-master" + "clearcodehq/command-bus-launcher": "dev-master", + "symfony/framework-bundle": "~2.3" }, "require-dev": { "phpunit/phpunit": "~4.0", diff --git a/tests/CLITestCase.php b/tests/CLITestCase.php index 34ef744..cb6c8b5 100644 --- a/tests/CLITestCase.php +++ b/tests/CLITestCase.php @@ -2,79 +2,58 @@ namespace tests\ClearcodeHQ\CommandBusLauncherBundle; -use Symfony\Bundle\FrameworkBundle\Client; use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Input\StringInput; use Symfony\Component\Console\Output\StreamOutput; -use Symfony\Component\DependencyInjection\ContainerInterface; use Symfony\Component\Console\Tester\CommandTester; +use Symfony\Component\HttpKernel\KernelInterface; abstract class CLITestCase extends WebTestCase { - /** @var Client */ - private $client; - - /** @var ContainerInterface */ - private $container; - /** {@inheritdoc} */ public static function getKernelClass() { include_once __DIR__ . '/App/TestKernel.php'; - return 'tests\ClearcodeHQ\CommandBusLauncherBundle\App\TestKernel'; - } - - /** - * @return Client - */ - protected function client() - { - return $this->client; - } - /** - * @return ContainerInterface - */ - protected function container() - { - return $this->container; + return 'tests\ClearcodeHQ\CommandBusLauncherBundle\App\TestKernel'; } - /** - * {@inheritdoc} - */ + /** {@inheritdoc} */ protected function setUp() { - parent::setUp(); - $this->client = $this->createClient(); - $this->container = $this->client->getContainer(); + static::bootKernel(); } - /** - * {@inheritdoc} - */ + /** {@inheritdoc} */ protected function tearDown() { - $this->container = null; - $this->client = null; - parent::tearDown(); } /** * @param Command $command * @param array $parameters + * + * @return int */ protected function executeCommand(Command $command, $parameters = []) { - $application = new Application($this->container()->get('kernel')); + $application = new Application($this->kernel()); $application->add($command); $tester = new CommandTester($command); - $tester->execute($parameters); + return $tester->getStatusCode(); } + + /** + * @return KernelInterface + */ + private function kernel() + { + return self::$kernel; + } } From af33365bf7118fd1a093969568f0928492ce965e Mon Sep 17 00:00:00 2001 From: lucaszz Date: Mon, 2 Nov 2015 23:21:12 +0100 Subject: [PATCH 06/18] Multi version kernel boot --- tests/CLITestCase.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/tests/CLITestCase.php b/tests/CLITestCase.php index cb6c8b5..17952ff 100644 --- a/tests/CLITestCase.php +++ b/tests/CLITestCase.php @@ -23,13 +23,7 @@ public static function getKernelClass() /** {@inheritdoc} */ protected function setUp() { - static::bootKernel(); - } - - /** {@inheritdoc} */ - protected function tearDown() - { - parent::tearDown(); + $this->prepareKernel(); } /** @@ -54,6 +48,16 @@ protected function executeCommand(Command $command, $parameters = []) */ private function kernel() { - return self::$kernel; + return static::$kernel; + } + + private function prepareKernel() + { + if (null !== static::$kernel) { + static::$kernel->shutdown(); + } + + static::$kernel = static::createKernel(); + static::$kernel->boot(); } } From 5a43cad0d5c4087d3482f5fac76cb75e9376e234 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Zakrzewski?= Date: Mon, 2 Nov 2015 23:29:02 +0100 Subject: [PATCH 07/18] More fame. --- README.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..92209b2 --- /dev/null +++ b/README.md @@ -0,0 +1,3 @@ +# CommandBusLauncherBundle + +[![Build Status](https://travis-ci.org/Lucaszz/CommandBusLauncherBundle.svg?branch=improvements%2Ftests)](https://travis-ci.org/Lucaszz/CommandBusLauncherBundle) From 7f9ac5449f02a4b470839bd095b4b1297e5cd5f3 Mon Sep 17 00:00:00 2001 From: lucaszz Date: Mon, 2 Nov 2015 23:40:18 +0100 Subject: [PATCH 08/18] Static analysis --- src/Command/CommandLauncherCommand.php | 7 ++++--- .../CommandBusLauncherExtension.php | 2 +- .../Compiler/CommandHandlersCompilerPass.php | 6 +++--- tests/App/TestKernel.php | 10 +++++----- tests/CLITestCase.php | 6 ++---- tests/Command/CommandLauncherCommandTest.php | 11 ++++------- tests/Mocks/DummyCommand.php | 2 +- tests/Mocks/DummyCommandHandler.php | 4 +++- tests/bootstrap.php | 3 ++- 9 files changed, 25 insertions(+), 26 deletions(-) diff --git a/src/Command/CommandLauncherCommand.php b/src/Command/CommandLauncherCommand.php index 0fa1ead..77f84c6 100644 --- a/src/Command/CommandLauncherCommand.php +++ b/src/Command/CommandLauncherCommand.php @@ -11,7 +11,7 @@ class CommandLauncherCommand extends ContainerAwareCommand { const SUCCESS_CODE = 1; - const ERROR_CODE = 0; + const ERROR_CODE = 0; protected function configure() { @@ -29,7 +29,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $commandLauncher = $this->getContainer()->get('command_bus_launcher.command_launcher'); $commandToLunch = $input->getArgument('commandName'); - $arguments = $input->getArgument('arguments'); + $arguments = $input->getArgument('arguments'); try { $command = $commandLauncher->getCommandToLaunch($commandToLunch, $arguments); @@ -40,6 +40,7 @@ protected function execute(InputInterface $input, OutputInterface $output) } $this->getContainer()->get('command_bus')->handle($command); + return self::SUCCESS_CODE; } -} \ No newline at end of file +} diff --git a/src/DependencyInjection/CommandBusLauncherExtension.php b/src/DependencyInjection/CommandBusLauncherExtension.php index b4fa029..b6a522e 100644 --- a/src/DependencyInjection/CommandBusLauncherExtension.php +++ b/src/DependencyInjection/CommandBusLauncherExtension.php @@ -15,7 +15,7 @@ class CommandBusLauncherExtension extends Extension public function load(array $configs, ContainerBuilder $container) { $configuration = new Configuration(); - $config = $this->processConfiguration($configuration, $configs); + $this->processConfiguration($configuration, $configs); $loader = new Loader\YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); $loader->load('services.yml'); diff --git a/src/DependencyInjection/Compiler/CommandHandlersCompilerPass.php b/src/DependencyInjection/Compiler/CommandHandlersCompilerPass.php index 4e89a99..bc4eec5 100644 --- a/src/DependencyInjection/Compiler/CommandHandlersCompilerPass.php +++ b/src/DependencyInjection/Compiler/CommandHandlersCompilerPass.php @@ -13,11 +13,11 @@ class CommandHandlersCompilerPass implements CompilerPassInterface public function process(ContainerBuilder $container) { $commandHandlersTags = $container->findTaggedServiceIds('command_handler'); - $commandCollector = $container->getDefinition('command_bus_launcher.command_collector'); + $commandCollector = $container->getDefinition('command_bus_launcher.command_collector'); $commands = []; - foreach ($commandHandlersTags as $serviceId => $service) { + foreach ($commandHandlersTags as $service) { foreach ($service as $tags) { $commands[] = $tags['handles']; } @@ -25,4 +25,4 @@ public function process(ContainerBuilder $container) $commandCollector->addMethodCall('processCommandServices', [$commands]); } -} \ No newline at end of file +} diff --git a/tests/App/TestKernel.php b/tests/App/TestKernel.php index c4e1333..c0e6b94 100644 --- a/tests/App/TestKernel.php +++ b/tests/App/TestKernel.php @@ -16,30 +16,30 @@ public function registerBundles() return array( new FrameworkBundle(), new SimpleBusCommandBusBundle(), - new CommandBusLauncherBundle() + new CommandBusLauncherBundle(), ); } /** {@inheritdoc} */ public function getCacheDir() { - return $this->tmpDir() . '/cache'; + return $this->tmpDir().'/cache'; } /** {@inheritdoc} */ public function getLogDir() { - return $this->tmpDir() . '/logs'; + return $this->tmpDir().'/logs'; } /** {@inheritdoc} */ public function registerContainerConfiguration(LoaderInterface $loader) { - $loader->load(__DIR__ . '/config.yml'); + $loader->load(__DIR__.'/config.yml'); } private function tmpDir() { return sys_get_temp_dir().'/clearcodehq_command_bus_launcher'; } -} \ No newline at end of file +} diff --git a/tests/CLITestCase.php b/tests/CLITestCase.php index 17952ff..dc3700c 100644 --- a/tests/CLITestCase.php +++ b/tests/CLITestCase.php @@ -5,8 +5,6 @@ use Symfony\Bundle\FrameworkBundle\Console\Application; use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\Console\Command\Command; -use Symfony\Component\Console\Input\StringInput; -use Symfony\Component\Console\Output\StreamOutput; use Symfony\Component\Console\Tester\CommandTester; use Symfony\Component\HttpKernel\KernelInterface; @@ -15,7 +13,7 @@ abstract class CLITestCase extends WebTestCase /** {@inheritdoc} */ public static function getKernelClass() { - include_once __DIR__ . '/App/TestKernel.php'; + include_once __DIR__.'/App/TestKernel.php'; return 'tests\ClearcodeHQ\CommandBusLauncherBundle\App\TestKernel'; } @@ -28,7 +26,7 @@ protected function setUp() /** * @param Command $command - * @param array $parameters + * @param array $parameters * * @return int */ diff --git a/tests/Command/CommandLauncherCommandTest.php b/tests/Command/CommandLauncherCommandTest.php index c769619..938548a 100644 --- a/tests/Command/CommandLauncherCommandTest.php +++ b/tests/Command/CommandLauncherCommandTest.php @@ -2,9 +2,6 @@ namespace tests\Command; -use Symfony\Component\Console\Input\ArrayInput; -use Symfony\Component\Console\Input\StringInput; -use Symfony\Component\Console\Output\NullOutput; use tests\ClearcodeHQ\CommandBusLauncherBundle\CLITestCase; use ClearcodeHQ\CommandBusLauncherBundle\Command\CommandLauncherCommand; @@ -15,9 +12,9 @@ class CommandLauncherCommandTest extends CLITestCase */ public function it_should_execute_command() { - $statusCode = $this->executeCommand(new CommandLauncherCommand(),[ + $statusCode = $this->executeCommand(new CommandLauncherCommand(), [ 'commandName' => 'DummyCommand', - 'arguments' => ['firstArgument'] + 'arguments' => ['firstArgument'], ]); $this->assertEquals($statusCode, CommandLauncherCommand::SUCCESS_CODE); @@ -28,8 +25,8 @@ public function it_should_execute_command() */ public function it_throws_exception_when_command_does_not_exists() { - $statusCode = $this->executeCommand(new CommandLauncherCommand(),[ - 'commandName' => 'NonExistingCommand' + $statusCode = $this->executeCommand(new CommandLauncherCommand(), [ + 'commandName' => 'NonExistingCommand', ]); $this->assertEquals($statusCode, CommandLauncherCommand::ERROR_CODE); diff --git a/tests/Mocks/DummyCommand.php b/tests/Mocks/DummyCommand.php index c6b9f18..f9abe14 100644 --- a/tests/Mocks/DummyCommand.php +++ b/tests/Mocks/DummyCommand.php @@ -13,4 +13,4 @@ public function __construct($paramter1) { $this->paramter1 = $paramter1; } -} \ No newline at end of file +} diff --git a/tests/Mocks/DummyCommandHandler.php b/tests/Mocks/DummyCommandHandler.php index a3eafcb..678c4cf 100644 --- a/tests/Mocks/DummyCommandHandler.php +++ b/tests/Mocks/DummyCommandHandler.php @@ -6,6 +6,8 @@ class DummyCommandHandler { public function handle(DummyCommand $command) { + $command->paramter1; + return; } -} \ No newline at end of file +} diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 7259d6e..808f6ba 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -1,6 +1,7 @@ Date: Mon, 2 Nov 2015 23:47:31 +0100 Subject: [PATCH 09/18] DoctrineORM removed from tests --- composer.json | 6 +++--- tests/bootstrap.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 270cca9..479f10c 100644 --- a/composer.json +++ b/composer.json @@ -13,11 +13,11 @@ "php": ">=5.4", "simple-bus/symfony-bridge": "^4.1", "clearcodehq/command-bus-launcher": "dev-master", - "symfony/framework-bundle": "~2.3" + "symfony/framework-bundle": "~2.3", + "symfony/console": "~2.3" }, "require-dev": { - "phpunit/phpunit": "~4.0", - "doctrine/orm": "~2.3" + "phpunit/phpunit": "~4.0" }, "autoload": { "psr-4" : { "ClearcodeHQ\\CommandBusLauncherBundle\\": "src" } diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 808f6ba..ffdf38f 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -3,5 +3,5 @@ if (!is_file($autoloadFile = __DIR__.'/../vendor/autoload.php')) { throw new \LogicException('Could not find autoload.php in vendor/. Did you run "composer install --dev"?'); } -$loader = include $autoloadFile; -\Doctrine\Common\Annotations\AnnotationRegistry::registerLoader(array($loader, 'loadClass')); + +require $autoloadFile; From 459c8fab0b01d7ee89fb234c8bcd4a53111436ea Mon Sep 17 00:00:00 2001 From: lucaszz Date: Tue, 3 Nov 2015 00:58:49 +0100 Subject: [PATCH 10/18] Tests improvements. --- ...ommand.php => CommandBusLaunchCommand.php} | 31 +++++++--- src/Command/CommandBusListCommand.php | 30 ++++++++++ tests/CLITestCase.php | 34 +++++++---- tests/Command/CommandBusLaunchCommandTest.php | 59 +++++++++++++++++++ tests/Command/CommandBusListCommandTest.php | 18 ++++++ tests/Command/CommandLauncherCommandTest.php | 34 ----------- tests/Mocks/DummyCommand.php | 12 ++-- tests/Mocks/DummyCommandHandler.php | 11 +++- 8 files changed, 170 insertions(+), 59 deletions(-) rename src/Command/{CommandLauncherCommand.php => CommandBusLaunchCommand.php} (58%) create mode 100644 src/Command/CommandBusListCommand.php create mode 100644 tests/Command/CommandBusLaunchCommandTest.php create mode 100644 tests/Command/CommandBusListCommandTest.php delete mode 100644 tests/Command/CommandLauncherCommandTest.php diff --git a/src/Command/CommandLauncherCommand.php b/src/Command/CommandBusLaunchCommand.php similarity index 58% rename from src/Command/CommandLauncherCommand.php rename to src/Command/CommandBusLaunchCommand.php index 77f84c6..db34254 100644 --- a/src/Command/CommandLauncherCommand.php +++ b/src/Command/CommandBusLaunchCommand.php @@ -2,28 +2,27 @@ namespace ClearcodeHQ\CommandBusLauncherBundle\Command; +use ClearcodeHQ\CommandBusLauncher\CommandLauncherException; use Symfony\Bundle\FrameworkBundle\Command\ContainerAwareCommand; use Symfony\Component\Console\Input\InputArgument; use Symfony\Component\Console\Input\InputInterface; use Symfony\Component\Console\Output\OutputInterface; -use ClearcodeHQ\CommandBusLauncher\CommandLauncherException; -class CommandLauncherCommand extends ContainerAwareCommand +class CommandBusLaunchCommand extends ContainerAwareCommand { const SUCCESS_CODE = 1; const ERROR_CODE = 0; protected function configure() { + //@todo add description $this ->setName('command-bus:launch') ->addArgument('commandName', InputArgument::REQUIRED) ->addArgument('arguments', InputArgument::IS_ARRAY); } - /** - * {@inheritdoc} - */ + /** {@inheritdoc} */ protected function execute(InputInterface $input, OutputInterface $output) { $commandLauncher = $this->getContainer()->get('command_bus_launcher.command_launcher'); @@ -34,12 +33,28 @@ protected function execute(InputInterface $input, OutputInterface $output) try { $command = $commandLauncher->getCommandToLaunch($commandToLunch, $arguments); } catch (CommandLauncherException $e) { - $output->writeln($e->getMessage()); + return $this->handleException($output, $e); + } - return self::ERROR_CODE; + try { + $this->getContainer()->get('command_bus')->handle($command); + } catch (\Exception $e) { + return $this->handleException($output, $e); } - $this->getContainer()->get('command_bus')->handle($command); + return $this->handleSuccess($output, $commandToLunch); + } + + private function handleException(OutputInterface $output, \Exception $exception) + { + $output->writeln(sprintf('%s', $exception->getMessage())); + + return self::ERROR_CODE; + } + + private function handleSuccess(OutputInterface $output, $commandToLunch) + { + $output->writeln(sprintf('The %s executed with success.', $commandToLunch)); return self::SUCCESS_CODE; } diff --git a/src/Command/CommandBusListCommand.php b/src/Command/CommandBusListCommand.php new file mode 100644 index 0000000..1341eea --- /dev/null +++ b/src/Command/CommandBusListCommand.php @@ -0,0 +1,30 @@ +setName('command-bus:list'); + } + + /** {@inheritdoc} */ + protected function execute(InputInterface $input, OutputInterface $output) + { + //not implemented yet. + + $output->writeln('Currently available commands....'); + + return self::SUCCESS_CODE; + } +} diff --git a/tests/CLITestCase.php b/tests/CLITestCase.php index dc3700c..e3c581f 100644 --- a/tests/CLITestCase.php +++ b/tests/CLITestCase.php @@ -6,10 +6,14 @@ use Symfony\Bundle\FrameworkBundle\Test\WebTestCase; use Symfony\Component\Console\Command\Command; use Symfony\Component\Console\Tester\CommandTester; -use Symfony\Component\HttpKernel\KernelInterface; abstract class CLITestCase extends WebTestCase { + /** @var int */ + protected $statusCode; + /** @var string */ + protected $display; + /** {@inheritdoc} */ public static function getKernelClass() { @@ -27,26 +31,36 @@ protected function setUp() /** * @param Command $command * @param array $parameters - * - * @return int */ protected function executeCommand(Command $command, $parameters = []) { - $application = new Application($this->kernel()); + $application = new Application(static::$kernel); $application->add($command); $tester = new CommandTester($command); $tester->execute($parameters); - return $tester->getStatusCode(); + $this->display = $tester->getDisplay(); + $this->statusCode = $tester->getStatusCode(); } - /** - * @return KernelInterface - */ - private function kernel() + /** {@inheritdoc} */ + protected function tearDown() + { + $this->display = null; + $this->statusCode = null; + + parent::tearDown(); + } + + protected function assertThatStatusCodeEquals($statusCode) + { + $this->assertEquals($statusCode, $this->statusCode); + } + + protected function assertThatOutputWasDisplayed() { - return static::$kernel; + $this->assertNotEmpty($this->display); } private function prepareKernel() diff --git a/tests/Command/CommandBusLaunchCommandTest.php b/tests/Command/CommandBusLaunchCommandTest.php new file mode 100644 index 0000000..c54d1a5 --- /dev/null +++ b/tests/Command/CommandBusLaunchCommandTest.php @@ -0,0 +1,59 @@ +executeCommand(new CommandBusLaunchCommand(), [ + 'commandName' => 'DummyCommand', + 'arguments' => [DummyCommand::HANDLING_WITH_SUCCESS], + ]); + + $this->assertThatStatusCodeEquals(CommandBusLaunchCommand::SUCCESS_CODE); + $this->assertThatOutputWasDisplayed(); + } + + /** @test */ + public function it_display_an_error_when_command_does_not_exists() + { + $this->executeCommand(new CommandBusLaunchCommand(), [ + 'commandName' => 'NonExistingCommand', + ]); + + $this->assertThatStatusCodeEquals(CommandBusLaunchCommand::ERROR_CODE); + $this->assertThatOutputWasDisplayed(); + } + + /** @test */ + public function it_display_an_error_when_required_arguments_was_not_provided() + { + $this->markTestIncomplete(); + + $this->executeCommand(new CommandBusLaunchCommand(), [ + 'commandName' => 'DummyCommand', + 'arguments' => [], + ]); + + $this->assertThatStatusCodeEquals(CommandBusLaunchCommand::ERROR_CODE); + $this->assertThatOutputWasDisplayed(); + } + + /** @test */ + public function it_display_an_error_when_executing_command_will_fail() + { + $this->executeCommand(new CommandBusLaunchCommand(), [ + 'commandName' => 'DummyCommand', + 'arguments' => [DummyCommand::HANDLING_WITH_FAIL], + ]); + + $this->assertThatStatusCodeEquals(CommandBusLaunchCommand::ERROR_CODE); + $this->assertThatOutputWasDisplayed(); + } +} diff --git a/tests/Command/CommandBusListCommandTest.php b/tests/Command/CommandBusListCommandTest.php new file mode 100644 index 0000000..cb72b95 --- /dev/null +++ b/tests/Command/CommandBusListCommandTest.php @@ -0,0 +1,18 @@ +executeCommand(new CommandBusListCommand()); + + $this->assertThatStatusCodeEquals(CommandBusListCommand::SUCCESS_CODE); + $this->assertThatOutputWasDisplayed(); + } +} diff --git a/tests/Command/CommandLauncherCommandTest.php b/tests/Command/CommandLauncherCommandTest.php deleted file mode 100644 index 938548a..0000000 --- a/tests/Command/CommandLauncherCommandTest.php +++ /dev/null @@ -1,34 +0,0 @@ -executeCommand(new CommandLauncherCommand(), [ - 'commandName' => 'DummyCommand', - 'arguments' => ['firstArgument'], - ]); - - $this->assertEquals($statusCode, CommandLauncherCommand::SUCCESS_CODE); - } - - /** - * @test - */ - public function it_throws_exception_when_command_does_not_exists() - { - $statusCode = $this->executeCommand(new CommandLauncherCommand(), [ - 'commandName' => 'NonExistingCommand', - ]); - - $this->assertEquals($statusCode, CommandLauncherCommand::ERROR_CODE); - } -} diff --git a/tests/Mocks/DummyCommand.php b/tests/Mocks/DummyCommand.php index f9abe14..3ffbd84 100644 --- a/tests/Mocks/DummyCommand.php +++ b/tests/Mocks/DummyCommand.php @@ -4,13 +4,17 @@ class DummyCommand { - public $paramter1; + const HANDLING_WITH_SUCCESS = 'HANDLING_WITH_SUCCESS'; + const HANDLING_WITH_FAIL = 'HANDLING_WITH_FAIL'; + + /** @var string */ + public $argument1; /** - * @param $paramter1 + * @param $argument1 */ - public function __construct($paramter1) + public function __construct($argument1) { - $this->paramter1 = $paramter1; + $this->argument1 = $argument1; } } diff --git a/tests/Mocks/DummyCommandHandler.php b/tests/Mocks/DummyCommandHandler.php index 678c4cf..d83de02 100644 --- a/tests/Mocks/DummyCommandHandler.php +++ b/tests/Mocks/DummyCommandHandler.php @@ -4,10 +4,15 @@ class DummyCommandHandler { + /** + * @param DummyCommand $command + * + * @throws \Exception + */ public function handle(DummyCommand $command) { - $command->paramter1; - - return; + if ($command->argument1 == DummyCommand::HANDLING_WITH_FAIL) { + throw new \Exception('An unexpected error occurred.'); + } } } From 32b8446d0bdf2df5ff9b4a04a502f3642d8a3237 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Men=C5=BCyk?= Date: Fri, 6 Nov 2015 11:13:26 +0100 Subject: [PATCH 11/18] Improved .travis.yml and composer.json --- .travis.yml | 4 ++-- composer.json | 5 ++++- phpunit.xml.dist | 3 +-- tests/CLITestCase.php | 3 +-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 19026ee..ac539f3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -21,10 +21,10 @@ matrix: before_install: - composer self-update - - if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/http-kernel:$SYMFONY_VERSION symfony/dependency-injection:$SYMFONY_VERSION symfony/framework-bundle:$SYMFONY_VERSION; fi + - if [ "$SYMFONY_VERSION" != "" ]; then composer require --no-update symfony/framework-bundle:$SYMFONY_VERSION symfony/console:$SYMFONY_VERSION symfony/dependency-injection:$SYMFONY_VERSION symfony/http-kernel:$SYMFONY_VERSION symfony/config:$SYMFONY_VERSION; fi install: - composer update --prefer-dist script: -- ./vendor/bin/phpunit --configuration phpunit.xml.dist --testsuite tests +- vendor/bin/phpunit diff --git a/composer.json b/composer.json index 479f10c..e3468fa 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,10 @@ "simple-bus/symfony-bridge": "^4.1", "clearcodehq/command-bus-launcher": "dev-master", "symfony/framework-bundle": "~2.3", - "symfony/console": "~2.3" + "symfony/console": "~2.3", + "symfony/dependency-injection": "~2.3", + "symfony/http-kernel": "~2.3", + "symfony/config": "~2.3" }, "require-dev": { "phpunit/phpunit": "~4.0" diff --git a/phpunit.xml.dist b/phpunit.xml.dist index 256ba09..eaf2de3 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -12,10 +12,9 @@ ./ - ./Resources ./tests ./vendor - \ No newline at end of file + diff --git a/tests/CLITestCase.php b/tests/CLITestCase.php index e3c581f..53bbf88 100644 --- a/tests/CLITestCase.php +++ b/tests/CLITestCase.php @@ -38,10 +38,9 @@ protected function executeCommand(Command $command, $parameters = []) $application->add($command); $tester = new CommandTester($command); - $tester->execute($parameters); + $this->statusCode = $tester->execute($parameters); $this->display = $tester->getDisplay(); - $this->statusCode = $tester->getStatusCode(); } /** {@inheritdoc} */ From e6be80da721c22d12120584b988b5919ed322791 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Men=C5=BCyk?= Date: Fri, 6 Nov 2015 11:14:36 +0100 Subject: [PATCH 12/18] Added composer.lock to .gitignore --- .gitignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 9f33dd5..ff7f293 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ vendor/ -.idea/ \ No newline at end of file +composer.lock +.idea/ From aaeedf72417de552569a115a9324a06ab6d90b00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Men=C5=BCyk?= Date: Fri, 6 Nov 2015 15:53:44 +0100 Subject: [PATCH 13/18] Integrated coveralls.io --- .gitignore | 1 + .travis.yml | 5 ++++- README.md | 1 + composer.json | 3 ++- phpunit.xml.dist | 4 ++++ 5 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.gitignore b/.gitignore index ff7f293..9697c8d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ vendor/ composer.lock +build/ .idea/ diff --git a/.travis.yml b/.travis.yml index ac539f3..0e696f2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,4 +27,7 @@ install: - composer update --prefer-dist script: -- vendor/bin/phpunit + - vendor/bin/phpunit + +after_script: + - vendor/bin/coveralls diff --git a/README.md b/README.md index 76b4072..4888acc 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,4 @@ # CommandBusLauncherBundle [![Build Status](https://travis-ci.org/ClearcodeHQ/CommandBusLauncherBundle.svg?branch=master)](https://travis-ci.org/ClearcodeHQ/CommandBusLauncherBundle) +[![Coverage Status](https://coveralls.io/repos/ClearcodeHQ/CommandBusLauncherBundle/badge.svg?branch=master&service=github)](https://coveralls.io/github/ClearcodeHQ/CommandBusLauncherBundle?branch=master) diff --git a/composer.json b/composer.json index e3468fa..716916a 100644 --- a/composer.json +++ b/composer.json @@ -20,7 +20,8 @@ "symfony/config": "~2.3" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "^0.6.1" }, "autoload": { "psr-4" : { "ClearcodeHQ\\CommandBusLauncherBundle\\": "src" } diff --git a/phpunit.xml.dist b/phpunit.xml.dist index eaf2de3..7e32b9c 100644 --- a/phpunit.xml.dist +++ b/phpunit.xml.dist @@ -17,4 +17,8 @@ + + + + From 8116da6d7a2b4641e5b85c08a835c967b8e682f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Men=C5=BCyk?= Date: Fri, 6 Nov 2015 16:16:29 +0100 Subject: [PATCH 14/18] Removed support for PHP 5.4 --- .travis.yml | 1 - composer.json | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0e696f2..ac469bc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,6 @@ language: php php: - - 5.4 - 5.5 - 5.6 - 7.0 diff --git a/composer.json b/composer.json index 716916a..26b9db9 100644 --- a/composer.json +++ b/composer.json @@ -10,7 +10,7 @@ } ], "require": { - "php": ">=5.4", + "php": ">=5.5", "simple-bus/symfony-bridge": "^4.1", "clearcodehq/command-bus-launcher": "dev-master", "symfony/framework-bundle": "~2.3", From 05d7d08dfc6fe3484a51e29271850cf5f9017fe0 Mon Sep 17 00:00:00 2001 From: lucaszz Date: Mon, 9 Nov 2015 16:34:10 +0100 Subject: [PATCH 15/18] CS --- src/Command/CommandBusLaunchCommand.php | 4 ++-- src/Command/CommandBusListCommand.php | 2 +- src/DependencyInjection/CommandBusLauncherExtension.php | 4 ++-- .../Compiler/CommandHandlersCompilerPass.php | 2 +- tests/App/TestKernel.php | 4 ++-- tests/CLITestCase.php | 4 ++-- tests/Command/CommandBusLaunchCommandTest.php | 6 +++--- tests/Mocks/DummyCommand.php | 2 +- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/Command/CommandBusLaunchCommand.php b/src/Command/CommandBusLaunchCommand.php index db34254..6dd51fc 100644 --- a/src/Command/CommandBusLaunchCommand.php +++ b/src/Command/CommandBusLaunchCommand.php @@ -11,7 +11,7 @@ class CommandBusLaunchCommand extends ContainerAwareCommand { const SUCCESS_CODE = 1; - const ERROR_CODE = 0; + const ERROR_CODE = 0; protected function configure() { @@ -28,7 +28,7 @@ protected function execute(InputInterface $input, OutputInterface $output) $commandLauncher = $this->getContainer()->get('command_bus_launcher.command_launcher'); $commandToLunch = $input->getArgument('commandName'); - $arguments = $input->getArgument('arguments'); + $arguments = $input->getArgument('arguments'); try { $command = $commandLauncher->getCommandToLaunch($commandToLunch, $arguments); diff --git a/src/Command/CommandBusListCommand.php b/src/Command/CommandBusListCommand.php index 1341eea..e90f125 100644 --- a/src/Command/CommandBusListCommand.php +++ b/src/Command/CommandBusListCommand.php @@ -9,7 +9,7 @@ class CommandBusListCommand extends ContainerAwareCommand { const SUCCESS_CODE = 1; - const ERROR_CODE = 0; + const ERROR_CODE = 0; protected function configure() { diff --git a/src/DependencyInjection/CommandBusLauncherExtension.php b/src/DependencyInjection/CommandBusLauncherExtension.php index b6a522e..12a64da 100644 --- a/src/DependencyInjection/CommandBusLauncherExtension.php +++ b/src/DependencyInjection/CommandBusLauncherExtension.php @@ -2,10 +2,10 @@ namespace ClearcodeHQ\CommandBusLauncherBundle\DependencyInjection; -use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\Config\FileLocator; -use Symfony\Component\HttpKernel\DependencyInjection\Extension; +use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader; +use Symfony\Component\HttpKernel\DependencyInjection\Extension; class CommandBusLauncherExtension extends Extension { diff --git a/src/DependencyInjection/Compiler/CommandHandlersCompilerPass.php b/src/DependencyInjection/Compiler/CommandHandlersCompilerPass.php index bc4eec5..629ecf7 100644 --- a/src/DependencyInjection/Compiler/CommandHandlersCompilerPass.php +++ b/src/DependencyInjection/Compiler/CommandHandlersCompilerPass.php @@ -13,7 +13,7 @@ class CommandHandlersCompilerPass implements CompilerPassInterface public function process(ContainerBuilder $container) { $commandHandlersTags = $container->findTaggedServiceIds('command_handler'); - $commandCollector = $container->getDefinition('command_bus_launcher.command_collector'); + $commandCollector = $container->getDefinition('command_bus_launcher.command_collector'); $commands = []; diff --git a/tests/App/TestKernel.php b/tests/App/TestKernel.php index c0e6b94..e5ab097 100644 --- a/tests/App/TestKernel.php +++ b/tests/App/TestKernel.php @@ -13,11 +13,11 @@ class TestKernel extends Kernel /** {@inheritdoc} */ public function registerBundles() { - return array( + return [ new FrameworkBundle(), new SimpleBusCommandBusBundle(), new CommandBusLauncherBundle(), - ); + ]; } /** {@inheritdoc} */ diff --git a/tests/CLITestCase.php b/tests/CLITestCase.php index 53bbf88..41f6588 100644 --- a/tests/CLITestCase.php +++ b/tests/CLITestCase.php @@ -37,7 +37,7 @@ protected function executeCommand(Command $command, $parameters = []) $application = new Application(static::$kernel); $application->add($command); - $tester = new CommandTester($command); + $tester = new CommandTester($command); $this->statusCode = $tester->execute($parameters); $this->display = $tester->getDisplay(); @@ -46,7 +46,7 @@ protected function executeCommand(Command $command, $parameters = []) /** {@inheritdoc} */ protected function tearDown() { - $this->display = null; + $this->display = null; $this->statusCode = null; parent::tearDown(); diff --git a/tests/Command/CommandBusLaunchCommandTest.php b/tests/Command/CommandBusLaunchCommandTest.php index c54d1a5..7137b1d 100644 --- a/tests/Command/CommandBusLaunchCommandTest.php +++ b/tests/Command/CommandBusLaunchCommandTest.php @@ -13,7 +13,7 @@ public function it_should_execute_command_with_success() { $this->executeCommand(new CommandBusLaunchCommand(), [ 'commandName' => 'DummyCommand', - 'arguments' => [DummyCommand::HANDLING_WITH_SUCCESS], + 'arguments' => [DummyCommand::HANDLING_WITH_SUCCESS], ]); $this->assertThatStatusCodeEquals(CommandBusLaunchCommand::SUCCESS_CODE); @@ -38,7 +38,7 @@ public function it_display_an_error_when_required_arguments_was_not_provided() $this->executeCommand(new CommandBusLaunchCommand(), [ 'commandName' => 'DummyCommand', - 'arguments' => [], + 'arguments' => [], ]); $this->assertThatStatusCodeEquals(CommandBusLaunchCommand::ERROR_CODE); @@ -50,7 +50,7 @@ public function it_display_an_error_when_executing_command_will_fail() { $this->executeCommand(new CommandBusLaunchCommand(), [ 'commandName' => 'DummyCommand', - 'arguments' => [DummyCommand::HANDLING_WITH_FAIL], + 'arguments' => [DummyCommand::HANDLING_WITH_FAIL], ]); $this->assertThatStatusCodeEquals(CommandBusLaunchCommand::ERROR_CODE); diff --git a/tests/Mocks/DummyCommand.php b/tests/Mocks/DummyCommand.php index 3ffbd84..086264e 100644 --- a/tests/Mocks/DummyCommand.php +++ b/tests/Mocks/DummyCommand.php @@ -5,7 +5,7 @@ class DummyCommand { const HANDLING_WITH_SUCCESS = 'HANDLING_WITH_SUCCESS'; - const HANDLING_WITH_FAIL = 'HANDLING_WITH_FAIL'; + const HANDLING_WITH_FAIL = 'HANDLING_WITH_FAIL'; /** @var string */ public $argument1; From 57247f40a4090092821156f20138ebaed4d7e99c Mon Sep 17 00:00:00 2001 From: lucaszz Date: Mon, 9 Nov 2015 16:36:27 +0100 Subject: [PATCH 16/18] Description --- src/Command/CommandBusLaunchCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Command/CommandBusLaunchCommand.php b/src/Command/CommandBusLaunchCommand.php index 6dd51fc..406084a 100644 --- a/src/Command/CommandBusLaunchCommand.php +++ b/src/Command/CommandBusLaunchCommand.php @@ -15,9 +15,9 @@ class CommandBusLaunchCommand extends ContainerAwareCommand protected function configure() { - //@todo add description $this ->setName('command-bus:launch') + ->setDescription('Command for launching commands registered in command-bus.') ->addArgument('commandName', InputArgument::REQUIRED) ->addArgument('arguments', InputArgument::IS_ARRAY); } From 42cc086125f8084bd85cc9b833bf7d7635855ef6 Mon Sep 17 00:00:00 2001 From: lucaszz Date: Mon, 9 Nov 2015 16:36:40 +0100 Subject: [PATCH 17/18] List command will be in another PR --- src/Command/CommandBusListCommand.php | 30 --------------------- tests/Command/CommandBusListCommandTest.php | 18 ------------- 2 files changed, 48 deletions(-) delete mode 100644 src/Command/CommandBusListCommand.php delete mode 100644 tests/Command/CommandBusListCommandTest.php diff --git a/src/Command/CommandBusListCommand.php b/src/Command/CommandBusListCommand.php deleted file mode 100644 index e90f125..0000000 --- a/src/Command/CommandBusListCommand.php +++ /dev/null @@ -1,30 +0,0 @@ -setName('command-bus:list'); - } - - /** {@inheritdoc} */ - protected function execute(InputInterface $input, OutputInterface $output) - { - //not implemented yet. - - $output->writeln('Currently available commands....'); - - return self::SUCCESS_CODE; - } -} diff --git a/tests/Command/CommandBusListCommandTest.php b/tests/Command/CommandBusListCommandTest.php deleted file mode 100644 index cb72b95..0000000 --- a/tests/Command/CommandBusListCommandTest.php +++ /dev/null @@ -1,18 +0,0 @@ -executeCommand(new CommandBusListCommand()); - - $this->assertThatStatusCodeEquals(CommandBusListCommand::SUCCESS_CODE); - $this->assertThatOutputWasDisplayed(); - } -} From 4e07c1231c706c3b1615b744d7f153786fbab506 Mon Sep 17 00:00:00 2001 From: lucaszz Date: Mon, 9 Nov 2015 16:47:03 +0100 Subject: [PATCH 18/18] Fixes after review --- src/Command/CommandBusLaunchCommand.php | 4 ++-- src/Resources/config/services.yml | 4 ++-- tests/CLITestCase.php | 4 ++-- tests/Command/CommandBusLaunchCommandTest.php | 8 ++++---- 4 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Command/CommandBusLaunchCommand.php b/src/Command/CommandBusLaunchCommand.php index 406084a..f959637 100644 --- a/src/Command/CommandBusLaunchCommand.php +++ b/src/Command/CommandBusLaunchCommand.php @@ -10,8 +10,8 @@ class CommandBusLaunchCommand extends ContainerAwareCommand { - const SUCCESS_CODE = 1; - const ERROR_CODE = 0; + const SUCCESS_CODE = 0; + const ERROR_CODE = 1; protected function configure() { diff --git a/src/Resources/config/services.yml b/src/Resources/config/services.yml index d31dfe3..2af2831 100644 --- a/src/Resources/config/services.yml +++ b/src/Resources/config/services.yml @@ -3,10 +3,10 @@ services: class: ClearcodeHQ\CommandBusLauncher\CommandCollector command_bus_launcher.value_conveters.uuid: - class: ClearcodeHQ\CommandBusLauncher\ValueConveter\UuidConveter + class: ClearcodeHQ\CommandBusLauncher\ValueConverter\UuidConverter command_bus_launcher.value_conveters.int: - class: ClearcodeHQ\CommandBusLauncher\ValueConveter\IntConveter + class: ClearcodeHQ\CommandBusLauncher\ValueConverter\IntConverter command_bus_launcher.arguments_processor: class: ClearcodeHQ\CommandBusLauncher\ArgumentsProcessor diff --git a/tests/CLITestCase.php b/tests/CLITestCase.php index 41f6588..20b5734 100644 --- a/tests/CLITestCase.php +++ b/tests/CLITestCase.php @@ -57,9 +57,9 @@ protected function assertThatStatusCodeEquals($statusCode) $this->assertEquals($statusCode, $this->statusCode); } - protected function assertThatOutputWasDisplayed() + protected function assertThatOutputContains($string) { - $this->assertNotEmpty($this->display); + $this->assertContains($string, $this->display); } private function prepareKernel() diff --git a/tests/Command/CommandBusLaunchCommandTest.php b/tests/Command/CommandBusLaunchCommandTest.php index 7137b1d..a00eac1 100644 --- a/tests/Command/CommandBusLaunchCommandTest.php +++ b/tests/Command/CommandBusLaunchCommandTest.php @@ -17,7 +17,7 @@ public function it_should_execute_command_with_success() ]); $this->assertThatStatusCodeEquals(CommandBusLaunchCommand::SUCCESS_CODE); - $this->assertThatOutputWasDisplayed(); + $this->assertThatOutputContains('executed with success'); } /** @test */ @@ -28,7 +28,7 @@ public function it_display_an_error_when_command_does_not_exists() ]); $this->assertThatStatusCodeEquals(CommandBusLaunchCommand::ERROR_CODE); - $this->assertThatOutputWasDisplayed(); + $this->assertThatOutputContains("Command 'NonExistingCommand' does not exists"); } /** @test */ @@ -42,7 +42,7 @@ public function it_display_an_error_when_required_arguments_was_not_provided() ]); $this->assertThatStatusCodeEquals(CommandBusLaunchCommand::ERROR_CODE); - $this->assertThatOutputWasDisplayed(); + $this->assertThatOutputContains('An unexpected error occurred.'); } /** @test */ @@ -54,6 +54,6 @@ public function it_display_an_error_when_executing_command_will_fail() ]); $this->assertThatStatusCodeEquals(CommandBusLaunchCommand::ERROR_CODE); - $this->assertThatOutputWasDisplayed(); + $this->assertThatOutputContains('An unexpected error occurred.'); } }