diff --git a/.gitignore b/.gitignore
index 9f33dd5..9697c8d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,2 +1,4 @@
vendor/
-.idea/
\ No newline at end of file
+composer.lock
+build/
+.idea/
diff --git a/.travis.yml b/.travis.yml
index 19026ee..ac469bc 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -1,7 +1,6 @@
language: php
php:
- - 5.4
- 5.5
- 5.6
- 7.0
@@ -21,10 +20,13 @@ 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
+
+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
[](https://travis-ci.org/ClearcodeHQ/CommandBusLauncherBundle)
+[](https://coveralls.io/github/ClearcodeHQ/CommandBusLauncherBundle?branch=master)
diff --git a/composer.json b/composer.json
index f8242c4..26b9db9 100644
--- a/composer.json
+++ b/composer.json
@@ -10,20 +10,23 @@
}
],
"require": {
- "php": ">=5.4",
+ "php": ">=5.5",
"simple-bus/symfony-bridge": "^4.1",
- "clearcodehq/command-bus-launcher": "dev-master"
+ "clearcodehq/command-bus-launcher": "dev-master",
+ "symfony/framework-bundle": "~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",
- "doctrine/orm": "~2.3",
- "symfony/symfony": "~2.7",
- "symfony/browser-kit": "~2.7"
+ "satooshi/php-coveralls": "^0.6.1"
},
"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" }
}
}
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": []
-}
diff --git a/phpunit.xml b/phpunit.xml.dist
similarity index 81%
rename from phpunit.xml
rename to phpunit.xml.dist
index 256ba09..7e32b9c 100644
--- a/phpunit.xml
+++ b/phpunit.xml.dist
@@ -12,10 +12,13 @@
./
- ./Resources
./tests
./vendor
-
\ No newline at end of file
+
+
+
+
+
diff --git a/src/Command/CommandLauncherCommand.php b/src/Command/CommandBusLaunchCommand.php
similarity index 53%
rename from src/Command/CommandLauncherCommand.php
rename to src/Command/CommandBusLaunchCommand.php
index 0fa1ead..f959637 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;
+ const SUCCESS_CODE = 0;
+ const ERROR_CODE = 1;
protected function configure()
{
$this
->setName('command-bus:launch')
+ ->setDescription('Command for launching commands registered in command-bus.')
->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,29 @@ 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;
}
-}
\ No newline at end of file
+}
diff --git a/src/DependencyInjection/CommandBusLauncherExtension.php b/src/DependencyInjection/CommandBusLauncherExtension.php
index b4fa029..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
{
@@ -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..629ecf7 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/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/App/TestKernel.php b/tests/App/TestKernel.php
index c4e1333..e5ab097 100644
--- a/tests/App/TestKernel.php
+++ b/tests/App/TestKernel.php
@@ -13,33 +13,33 @@ class TestKernel extends Kernel
/** {@inheritdoc} */
public function registerBundles()
{
- return array(
+ return [
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 34ef744..20b5734 100644
--- a/tests/CLITestCase.php
+++ b/tests/CLITestCase.php
@@ -2,79 +2,73 @@
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;
abstract class CLITestCase extends WebTestCase
{
- /** @var Client */
- private $client;
-
- /** @var ContainerInterface */
- private $container;
+ /** @var int */
+ protected $statusCode;
+ /** @var string */
+ protected $display;
/** {@inheritdoc} */
public static function getKernelClass()
{
- include_once __DIR__ . '/App/TestKernel.php';
+ include_once __DIR__.'/App/TestKernel.php';
+
return 'tests\ClearcodeHQ\CommandBusLauncherBundle\App\TestKernel';
}
- /**
- * @return Client
- */
- protected function client()
+ /** {@inheritdoc} */
+ protected function setUp()
{
- return $this->client;
+ $this->prepareKernel();
}
/**
- * @return ContainerInterface
+ * @param Command $command
+ * @param array $parameters
*/
- protected function container()
+ protected function executeCommand(Command $command, $parameters = [])
{
- return $this->container;
- }
+ $application = new Application(static::$kernel);
+ $application->add($command);
- /**
- * {@inheritdoc}
- */
- protected function setUp()
- {
- parent::setUp();
- $this->client = $this->createClient();
- $this->container = $this->client->getContainer();
+ $tester = new CommandTester($command);
+ $this->statusCode = $tester->execute($parameters);
+
+ $this->display = $tester->getDisplay();
}
- /**
- * {@inheritdoc}
- */
+ /** {@inheritdoc} */
protected function tearDown()
{
- $this->container = null;
- $this->client = null;
+ $this->display = null;
+ $this->statusCode = null;
parent::tearDown();
}
- /**
- * @param Command $command
- * @param array $parameters
- */
- protected function executeCommand(Command $command, $parameters = [])
+ protected function assertThatStatusCodeEquals($statusCode)
{
- $application = new Application($this->container()->get('kernel'));
- $application->add($command);
+ $this->assertEquals($statusCode, $this->statusCode);
+ }
- $tester = new CommandTester($command);
+ protected function assertThatOutputContains($string)
+ {
+ $this->assertContains($string, $this->display);
+ }
+
+ private function prepareKernel()
+ {
+ if (null !== static::$kernel) {
+ static::$kernel->shutdown();
+ }
- $tester->execute($parameters);
- return $tester->getStatusCode();
+ static::$kernel = static::createKernel();
+ static::$kernel->boot();
}
}
diff --git a/tests/Command/CommandBusLaunchCommandTest.php b/tests/Command/CommandBusLaunchCommandTest.php
new file mode 100644
index 0000000..a00eac1
--- /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->assertThatOutputContains('executed with success');
+ }
+
+ /** @test */
+ public function it_display_an_error_when_command_does_not_exists()
+ {
+ $this->executeCommand(new CommandBusLaunchCommand(), [
+ 'commandName' => 'NonExistingCommand',
+ ]);
+
+ $this->assertThatStatusCodeEquals(CommandBusLaunchCommand::ERROR_CODE);
+ $this->assertThatOutputContains("Command 'NonExistingCommand' does not exists");
+ }
+
+ /** @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->assertThatOutputContains('An unexpected error occurred.');
+ }
+
+ /** @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->assertThatOutputContains('An unexpected error occurred.');
+ }
+}
diff --git a/tests/Command/CommandLauncherCommandTest.php b/tests/Command/CommandLauncherCommandTest.php
deleted file mode 100644
index c769619..0000000
--- a/tests/Command/CommandLauncherCommandTest.php
+++ /dev/null
@@ -1,37 +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 c6b9f18..086264e 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;
}
-}
\ No newline at end of file
+}
diff --git a/tests/Mocks/DummyCommandHandler.php b/tests/Mocks/DummyCommandHandler.php
index a3eafcb..d83de02 100644
--- a/tests/Mocks/DummyCommandHandler.php
+++ b/tests/Mocks/DummyCommandHandler.php
@@ -4,8 +4,15 @@
class DummyCommandHandler
{
+ /**
+ * @param DummyCommand $command
+ *
+ * @throws \Exception
+ */
public function handle(DummyCommand $command)
{
- return;
+ if ($command->argument1 == DummyCommand::HANDLING_WITH_FAIL) {
+ throw new \Exception('An unexpected error occurred.');
+ }
}
-}
\ No newline at end of file
+}
diff --git a/tests/bootstrap.php b/tests/bootstrap.php
index 7259d6e..ffdf38f 100644
--- a/tests/bootstrap.php
+++ b/tests/bootstrap.php
@@ -1,6 +1,7 @@