From 7ba8c6354a615276c43de230ab993a558e45b53a Mon Sep 17 00:00:00 2001 From: Jacek Kobus Date: Mon, 27 Oct 2014 23:39:19 +0100 Subject: [PATCH 1/9] update for EventManager 2.x --- README.md | 79 +- build.xml | 109 +- build/phpcs.xml | 88 - build/phpmd.xml | 17 - build/sami-config.php | 27 - composer.json | 11 +- composer.lock | 1800 ++++++----------- phpunit.bat | 2 - .../Silex/EventManagerProvider.php | 15 - test.bat | 2 - test.php | 27 - tests/fixtures/EventManagerProviderTest.php | 5 +- 12 files changed, 643 insertions(+), 1539 deletions(-) delete mode 100644 build/phpcs.xml delete mode 100644 build/phpmd.xml delete mode 100644 build/sami-config.php delete mode 100644 phpunit.bat delete mode 100644 src/PHPExtra/EventManager/Silex/EventManagerProvider.php delete mode 100644 test.bat delete mode 100644 test.php diff --git a/README.md b/README.md index 48ebd0c..ebb16a1 100644 --- a/README.md +++ b/README.md @@ -1,65 +1,67 @@ -#Silex Provider for EventManager +#EventManager service provider for Silex (1.2) No configuration is needed. This provider will replace your EventDispatcher class. -Default symfony events were not removed and have higher priority. -It means that PHPExtra event is always running after the sf event. +Default Symfony events were not removed and have higher priority. +It means that PHPExtra event is always running after Symfony events. Below is a reference, to see how events from PHPExtra are mapped onto vanilla sf events. All events are cancellable (propagationStop property in sf event). -Unlike in symfony, cancellable events are still sent to all listeners. This behaviour may change in -future release of event manager. +**Unlike in Symfony, cancellable events are still sent to all listeners**. ## Symfony event mapping - kernel.request - PHPExtra\EventManager\Silex\Event\RequestEvent - Symfony\Component\HttpKernel\Event\GetResponseEvent +``` +kernel.request +PHPExtra\EventManager\Silex\Event\RequestEvent +Symfony\Component\HttpKernel\Event\GetResponseEvent - kernel.controller - PHPExtra\EventManager\Silex\Event\PreDispatchEvent - Symfony\Component\HttpKernel\Event\FilterControllerEvent +kernel.controller +PHPExtra\EventManager\Silex\Event\PreDispatchEvent +Symfony\Component\HttpKernel\Event\FilterControllerEvent - kernel.view - PHPExtra\EventManager\Silex\Event\PostDispatchEvent - Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent +kernel.view +PHPExtra\EventManager\Silex\Event\PostDispatchEvent +Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent - kernel.response - PHPExtra\EventManager\Silex\Event\ResponseEvent - Symfony\Component\HttpKernel\Event\FilterResponseEvent +kernel.response +PHPExtra\EventManager\Silex\Event\ResponseEvent +Symfony\Component\HttpKernel\Event\FilterResponseEvent - kernel.finish_request - PHPExtra\EventManager\Silex\Event\PostRequestEvent - Symfony\Component\HttpKernel\Event\FinishRequestEvent +kernel.finish_request +PHPExtra\EventManager\Silex\Event\PostRequestEvent +Symfony\Component\HttpKernel\Event\FinishRequestEvent - kernel.terminate - PHPExtra\EventManager\Silex\Event\PostResponseEvent - Symfony\Component\HttpKernel\Event\PostResponseEvent +kernel.terminate +PHPExtra\EventManager\Silex\Event\PostResponseEvent +Symfony\Component\HttpKernel\Event\PostResponseEvent +``` ##Installation and usage If you are using logger, it will be automatically injected into the event manager. Every class can now be a listener. - $app = new Silex\Application(array('debug' => true)); - $app->register(new \PHPExtra\EventManager\Silex\EventManagerProvider()); +```php +$app = new Silex\Application(array('debug' => true)); +$app->register(new \PHPExtra\EventManager\Silex\EventManagerProvider()); - $em = $app['event_manager']; +$em = $app['event_manager']; - $em->addListener(new \PHPExtra\EventManager\Listener\AnonymousListener(function(RequestEvent $event){ - echo "Im in RequestEvent (Sf GetResponseEvent)"; - })); +$em->addListener(new \PHPExtra\EventManager\Listener\AnonymousListener(function(RequestEvent $event){ + echo "Im in RequestEvent (Sf GetResponseEvent)"; +})); - $em->addListener(new \PHPExtra\EventManager\Listener\AnonymousListener(function(SilexKernelEvent $event){ - echo "Im in some Symfony KernelEvent !"; - })); +$em->addListener(new \PHPExtra\EventManager\Listener\AnonymousListener(function(SilexKernelEvent $event){ + echo "Im in some Symfony KernelEvent !"; +})); - $em->addListener($app['my_controller']); +$em->addListener($app['my_controller']); - $em->addListener($app['mailer']); - - ... +$em->addListener($app['mailer']); +... +``` ##Exception handling @@ -67,8 +69,9 @@ Exceptions that will occur during an event are suppressed in production mode. In development, the event manager will break the event loop and re-throw all exceptions. - $em->setThrowExceptions(false); // suppress exceptions and continue event loop - +```php +$em->setThrowExceptions(false); // suppress exceptions and continue event loop +``` ##Contributing diff --git a/build.xml b/build.xml index 743e6c0..e54ea93 100644 --- a/build.xml +++ b/build.xml @@ -6,7 +6,6 @@ - @@ -81,14 +80,11 @@ ${build.version} -> ${next.build.version} - - - + - @@ -96,7 +92,6 @@ - @@ -140,114 +135,12 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/build/phpcs.xml b/build/phpcs.xml deleted file mode 100644 index 690e54d..0000000 --- a/build/phpcs.xml +++ /dev/null @@ -1,88 +0,0 @@ - - - Default Coding Standard - - - */Resources/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 0 - - - - - 0 - - - - - 0 - - - 0 - - - - 0 - - - - 0 - - - - There should always be a description, followed by a blank line, before the tags of a class comment. - - diff --git a/build/phpmd.xml b/build/phpmd.xml deleted file mode 100644 index 53e1f6c..0000000 --- a/build/phpmd.xml +++ /dev/null @@ -1,17 +0,0 @@ - - - - Custom ruleset - - - - - - - \ No newline at end of file diff --git a/build/sami-config.php b/build/sami-config.php deleted file mode 100644 index 844c604..0000000 --- a/build/sami-config.php +++ /dev/null @@ -1,27 +0,0 @@ -files() - ->name('*.php') - ->in($src) -; - -$versions = GitVersionCollection::create($src . '/../') - ->addFromTags() - ->add('master', 'master') -; - -return new Sami($iterator, array( - 'theme' => 'enhanced', - 'versions' => $versions, - 'title' => 'Project API', - 'build_dir' => __DIR__.'/api/%version%', - 'cache_dir' => __DIR__.'/api/%version%', - 'default_opened_level' => 2, -)); \ No newline at end of file diff --git a/composer.json b/composer.json index 455e9a4..7ed81eb 100644 --- a/composer.json +++ b/composer.json @@ -13,17 +13,12 @@ "PHPExtra": "./src" } }, - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "require": { - "phpextra/event-manager": "~1.0", + "phpextra/event-manager": "~2.0@dev", "silex/silex": "~1.2" }, "require-dev": { - "phpextra/qa-tools": "~1.0", - "symfony/browser-kit": "~2.3" + "phpunit/phpunit": "~4.2", + "symfony/browser-kit": "~2.5" } } diff --git a/composer.lock b/composer.lock index 3a56b8b..fbd73db 100644 --- a/composer.lock +++ b/composer.lock @@ -1,34 +1,130 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file" + "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" ], - "hash": "5c04fab5398104005dc42ecabc5176c9", + "hash": "0a1247582fb5d82bf7e1d29f8508f5ca", "packages": [ { - "name": "phpextra/event-manager", + "name": "phpextra/collection", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phpextra/collection.git", + "reference": "b692a5641f57c9082c89573cadde5146426a8eb9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpextra/collection/zipball/b692a5641f57c9082c89573cadde5146426a8eb9", + "reference": "b692a5641f57c9082c89573cadde5146426a8eb9", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "phpextra/unknown": "dev-master as 1.0.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "PHPExtra\\Type\\Collection": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jacek Kobus", + "email": "kobus.jacek@gmail.com" + } + ], + "description": "Collection type for PHP", + "homepage": "https://github.com/phpextra/collection", + "keywords": [ + "collection" + ], + "time": "2014-10-20 20:29:15" + }, + { + "name": "phpextra/enum", "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phpextra/enum.git", + "reference": "c1862b41a4db9a9794bb32c16456f8ea4fdf7ce1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpextra/enum/zipball/c1862b41a4db9a9794bb32c16456f8ea4fdf7ce1", + "reference": "c1862b41a4db9a9794bb32c16456f8ea4fdf7ce1", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "PHPExtra\\Type\\Enum": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jacek Kobus", + "email": "kobus.jacek@gmail.com" + } + ], + "description": "Enum type for PHP", + "homepage": "https://github.com/phpextra/enum", + "keywords": [ + "enum" + ], + "time": "2014-08-16 15:44:29" + }, + { + "name": "phpextra/event-manager", + "version": "2.0.x-dev", "source": { "type": "git", "url": "https://github.com/phpextra/event-manager.git", - "reference": "488d0bef6b1bd1dd3a57fa7451b8e0f2c1e82bf0" + "reference": "2fc2501fd214fe47ee40548fb36464a7e1d7c70a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpextra/event-manager/zipball/488d0bef6b1bd1dd3a57fa7451b8e0f2c1e82bf0", - "reference": "488d0bef6b1bd1dd3a57fa7451b8e0f2c1e82bf0", + "url": "https://api.github.com/repos/phpextra/event-manager/zipball/2fc2501fd214fe47ee40548fb36464a7e1d7c70a", + "reference": "2fc2501fd214fe47ee40548fb36464a7e1d7c70a", "shasum": "" }, "require": { "php": ">=5.3.0", - "psr/log": "~1.0.0", - "zendframework/zend-stdlib": "~2.2.0" + "phpextra/collection": "dev-master as 1.0.0", + "phpextra/sorter": "dev-master as 1.0.0", + "psr/log": "~1.0.0" }, "require-dev": { - "mockery/mockery": "~0.8", - "phpextra/qa-tools": "~1.0", - "phpunit/phpunit": "~3.7", - "sami/sami": "~1.2" + "phpunit/phpunit": "~4.2" }, "type": "library", "extra": { @@ -60,20 +156,127 @@ "observer", "psr-0" ], - "time": "2014-03-27 10:09:58" + "time": "2014-10-27 21:53:58" + }, + { + "name": "phpextra/sorter", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phpextra/sorter.git", + "reference": "e5e2fc53f05940879623c54a4b569a1d91b53045" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpextra/sorter/zipball/e5e2fc53f05940879623c54a4b569a1d91b53045", + "reference": "e5e2fc53f05940879623c54a4b569a1d91b53045", + "shasum": "" + }, + "require": { + "ext-bcmath": "*", + "ext-intl": ">=1.0.0", + "php": ">=5.3.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "PHPExtra\\Sorter": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jacek Kobus", + "email": "kobus.jacek@gmail.com" + } + ], + "description": "Sort arrays and objects by multiple fields with unicode characters", + "homepage": "https://github.com/phpextra/sorter", + "keywords": [ + "array", + "collections", + "objects", + "psr-0", + "sort", + "sorter" + ], + "time": "2014-10-24 10:05:31" + }, + { + "name": "phpextra/unknown", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phpextra/unknown.git", + "reference": "c24b3058fe3393df71d109f6b3bea44c2355b72c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpextra/unknown/zipball/c24b3058fe3393df71d109f6b3bea44c2355b72c", + "reference": "c24b3058fe3393df71d109f6b3bea44c2355b72c", + "shasum": "" + }, + "require": { + "php": ">=5.3.0", + "phpextra/collection": "dev-master as 1.0.0", + "phpextra/enum": "~1.0", + "phpextra/sorter": "~1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "PHPExtra\\Type\\Unknown": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jacek Kobus", + "email": "kobus.jacek@gmail.com" + } + ], + "description": "Unknown type for PHP", + "homepage": "https://github.com/phpextra/unknown", + "keywords": [ + "object wrapper", + "unknown type" + ], + "time": "2014-10-21 09:34:08" }, { "name": "pimple/pimple", - "version": "v1.0.2", + "version": "1.1.x-dev", "source": { "type": "git", "url": "https://github.com/fabpot/Pimple.git", - "reference": "ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94" + "reference": "bc2fc12cdf1f29bcad9e650d493a54a8fd1f3d85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fabpot/Pimple/zipball/ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94", - "reference": "ae11e57e8c2bb414b2ff93396dbbfc0eb92feb94", + "url": "https://api.github.com/repos/fabpot/Pimple/zipball/bc2fc12cdf1f29bcad9e650d493a54a8fd1f3d85", + "reference": "bc2fc12cdf1f29bcad9e650d493a54a8fd1f3d85", "shasum": "" }, "require": { @@ -82,7 +285,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { @@ -108,7 +311,7 @@ "container", "dependency injection" ], - "time": "2013-03-08 08:21:40" + "time": "2014-04-20 07:24:09" }, { "name": "psr/log", @@ -155,16 +358,16 @@ }, { "name": "silex/silex", - "version": "dev-master", + "version": "1.2.x-dev", "source": { "type": "git", "url": "https://github.com/silexphp/Silex.git", - "reference": "3cbf93cfb0eb41b216be453ff40a4fa17f1bdbcd" + "reference": "2603afb3d2d902a3dbc19075d91f0b39a9d46c40" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Silex/zipball/3cbf93cfb0eb41b216be453ff40a4fa17f1bdbcd", - "reference": "3cbf93cfb0eb41b216be453ff40a4fa17f1bdbcd", + "url": "https://api.github.com/repos/silexphp/Silex/zipball/2603afb3d2d902a3dbc19075d91f0b39a9d46c40", + "reference": "2603afb3d2d902a3dbc19075d91f0b39a9d46c40", "shasum": "" }, "require": { @@ -178,7 +381,6 @@ "require-dev": { "doctrine/dbal": "~2.2", "monolog/monolog": "~1.4,>=1.4.1", - "phpunit/phpunit": "~3.7", "swiftmailer/swiftmailer": "5.*", "symfony/browser-kit": ">=2.3,<2.6-dev", "symfony/config": ">=2.3,<2.6-dev", @@ -222,14 +424,11 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" + "email": "fabien@symfony.com" }, { "name": "Igor Wiedler", - "email": "igor@wiedler.ch", - "homepage": "http://wiedler.ch/igor/" + "email": "igor@wiedler.ch" } ], "description": "The PHP micro-framework based on the Symfony2 Components", @@ -237,7 +436,7 @@ "keywords": [ "microframework" ], - "time": "2014-04-02 17:26:18" + "time": "2014-10-12 12:14:54" }, { "name": "symfony/debug", @@ -246,16 +445,17 @@ "source": { "type": "git", "url": "https://github.com/symfony/Debug.git", - "reference": "5eec1e0a1fad0d4a7c0e8a57ebe6f0f5665ca9ad" + "reference": "5e0da6230cf3aad7e0a6d992b7aa416f6b8e59c8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/5eec1e0a1fad0d4a7c0e8a57ebe6f0f5665ca9ad", - "reference": "5eec1e0a1fad0d4a7c0e8a57ebe6f0f5665ca9ad", + "url": "https://api.github.com/repos/symfony/Debug/zipball/5e0da6230cf3aad7e0a6d992b7aa416f6b8e59c8", + "reference": "5e0da6230cf3aad7e0a6d992b7aa416f6b8e59c8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "psr/log": "~1.0" }, "require-dev": { "symfony/http-foundation": "~2.1", @@ -268,7 +468,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } }, "autoload": { @@ -281,34 +481,32 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony Debug Component", "homepage": "http://symfony.com", - "time": "2014-03-26 18:07:49" + "time": "2014-10-26 07:46:28" }, { "name": "symfony/event-dispatcher", - "version": "dev-master", + "version": "2.5.x-dev", "target-dir": "Symfony/Component/EventDispatcher", "source": { "type": "git", "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "4b9a8defce833386224bdbf9045128a6e51fb0b4" + "reference": "5beb53f4f3d89dd6209d14494ade282af169fb15" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/4b9a8defce833386224bdbf9045128a6e51fb0b4", - "reference": "4b9a8defce833386224bdbf9045128a6e51fb0b4", + "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/5beb53f4f3d89dd6209d14494ade282af169fb15", + "reference": "5beb53f4f3d89dd6209d14494ade282af169fb15", "shasum": "" }, "require": { @@ -316,7 +514,8 @@ }, "require-dev": { "psr/log": "~1.0", - "symfony/dependency-injection": "~2.0", + "symfony/config": "~2.0", + "symfony/dependency-injection": "~2.0,<2.6.0", "symfony/stopwatch": "~2.2" }, "suggest": { @@ -339,34 +538,32 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony EventDispatcher Component", "homepage": "http://symfony.com", - "time": "2014-04-03 05:23:50" + "time": "2014-10-26 07:41:27" }, { "name": "symfony/http-foundation", - "version": "dev-master", + "version": "2.5.x-dev", "target-dir": "Symfony/Component/HttpFoundation", "source": { "type": "git", "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "fcf4b3614e8d9610d75b35dc6809cd14f6063ebf" + "reference": "b7ddbe0b53a807bc3eb3143a9fbdc2818dfaa489" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/fcf4b3614e8d9610d75b35dc6809cd14f6063ebf", - "reference": "fcf4b3614e8d9610d75b35dc6809cd14f6063ebf", + "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/b7ddbe0b53a807bc3eb3143a9fbdc2818dfaa489", + "reference": "b7ddbe0b53a807bc3eb3143a9fbdc2818dfaa489", "shasum": "" }, "require": { @@ -394,42 +591,40 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony HttpFoundation Component", "homepage": "http://symfony.com", - "time": "2014-04-11 18:34:16" + "time": "2014-10-26 07:41:27" }, { "name": "symfony/http-kernel", - "version": "dev-master", + "version": "2.5.x-dev", "target-dir": "Symfony/Component/HttpKernel", "source": { "type": "git", "url": "https://github.com/symfony/HttpKernel.git", - "reference": "109917b53fe5cd70ab3b8b7dc5e22441978fa1ec" + "reference": "64a1e7a008c631896b60a4a1cdddb7affcaedc7e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/109917b53fe5cd70ab3b8b7dc5e22441978fa1ec", - "reference": "109917b53fe5cd70ab3b8b7dc5e22441978fa1ec", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/64a1e7a008c631896b60a4a1cdddb7affcaedc7e", + "reference": "64a1e7a008c631896b60a4a1cdddb7affcaedc7e", "shasum": "" }, "require": { "php": ">=5.3.3", "psr/log": "~1.0", - "symfony/debug": "~2.3", - "symfony/event-dispatcher": "~2.1", - "symfony/http-foundation": "~2.4" + "symfony/debug": "~2.5", + "symfony/event-dispatcher": "~2.5", + "symfony/http-foundation": "~2.5" }, "require-dev": { "symfony/browser-kit": "~2.2", @@ -437,6 +632,7 @@ "symfony/config": "~2.0", "symfony/console": "~2.2", "symfony/dependency-injection": "~2.0", + "symfony/expression-language": "~2.4", "symfony/finder": "~2.0", "symfony/process": "~2.0", "symfony/routing": "~2.2", @@ -467,34 +663,32 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony HttpKernel Component", "homepage": "http://symfony.com", - "time": "2014-04-12 14:58:29" + "time": "2014-10-26 07:41:27" }, { "name": "symfony/routing", - "version": "dev-master", + "version": "2.5.x-dev", "target-dir": "Symfony/Component/Routing", "source": { "type": "git", "url": "https://github.com/symfony/Routing.git", - "reference": "dd45a1af38d20ebe9b6d4015885d861a4577bc29" + "reference": "eb5986e6b29e7e9b1afb7e42dd7055ab8169d576" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/dd45a1af38d20ebe9b6d4015885d861a4577bc29", - "reference": "dd45a1af38d20ebe9b6d4015885d861a4577bc29", + "url": "https://api.github.com/repos/symfony/Routing/zipball/eb5986e6b29e7e9b1afb7e42dd7055ab8169d576", + "reference": "eb5986e6b29e7e9b1afb7e42dd7055ab8169d576", "shasum": "" }, "require": { @@ -505,6 +699,7 @@ "psr/log": "~1.0", "symfony/config": "~2.2", "symfony/expression-language": "~2.4", + "symfony/http-foundation": "~2.3", "symfony/yaml": "~2.0" }, "suggest": { @@ -529,15 +724,13 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], "description": "Symfony Routing Component", @@ -548,87 +741,99 @@ "uri", "url" ], - "time": "2014-04-03 05:23:50" - }, + "time": "2014-10-26 07:41:27" + } + ], + "packages-dev": [ { - "name": "zendframework/zend-stdlib", - "version": "2.2.6", - "target-dir": "Zend/Stdlib", + "name": "doctrine/instantiator", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/zendframework/Component_ZendStdlib.git", - "reference": "e646729f2274f4552b6a92e38d8e458efe08ebc5" + "url": "https://github.com/doctrine/instantiator.git", + "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/zendframework/Component_ZendStdlib/zipball/e646729f2274f4552b6a92e38d8e458efe08ebc5", - "reference": "e646729f2274f4552b6a92e38d8e458efe08ebc5", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f976e5de371104877ebc89bd8fecb0019ed9c119", + "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3,<8.0-DEV" }, - "suggest": { - "zendframework/zend-eventmanager": "To support aggregate hydrator usage", - "zendframework/zend-servicemanager": "To support hydrator plugin manager usage" + "require-dev": { + "athletic/athletic": "~0.1.8", + "ext-pdo": "*", + "ext-phar": "*", + "phpunit/phpunit": "~4.0", + "squizlabs/php_codesniffer": "2.0.*@ALPHA" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.2-dev", - "dev-develop": "2.3-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-0": { - "Zend\\Stdlib\\": "" + "Doctrine\\Instantiator\\": "src" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "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": [ - "stdlib", - "zf2" + "constructor", + "instantiate" ], - "time": "2014-01-04 13:00:28" - } - ], - "packages-dev": [ + "time": "2014-10-13 12:58:55" + }, { - "name": "fabpot/php-cs-fixer", + "name": "phpdocumentor/reflection-docblock", "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/fabpot/PHP-CS-Fixer.git", - "reference": "2f1df1dea3941fa840656b48099e4e62cedf5b15" + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "fd0ac2007401505fb596fdfb859ec4e103d69e55" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fabpot/PHP-CS-Fixer/zipball/2f1df1dea3941fa840656b48099e4e62cedf5b15", - "reference": "2f1df1dea3941fa840656b48099e4e62cedf5b15", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/fd0ac2007401505fb596fdfb859ec4e103d69e55", + "reference": "fd0ac2007401505fb596fdfb859ec4e103d69e55", "shasum": "" }, "require": { - "php": ">=5.3.6", - "sebastian/diff": "1.1.*", - "symfony/console": "~2.1", - "symfony/filesystem": "~2.1", - "symfony/finder": "~2.1" + "php": ">=5.3.3" }, - "bin": [ - "php-cs-fixer" - ], - "type": "application", + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "suggest": { + "dflydev/markdown": "~1.0", + "erusev/parsedown": "~1.0" + }, + "type": "library", "extra": { "branch-alias": { - "dev-master": "0.4.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "psr-0": { - "Symfony\\CS": "." + "phpDocumentor": [ + "src/" + ] } }, "notification-url": "https://packagist.org/downloads/", @@ -637,35 +842,43 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" } ], - "description": "A script to automatically fix Symfony Coding Standard", - "time": "2014-04-15 14:30:14" + "time": "2014-09-02 14:26:20" }, { - "name": "instaclick/symfony2-coding-standard", - "version": "dev-remaster", - "target-dir": "Symfony2", + "name": "phpspec/prophecy", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/instaclick/Symfony2-coding-standard.git", - "reference": "180a19d2a81c6c5688326ea62e63f2b8c5944142" + "url": "https://github.com/phpspec/prophecy.git", + "reference": "2bbc78d0b4b1ce8049479395ba950d4b13f21d94" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/instaclick/Symfony2-coding-standard/zipball/180a19d2a81c6c5688326ea62e63f2b8c5944142", - "reference": "180a19d2a81c6c5688326ea62e63f2b8c5944142", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/2bbc78d0b4b1ce8049479395ba950d4b13f21d94", + "reference": "2bbc78d0b4b1ce8049479395ba950d4b13f21d94", "shasum": "" }, + "require": { + "doctrine/instantiator": "~1.0,>=1.0.2", + "phpdocumentor/reflection-docblock": "~2.0" + }, + "require-dev": { + "phpspec/phpspec": "~2.0" + }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, "autoload": { - "classmap": [ - "Symfony2/Sniffs/" - ] + "psr-0": { + "Prophecy\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -673,493 +886,121 @@ ], "authors": [ { - "name": "Instaclick", - "homepage": "http://instaclick.com/", - "role": "Maintainer" - } - ], - "description": "Symfony coding standard for PHP_CodeSniffer", - "time": "2013-05-16 20:40:33" - }, - { - "name": "mayflower/php-codebrowser", - "version": "1.1.0", - "source": { - "type": "git", - "url": "https://github.com/Mayflower/PHP_CodeBrowser.git", - "reference": "9015b935179e8c1a3cc8cbae59990d4388875c12" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/Mayflower/PHP_CodeBrowser/zipball/9015b935179e8c1a3cc8cbae59990d4388875c12", - "reference": "9015b935179e8c1a3cc8cbae59990d4388875c12", - "shasum": "" - }, - "require": { - "monolog/monolog": "~1.7", - "phpunit/php-file-iterator": "~1.3", - "symfony/console": "~2.1" - }, - "require-dev": { - "phploc/phploc": "*", - "phpmd/phpmd": "1.5.*", - "phpunit/phpunit": "3.7.*", - "sebastian/phpcpd": "*", - "squizlabs/php_codesniffer": "1.*" - }, - "bin": [ - "bin/phpcb" - ], - "type": "library", - "autoload": { - "psr-0": { - "PHPCodeBrowser\\": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Robin Gloster", - "email": "robin.gloster@mayflower.de", - "role": "developer" - } - ], - "description": "A code browser that augments the code with information from various QA tools.", - "homepage": "https://github.com/Mayflower/PHP_CodeBrowser", - "time": "2014-01-09 13:23:36" - }, - { - "name": "michelf/php-markdown", - "version": "dev-lib", - "source": { - "type": "git", - "url": "https://github.com/michelf/php-markdown.git", - "reference": "6f952ee180e9bd345f3dd6005aa11e0f5dcbd1b8" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/michelf/php-markdown/zipball/6f952ee180e9bd345f3dd6005aa11e0f5dcbd1b8", - "reference": "6f952ee180e9bd345f3dd6005aa11e0f5dcbd1b8", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-lib": "1.4.x-dev" - } - }, - "autoload": { - "psr-0": { - "Michelf": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Michel Fortin", - "email": "michel.fortin@michelf.ca", - "homepage": "http://michelf.ca/", - "role": "Developer" - }, - { - "name": "John Gruber", - "homepage": "http://daringfireball.net/" - } - ], - "description": "PHP Markdown", - "homepage": "http://michelf.ca/projects/php-markdown/", - "keywords": [ - "markdown" - ], - "time": "2013-11-29 21:49:31" - }, - { - "name": "mockery/mockery", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/padraic/mockery.git", - "reference": "4eff32b268a0db52b9abe36725cb775658ad3f1f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/padraic/mockery/zipball/4eff32b268a0db52b9abe36725cb775658ad3f1f", - "reference": "4eff32b268a0db52b9abe36725cb775658ad3f1f", - "shasum": "" - }, - "require": { - "lib-pcre": ">=7.0", - "php": ">=5.3.2" - }, - "require-dev": { - "hamcrest/hamcrest-php": "~1.1", - "phpunit/phpunit": "4.0.*", - "satooshi/php-coveralls": "dev-master" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.9.x-dev" - } - }, - "autoload": { - "psr-0": { - "Mockery": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" }, { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" } ], - "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succint API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", - "homepage": "http://github.com/padraic/mockery", + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "http://phpspec.org", "keywords": [ - "BDD", - "TDD", - "library", + "Double", + "Dummy", + "fake", "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" - ], - "time": "2014-04-09 22:16:37" + "spy", + "stub" + ], + "time": "2014-10-05 19:43:51" }, { - "name": "monolog/monolog", + "name": "phpspec/prophecy-phpunit", "version": "dev-master", + "target-dir": "Prophecy/PhpUnit", "source": { "type": "git", - "url": "https://github.com/Seldaek/monolog.git", - "reference": "03000a7fcd4072bd7e1f99c8ce4328621c5773b9" + "url": "https://github.com/phpspec/prophecy-phpunit.git", + "reference": "7abfc68caf9ec4c36346d170cdf68e441c2b4c8b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Seldaek/monolog/zipball/03000a7fcd4072bd7e1f99c8ce4328621c5773b9", - "reference": "03000a7fcd4072bd7e1f99c8ce4328621c5773b9", + "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/7abfc68caf9ec4c36346d170cdf68e441c2b4c8b", + "reference": "7abfc68caf9ec4c36346d170cdf68e441c2b4c8b", "shasum": "" }, "require": { - "php": ">=5.3.0", - "psr/log": "~1.0" - }, - "require-dev": { - "aws/aws-sdk-php": "~2.4, >2.4.8", - "doctrine/couchdb": "~1.0@dev", - "graylog2/gelf-php": "~1.0", - "phpunit/phpunit": "~3.7.0", - "raven/raven": "~0.5", - "ruflin/elastica": "0.90.*" + "php": ">=5.3.3", + "phpspec/prophecy": "~1.0" }, "suggest": { - "aws/aws-sdk-php": "Allow sending log messages to AWS services like DynamoDB", - "doctrine/couchdb": "Allow sending log messages to a CouchDB server", - "ext-amqp": "Allow sending log messages to an AMQP server (1.0+ required)", - "ext-mongo": "Allow sending log messages to a MongoDB server", - "graylog2/gelf-php": "Allow sending log messages to a GrayLog2 server", - "raven/raven": "Allow sending log messages to a Sentry server", - "rollbar/rollbar": "Allow sending log messages to Rollbar", - "ruflin/elastica": "Allow sending log messages to an Elastic Search server" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.8.x-dev" - } - }, - "autoload": { - "psr-4": { - "Monolog\\": "src/Monolog" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be", - "role": "Developer" - } - ], - "description": "Sends your logs to files, sockets, inboxes, databases and various web services", - "homepage": "http://github.com/Seldaek/monolog", - "keywords": [ - "log", - "logging", - "psr-3" - ], - "time": "2014-04-10 15:52:42" - }, - { - "name": "nikic/php-parser", - "version": "0.9.x-dev", - "source": { - "type": "git", - "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "8429157ab5478408606ee29e118c5f7db74c8afe" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/8429157ab5478408606ee29e118c5f7db74c8afe", - "reference": "8429157ab5478408606ee29e118c5f7db74c8afe", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.2" + "phpunit/phpunit": "if it is not installed globally" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.9-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "psr-0": { - "PHPParser": "lib/" + "Prophecy\\PhpUnit\\": "" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Nikita Popov" + "name": "Christophe Coevoet", + "email": "stof@notk.org" } ], - "description": "A PHP parser written in PHP", + "description": "PhpUnit test case integrating the Prophecy mocking library", + "homepage": "http://phpspec.net", "keywords": [ - "parser", - "php" - ], - "time": "2014-03-27 11:51:13" - }, - { - "name": "pdepend/pdepend", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/pdepend/pdepend.git", - "reference": "1537f19d62d7b30c13ac173270106df7c6b9c459" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/pdepend/pdepend/zipball/1537f19d62d7b30c13ac173270106df7c6b9c459", - "reference": "1537f19d62d7b30c13ac173270106df7c6b9c459", - "shasum": "" - }, - "require": { - "php": ">=5.2.3" - }, - "bin": [ - "src/bin/pdepend" - ], - "type": "library", - "autoload": { - "psr-0": { - "PHP_": "src/main/php/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "description": "Official version of pdepend to be handled with Composer", - "time": "2013-12-04 17:46:00" - }, - { - "name": "phpextra/qa-tools", - "version": "1.0.0", - "source": { - "type": "git", - "url": "https://github.com/phpextra/qa-tools.git", - "reference": "93f5204e82c39b1cfff54d69ff1a6aba7eb8071d" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpextra/qa-tools/zipball/93f5204e82c39b1cfff54d69ff1a6aba7eb8071d", - "reference": "93f5204e82c39b1cfff54d69ff1a6aba7eb8071d", - "shasum": "" - }, - "require": { - "fabpot/php-cs-fixer": "~0.3", - "instaclick/symfony2-coding-standard": "dev-remaster", - "mayflower/php-codebrowser": "~1.1", - "mockery/mockery": "~0.8", - "pdepend/pdepend": "~1.1", - "php": ">=5.3.3", - "phploc/phploc": "~2.0", - "phpmd/phpmd": "~1.4", - "phpunit/phpunit": "~3.7", - "sami/sami": "~1.3", - "sebastian/phpcpd": "~2.0", - "sebastian/phpdcd": "~1.0", - "sensiolabs/security-checker": "~1.3", - "squizlabs/php_codesniffer": "~1.5" - }, - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "authors": [ - { - "name": "Jacek Kobus", - "email": "kobus.jacek@gmail.com" - } - ], - "description": "Quality assurance tools package", - "time": "2014-03-18 15:31:40" - }, - { - "name": "phploc/phploc", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/phploc.git", - "reference": "eda0bfe29c804a317e8b013899ebc15b991d4e1a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phploc/zipball/eda0bfe29c804a317e8b013899ebc15b991d4e1a", - "reference": "eda0bfe29c804a317e8b013899ebc15b991d4e1a", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "sebastian/finder-facade": ">=1.1.0", - "sebastian/git": ">=1.0.0", - "sebastian/version": ">=1.0.3", - "symfony/console": ">=2.2.0" - }, - "require-dev": { - "phpunit/phpunit": "~4" - }, - "bin": [ - "phploc" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.1-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": "A tool for quickly measuring the size of a PHP project.", - "homepage": "https://github.com/sebastianbergmann/phploc", - "time": "2014-04-13 17:10:02" - }, - { - "name": "phpmd/phpmd", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/phpmd/phpmd.git", - "reference": "692b7b1b64518091b2b1bea91b489dbb13598c07" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpmd/phpmd/zipball/692b7b1b64518091b2b1bea91b489dbb13598c07", - "reference": "692b7b1b64518091b2b1bea91b489dbb13598c07", - "shasum": "" - }, - "require": { - "pdepend/pdepend": ">=1.1.1", - "php": ">=5.3.0" - }, - "bin": [ - "src/bin/phpmd" - ], - "type": "library", - "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "../../pdepend/pdepend/src/main/php", - "src/main/php" + "phpunit", + "prophecy" ], - "description": "Official version of PHPMD handled with Composer.", - "time": "2013-07-26 14:47:02" + "time": "2014-08-06 14:25:57" }, { "name": "phpunit/php-code-coverage", - "version": "1.2.x-dev", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "6ef2bf3a1c47eca07ea95f0d8a902a6340390b34" + "reference": "28d21b57c189cb72829056353de603c4d4da55a0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/6ef2bf3a1c47eca07ea95f0d8a902a6340390b34", - "reference": "6ef2bf3a1c47eca07ea95f0d8a902a6340390b34", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/28d21b57c189cb72829056353de603c4d4da55a0", + "reference": "28d21b57c189cb72829056353de603c4d4da55a0", "shasum": "" }, "require": { "php": ">=5.3.3", - "phpunit/php-file-iterator": ">=1.3.0@stable", - "phpunit/php-text-template": ">=1.2.0@stable", - "phpunit/php-token-stream": ">=1.1.3@stable" + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.2", + "phpunit/php-token-stream": "~1.3", + "sebastian/environment": "~1.0", + "sebastian/version": "~1.0" }, "require-dev": { - "phpunit/phpunit": "3.7.*@dev" + "ext-xdebug": ">=2.1.4", + "phpunit/phpunit": "dev-master" }, "suggest": { "ext-dom": "*", - "ext-xdebug": ">=2.0.5" + "ext-xdebug": ">=2.2.1", + "ext-xmlwriter": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { "classmap": [ - "PHP/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -1177,7 +1018,7 @@ "testing", "xunit" ], - "time": "2014-03-28 10:53:45" + "time": "2014-10-05 10:46:54" }, { "name": "phpunit/php-file-iterator", @@ -1318,41 +1159,40 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32" + "reference": "f8d5d08c56de5cfd592b3340424a81733259a876" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32", - "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/f8d5d08c56de5cfd592b3340424a81733259a876", + "reference": "f8d5d08c56de5cfd592b3340424a81733259a876", "shasum": "" }, "require": { "ext-tokenizer": "*", "php": ">=5.3.3" }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } }, "autoload": { "classmap": [ - "PHP/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], "description": "Wrapper around PHP's tokenizer extension.", @@ -1360,63 +1200,61 @@ "keywords": [ "tokenizer" ], - "time": "2014-03-03 05:10:30" + "time": "2014-08-31 06:12:13" }, { "name": "phpunit/phpunit", - "version": "3.7.x-dev", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "248d6ce95e6ca7f0e3135252c0b984bbe1f52f19" + "reference": "018d9c639ad30226cc879ef866a4f6cad10b7e56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/248d6ce95e6ca7f0e3135252c0b984bbe1f52f19", - "reference": "248d6ce95e6ca7f0e3135252c0b984bbe1f52f19", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/018d9c639ad30226cc879ef866a4f6cad10b7e56", + "reference": "018d9c639ad30226cc879ef866a4f6cad10b7e56", "shasum": "" }, "require": { "ext-dom": "*", + "ext-json": "*", "ext-pcre": "*", "ext-reflection": "*", "ext-spl": "*", "php": ">=5.3.3", - "phpunit/php-code-coverage": "~1.2", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.1", - "phpunit/php-timer": "~1.0", - "phpunit/phpunit-mock-objects": "~1.2", + "phpspec/prophecy-phpunit": "~1.0", + "phpunit/php-code-coverage": "3.0.*@dev", + "phpunit/php-file-iterator": "~1.3.2", + "phpunit/php-text-template": "~1.2", + "phpunit/php-timer": "~1.0.2", + "phpunit/phpunit-mock-objects": "2.4.*@dev", + "sebastian/comparator": "1.1.*@dev", + "sebastian/diff": "~1.1", + "sebastian/environment": "~1.2", + "sebastian/exporter": "~1.0", + "sebastian/global-state": "1.0.*@dev", + "sebastian/version": "~1.0", "symfony/yaml": "~2.0" }, - "require-dev": { - "pear-pear.php.net/pear": "1.9.4" - }, "suggest": { - "ext-json": "*", - "ext-simplexml": "*", - "ext-tokenizer": "*", "phpunit/php-invoker": "~1.1" }, "bin": [ - "composer/bin/phpunit" + "phpunit" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.7.x-dev" + "dev-master": "4.5.x-dev" } }, "autoload": { "classmap": [ - "PHPUnit/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "", - "../../symfony/yaml/" - ], "license": [ "BSD-3-Clause" ], @@ -1428,34 +1266,35 @@ } ], "description": "The PHP Unit Testing framework.", - "homepage": "http://www.phpunit.de/", + "homepage": "https://phpunit.de/", "keywords": [ "phpunit", "testing", "xunit" ], - "time": "2014-03-28 11:04:36" + "time": "2014-10-27 16:44:02" }, { "name": "phpunit/phpunit-mock-objects", - "version": "1.2.x-dev", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "c39c4511c3b007539eb170c32cbc2af49a07351a" + "reference": "96c5b81f9842f38fe6c73ad0020306cc4862a9e3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/c39c4511c3b007539eb170c32cbc2af49a07351a", - "reference": "c39c4511c3b007539eb170c32cbc2af49a07351a", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/96c5b81f9842f38fe6c73ad0020306cc4862a9e3", + "reference": "96c5b81f9842f38fe6c73ad0020306cc4862a9e3", "shasum": "" }, "require": { + "doctrine/instantiator": "~1.0,>=1.0.2", "php": ">=5.3.3", - "phpunit/php-text-template": ">=1.1.1@stable" + "phpunit/php-text-template": "~1.2" }, "require-dev": { - "phpunit/phpunit": "3.7.*@dev" + "phpunit/phpunit": "4.4.*@dev" }, "suggest": { "ext-soap": "*" @@ -1463,18 +1302,15 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.4.x-dev" } }, "autoload": { "classmap": [ - "PHPUnit/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -1491,66 +1327,71 @@ "mock", "xunit" ], - "time": "2014-02-16 12:43:56" + "time": "2014-10-04 10:04:20" }, { - "name": "sami/sami", + "name": "sebastian/comparator", "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/fabpot/Sami.git", - "reference": "a9578e8b51c70929b3687f57028699d403aafa84" + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "6f67d2ae044ba17ba30573941f4ac96c4777be97" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fabpot/Sami/zipball/a9578e8b51c70929b3687f57028699d403aafa84", - "reference": "a9578e8b51c70929b3687f57028699d403aafa84", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6f67d2ae044ba17ba30573941f4ac96c4777be97", + "reference": "6f67d2ae044ba17ba30573941f4ac96c4777be97", "shasum": "" }, "require": { - "michelf/php-markdown": "~1.3", - "nikic/php-parser": "0.9.*", - "php": ">=5.3.0", - "pimple/pimple": "1.0.*", - "symfony/console": "~2.1", - "symfony/filesystem": "~2.1", - "symfony/finder": "~2.1", - "symfony/process": "~2.1", - "symfony/yaml": "~2.1", - "twig/twig": "1.*" + "php": ">=5.3.3", + "sebastian/diff": "~1.1", + "sebastian/exporter": "~1.0" }, - "bin": [ - "sami.php" - ], - "type": "application", + "require-dev": { + "phpunit/phpunit": "~4.1" + }, + "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { - "psr-0": { - "Sami": "." - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" + "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": "Sami, an API documentation generator", - "homepage": "http://sami.sensiolabs.org", + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "http://www.github.com/sebastianbergmann/comparator", "keywords": [ - "phpdoc" + "comparator", + "compare", + "equality" ], - "time": "2014-03-02 09:04:43" + "time": "2014-10-21 10:04:18" }, { "name": "sebastian/diff", @@ -1558,21 +1399,24 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "ecc923996545d4e4395c0759b6c538f085233f62" + "reference": "92d423df43b160006907ea4297b916fdf00415d8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/ecc923996545d4e4395c0759b6c538f085233f62", - "reference": "ecc923996545d4e4395c0759b6c538f085233f62", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/92d423df43b160006907ea4297b916fdf00415d8", + "reference": "92d423df43b160006907ea4297b916fdf00415d8", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "require-dev": { + "phpunit/phpunit": "~4.2" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "1.2-dev" } }, "autoload": { @@ -1585,14 +1429,13 @@ "BSD-3-Clause" ], "authors": [ - { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" - }, { "name": "Kore Nordmann", "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" } ], "description": "Diff implementation", @@ -1600,68 +1443,32 @@ "keywords": [ "diff" ], - "time": "2014-02-16 12:08:10" - }, - { - "name": "sebastian/finder-facade", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sebastianbergmann/finder-facade.git", - "reference": "1e396fda3449fce9df032749fa4fa2619e0347e0" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/finder-facade/zipball/1e396fda3449fce9df032749fa4fa2619e0347e0", - "reference": "1e396fda3449fce9df032749fa4fa2619e0347e0", - "shasum": "" - }, - "require": { - "symfony/finder": ">=2.2.0", - "theseer/fdomdocument": ">=1.3.1" - }, - "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": "FinderFacade is a convenience wrapper for Symfony's Finder component.", - "homepage": "https://github.com/sebastianbergmann/finder-facade", - "time": "2013-05-28 06:10:03" + "time": "2014-10-19 13:19:30" }, { - "name": "sebastian/git", + "name": "sebastian/environment", "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/git.git", - "reference": "55cd9e850c0ac27b7c06897f9b423b509c2881d8" + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "6e6c71d918088c251b181ba8b3088af4ac336dd7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/git/zipball/55cd9e850c0ac27b7c06897f9b423b509c2881d8", - "reference": "55cd9e850c0ac27b7c06897f9b423b509c2881d8", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e6c71d918088c251b181ba8b3088af4ac336dd7", + "reference": "6e6c71d918088c251b181ba8b3088af4ac336dd7", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "require-dev": { + "phpunit/phpunit": "~4.3" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -1676,46 +1483,42 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Simple wrapper for Git", - "homepage": "http://www.github.com/sebastianbergmann/git", + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", "keywords": [ - "git" + "Xdebug", + "environment", + "hhvm" ], - "time": "2013-10-22 21:25:12" + "time": "2014-10-25 08:00:45" }, { - "name": "sebastian/phpcpd", + "name": "sebastian/exporter", "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpcpd.git", - "reference": "a9462153f2dd90466a010179901d31fbff598365" + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpcpd/zipball/a9462153f2dd90466a010179901d31fbff598365", - "reference": "a9462153f2dd90466a010179901d31fbff598365", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c7d59948d6e82818e1bdff7cadb6c34710eb7dc0", + "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-timer": ">=1.0.4", - "sebastian/finder-facade": ">=1.1.0", - "sebastian/version": ">=1.0.3", - "symfony/console": ">=2.2.0", - "theseer/fdomdocument": "~1.4" + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" }, - "bin": [ - "phpcpd" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { @@ -1728,44 +1531,58 @@ "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", - "role": "lead" + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "description": "Copy/Paste Detector (CPD) for PHP code.", - "homepage": "https://github.com/sebastianbergmann/phpcpd", - "time": "2014-03-31 09:25:30" + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", + "keywords": [ + "export", + "exporter" + ], + "time": "2014-09-10 00:51:36" }, { - "name": "sebastian/phpdcd", + "name": "sebastian/global-state", "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpdcd.git", - "reference": "04a4b59aed0423c7bbd2c40b7254e90dac552565" + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "231d48620efde984fd077ee92916099a3ece9a59" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpdcd/zipball/04a4b59aed0423c7bbd2c40b7254e90dac552565", - "reference": "04a4b59aed0423c7bbd2c40b7254e90dac552565", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/231d48620efde984fd077ee92916099a3ece9a59", + "reference": "231d48620efde984fd077ee92916099a3ece9a59", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-timer": ">=1.0.4", - "phpunit/php-token-stream": ">=1.1.3", - "sebastian/finder-facade": ">=1.1.0", - "sebastian/version": ">=1.0.3", - "symfony/console": ">=2.2.0" + "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~3.7" + "phpunit/phpunit": "~4.2" + }, + "suggest": { + "ext-uopz": "*" }, - "bin": [ - "phpdcd" - ], "type": "library", "extra": { "branch-alias": { @@ -1784,17 +1601,19 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Dead Code Detector (DCD) for PHP code.", - "homepage": "https://github.com/sebastianbergmann/phpdcd", - "time": "2014-03-07 15:57:46" + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "time": "2014-10-06 09:49:11" }, { "name": "sebastian/version", - "version": "dev-master", + "version": "1.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", @@ -1827,121 +1646,6 @@ "homepage": "https://github.com/sebastianbergmann/version", "time": "2014-03-07 15:35:33" }, - { - "name": "sensiolabs/security-checker", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/sensiolabs/security-checker.git", - "reference": "254540f5e6cd7fcb3b5b859a4bffbf04f8151ad6" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/sensiolabs/security-checker/zipball/254540f5e6cd7fcb3b5b859a4bffbf04f8151ad6", - "reference": "254540f5e6cd7fcb3b5b859a4bffbf04f8151ad6", - "shasum": "" - }, - "require": { - "ext-curl": "*", - "symfony/console": "~2.0" - }, - "bin": [ - "security-checker" - ], - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.3-dev" - } - }, - "autoload": { - "psr-0": { - "SensioLabs\\Security": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien.potencier@gmail.com" - } - ], - "description": "A security checker for your composer.lock", - "time": "2013-10-24 16:05:00" - }, - { - "name": "squizlabs/php_codesniffer", - "version": "1.5.2", - "source": { - "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "a76a39b317ce8106abe6264daa505e24e1731860" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/a76a39b317ce8106abe6264daa505e24e1731860", - "reference": "a76a39b317ce8106abe6264daa505e24e1731860", - "shasum": "" - }, - "require": { - "ext-tokenizer": "*", - "php": ">=5.1.2" - }, - "suggest": { - "phpunit/php-timer": "dev-master" - }, - "bin": [ - "scripts/phpcs" - ], - "type": "library", - "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/CommentParser/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Greg Sherwood", - "role": "lead" - } - ], - "description": "PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", - "keywords": [ - "phpcs", - "standards" - ], - "time": "2014-02-04 23:49:58" - }, { "name": "symfony/browser-kit", "version": "dev-master", @@ -1949,12 +1653,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/BrowserKit.git", - "reference": "cd7760fe96fc8ea3277fe65cfab800831d0d17d9" + "reference": "de6a5b6d09a67f5b53ce423a320b75afb335cca0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/cd7760fe96fc8ea3277fe65cfab800831d0d17d9", - "reference": "cd7760fe96fc8ea3277fe65cfab800831d0d17d9", + "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/de6a5b6d09a67f5b53ce423a320b75afb335cca0", + "reference": "de6a5b6d09a67f5b53ce423a320b75afb335cca0", "shasum": "" }, "require": { @@ -1971,7 +1675,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } }, "autoload": { @@ -1984,77 +1688,18 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony BrowserKit Component", - "homepage": "http://symfony.com", - "time": "2014-04-10 13:01:02" - }, - { - "name": "symfony/console", - "version": "dev-master", - "target-dir": "Symfony/Component/Console", - "source": { - "type": "git", - "url": "https://github.com/symfony/Console.git", - "reference": "abfdf388c2f47c4d4ba721afab7e91f15ffa476f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/abfdf388c2f47c4d4ba721afab7e91f15ffa476f", - "reference": "abfdf388c2f47c4d4ba721afab7e91f15ffa476f", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "require-dev": { - "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Console\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" }, { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], - "description": "Symfony Console Component", + "description": "Symfony BrowserKit Component", "homepage": "http://symfony.com", - "time": "2014-04-02 16:54:39" + "time": "2014-10-26 07:46:28" }, { "name": "symfony/dom-crawler", @@ -2063,12 +1708,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/DomCrawler.git", - "reference": "3cb351fe691bd7beac1fc6fcd98d9a6ac0e92cc0" + "reference": "4ce6a72b51cc79c3b4b20f88cbe56b36af4b073c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/3cb351fe691bd7beac1fc6fcd98d9a6ac0e92cc0", - "reference": "3cb351fe691bd7beac1fc6fcd98d9a6ac0e92cc0", + "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/4ce6a72b51cc79c3b4b20f88cbe56b36af4b073c", + "reference": "4ce6a72b51cc79c3b4b20f88cbe56b36af4b073c", "shasum": "" }, "require": { @@ -2083,7 +1728,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } }, "autoload": { @@ -2096,167 +1741,18 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony DomCrawler Component", - "homepage": "http://symfony.com", - "time": "2014-03-26 12:01:00" - }, - { - "name": "symfony/filesystem", - "version": "dev-master", - "target-dir": "Symfony/Component/Filesystem", - "source": { - "type": "git", - "url": "https://github.com/symfony/Filesystem.git", - "reference": "fe66eed49c7bbfc312978ef0f86e490127a345b2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/fe66eed49c7bbfc312978ef0f86e490127a345b2", - "reference": "fe66eed49c7bbfc312978ef0f86e490127a345b2", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Filesystem\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Filesystem Component", - "homepage": "http://symfony.com", - "time": "2014-03-26 12:01:00" - }, - { - "name": "symfony/finder", - "version": "dev-master", - "target-dir": "Symfony/Component/Finder", - "source": { - "type": "git", - "url": "https://github.com/symfony/Finder.git", - "reference": "d45faef922df8438cce99b5ee226bf06c32d145e" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Finder/zipball/d45faef922df8438cce99b5ee226bf06c32d145e", - "reference": "d45faef922df8438cce99b5ee226bf06c32d145e", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Finder\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "email": "fabien@symfony.com" } ], - "description": "Symfony Finder Component", - "homepage": "http://symfony.com", - "time": "2014-03-03 12:53:01" - }, - { - "name": "symfony/process", - "version": "dev-master", - "target-dir": "Symfony/Component/Process", - "source": { - "type": "git", - "url": "https://github.com/symfony/Process.git", - "reference": "10767aeb15bd6fc0c7cf18fa6883e5237ea7cf29" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Process/zipball/10767aeb15bd6fc0c7cf18fa6883e5237ea7cf29", - "reference": "10767aeb15bd6fc0c7cf18fa6883e5237ea7cf29", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Process\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Process Component", + "description": "Symfony DomCrawler Component", "homepage": "http://symfony.com", - "time": "2014-04-03 05:23:50" + "time": "2014-10-26 07:46:28" }, { "name": "symfony/yaml", @@ -2265,12 +1761,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/Yaml.git", - "reference": "cee3067d680232674c6505d91db9d3d635a9a8f4" + "reference": "4c0baf9a5b5c9e50ddd7a46f3c75cb85baf5d6c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/cee3067d680232674c6505d91db9d3d635a9a8f4", - "reference": "cee3067d680232674c6505d91db9d3d635a9a8f4", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/4c0baf9a5b5c9e50ddd7a46f3c75cb85baf5d6c5", + "reference": "4c0baf9a5b5c9e50ddd7a46f3c75cb85baf5d6c5", "shasum": "" }, "require": { @@ -2279,7 +1775,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.6-dev" } }, "autoload": { @@ -2292,130 +1788,26 @@ "MIT" ], "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com", - "homepage": "http://fabien.potencier.org", - "role": "Lead Developer" - }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Yaml Component", - "homepage": "http://symfony.com", - "time": "2014-03-26 11:51:10" - }, - { - "name": "theseer/fdomdocument", - "version": "1.5.0", - "source": { - "type": "git", - "url": "https://github.com/theseer/fDOMDocument.git", - "reference": "137aa3b13bef05b4e301899cbabdaf7d501847d2" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/theseer/fDOMDocument/zipball/137aa3b13bef05b4e301899cbabdaf7d501847d2", - "reference": "137aa3b13bef05b4e301899cbabdaf7d501847d2", - "shasum": "" - }, - "require": { - "ext-dom": "*", - "lib-libxml": "*", - "php": ">=5.3.3" - }, - "type": "library", - "autoload": { - "classmap": [ - "src/" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "lead" - } - ], - "description": "The classes contained within this repository extend the standard DOM to use exceptions at all occasions of errors instead of PHP warnings or notices. They also add various custom methods and shortcuts for convenience and to simplify the usage of DOM.", - "homepage": "https://github.com/theseer/fDOMDocument", - "time": "2014-02-19 00:20:43" - }, - { - "name": "twig/twig", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/fabpot/Twig.git", - "reference": "c8366374d9d531029a6b031528b552c37e1b2e66" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/fabpot/Twig/zipball/c8366374d9d531029a6b031528b552c37e1b2e66", - "reference": "c8366374d9d531029a6b031528b552c37e1b2e66", - "shasum": "" - }, - "require": { - "php": ">=5.2.4" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.15-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": "https://github.com/fabpot/Twig/graphs/contributors", - "role": "Contributors" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" } ], - "description": "Twig, the flexible, fast, and secure template language for PHP", - "homepage": "http://twig.sensiolabs.org", - "keywords": [ - "templating" - ], - "time": "2014-03-30 17:23:57" + "description": "Symfony Yaml Component", + "homepage": "http://symfony.com", + "time": "2014-10-26 07:46:28" } ], - "aliases": [ - - ], + "aliases": [], "minimum-stability": "dev", - "stability-flags": [ - - ], - "platform": [ - - ], - "platform-dev": [ - - ] + "stability-flags": { + "phpextra/event-manager": 20 + }, + "prefer-stable": false, + "platform": [], + "platform-dev": [] } diff --git a/phpunit.bat b/phpunit.bat deleted file mode 100644 index 9ca4e99..0000000 --- a/phpunit.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -%CD%/vendor/bin/phpunit.bat %* \ No newline at end of file diff --git a/src/PHPExtra/EventManager/Silex/EventManagerProvider.php b/src/PHPExtra/EventManager/Silex/EventManagerProvider.php deleted file mode 100644 index 53fbe7c..0000000 --- a/src/PHPExtra/EventManager/Silex/EventManagerProvider.php +++ /dev/null @@ -1,15 +0,0 @@ - - */ -class EventManagerProvider extends EventManagerServiceProvider -{ -} \ No newline at end of file diff --git a/test.bat b/test.bat deleted file mode 100644 index 66cfb1c..0000000 --- a/test.bat +++ /dev/null @@ -1,2 +0,0 @@ -@echo off -%CD%/vendor/bin/phpunit.bat -v ./tests/fixtures \ No newline at end of file diff --git a/test.php b/test.php deleted file mode 100644 index 0a2a990..0000000 --- a/test.php +++ /dev/null @@ -1,27 +0,0 @@ - true)); - -$app->register(new \PHPExtra\EventManager\Silex\EventManagerProvider()); -$app->get('/',function(){ -// echo "controller"; - return 'controller'; -}); - - -########### -$em = $app['event_manager']; -/** @var $em \PHPExtra\EventManager\EventManagerInterface */ - -$em->addListener(new \PHPExtra\EventManager\Listener\AnonymousListener(function(RequestEvent $event){ - echo 'listener'; -})); -############ - - - -$app->run(); \ No newline at end of file diff --git a/tests/fixtures/EventManagerProviderTest.php b/tests/fixtures/EventManagerProviderTest.php index d5cf6da..42f66f0 100644 --- a/tests/fixtures/EventManagerProviderTest.php +++ b/tests/fixtures/EventManagerProviderTest.php @@ -2,11 +2,10 @@ namespace fixtures; -use PHPExtra\EventManager\Event\EventInterface; use PHPExtra\EventManager\EventManagerInterface; use PHPExtra\EventManager\Listener\AnonymousListener; use PHPExtra\EventManager\Silex\Event\SilexEvent; -use PHPExtra\EventManager\Silex\EventManagerProvider; +use PHPExtra\EventManager\Silex\EventManagerServiceProvider; use Silex\Application; use Silex\WebTestCase; use Symfony\Component\HttpKernel\HttpKernel; @@ -27,7 +26,7 @@ public function createApplication() { $app = new Application(array('debug' => true)); $app['exception_handler']->disable(); - $app->register(new EventManagerProvider()); + $app->register(new EventManagerServiceProvider()); $app->get('/', function(Application $app){ return 'ok'; }); From 27312792744a5c11cb17df90d8c60308c647fd2d Mon Sep 17 00:00:00 2001 From: Jacek Kobus Date: Mon, 27 Oct 2014 23:55:13 +0100 Subject: [PATCH 2/9] composer update --- composer.json | 1 + composer.lock | 68 ++++++++++++++++++++++++++++++++++++++++++++++++++- 2 files changed, 68 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 7ed81eb..f5da670 100644 --- a/composer.json +++ b/composer.json @@ -18,6 +18,7 @@ "silex/silex": "~1.2" }, "require-dev": { + "mockery/mockery": "0.9.2", "phpunit/phpunit": "~4.2", "symfony/browser-kit": "~2.5" } diff --git a/composer.lock b/composer.lock index fbd73db..e84559a 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "0a1247582fb5d82bf7e1d29f8508f5ca", + "hash": "2edf54e20cef00cd9a3f5d4bd6b2699c", "packages": [ { "name": "phpextra/collection", @@ -799,6 +799,72 @@ ], "time": "2014-10-13 12:58:55" }, + { + "name": "mockery/mockery", + "version": "0.9.2", + "source": { + "type": "git", + "url": "https://github.com/padraic/mockery.git", + "reference": "95a4855380dc70176c51807c678fb3bd6198529a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/padraic/mockery/zipball/95a4855380dc70176c51807c678fb3bd6198529a", + "reference": "95a4855380dc70176c51807c678fb3bd6198529a", + "shasum": "" + }, + "require": { + "lib-pcre": ">=7.0", + "php": ">=5.3.2" + }, + "require-dev": { + "hamcrest/hamcrest-php": "~1.1", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "~0.7@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.9.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succint API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", + "homepage": "http://github.com/padraic/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "time": "2014-09-03 10:11:10" + }, { "name": "phpdocumentor/reflection-docblock", "version": "dev-master", From ff1b753d56b74e301f472291f70745ebc540b844 Mon Sep 17 00:00:00 2001 From: Jacek Kobus Date: Wed, 29 Oct 2014 00:13:06 +0100 Subject: [PATCH 3/9] added symfony stopwatch --- README.md | 9 ++- composer.json | 1 + composer.lock | 57 +++++++++++++++-- .../Silex/CustomEventDispatcher.php | 3 + .../Silex/EventManagerServiceProvider.php | 54 ++++++++-------- .../EventManager/Silex/NullStopwatch.php | 33 ++++++++++ .../Silex/ProfilableEventManager.php | 63 +++++++++++++++++++ 7 files changed, 186 insertions(+), 34 deletions(-) create mode 100644 src/PHPExtra/EventManager/Silex/NullStopwatch.php create mode 100644 src/PHPExtra/EventManager/Silex/ProfilableEventManager.php diff --git a/README.md b/README.md index ebb16a1..318c176 100644 --- a/README.md +++ b/README.md @@ -66,13 +66,16 @@ $em->addListener($app['mailer']); ##Exception handling Exceptions that will occur during an event are suppressed in production mode. -In development, the event manager will break the event loop and re-throw all exceptions. - +In development, the event manager will break the event loop and throw an exception. ```php $em->setThrowExceptions(false); // suppress exceptions and continue event loop ``` +##Profiling (Symfony stopwatch) + +Stopwatch is enabled when debug mode is on. In production EventManager uses NullStopwatch. + ##Contributing All code contributions must go through a pull request. @@ -91,4 +94,4 @@ Jacek Kobus - ## License information - See the file LICENSE.txt for copying permission. \ No newline at end of file +See the file LICENSE.txt for copying permission. \ No newline at end of file diff --git a/composer.json b/composer.json index f5da670..115d595 100644 --- a/composer.json +++ b/composer.json @@ -15,6 +15,7 @@ }, "require": { "phpextra/event-manager": "~2.0@dev", + "symfony/stopwatch": "~2.5", "silex/silex": "~1.2" }, "require-dev": { diff --git a/composer.lock b/composer.lock index e84559a..8c8a6d3 100644 --- a/composer.lock +++ b/composer.lock @@ -4,7 +4,7 @@ "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "2edf54e20cef00cd9a3f5d4bd6b2699c", + "hash": "8e716739bae4e3c8827d01a1f2996940", "packages": [ { "name": "phpextra/collection", @@ -109,12 +109,12 @@ "source": { "type": "git", "url": "https://github.com/phpextra/event-manager.git", - "reference": "2fc2501fd214fe47ee40548fb36464a7e1d7c70a" + "reference": "6c3fbf936ab8a4c2acad1e27e5f7bbac0820c571" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpextra/event-manager/zipball/2fc2501fd214fe47ee40548fb36464a7e1d7c70a", - "reference": "2fc2501fd214fe47ee40548fb36464a7e1d7c70a", + "url": "https://api.github.com/repos/phpextra/event-manager/zipball/6c3fbf936ab8a4c2acad1e27e5f7bbac0820c571", + "reference": "6c3fbf936ab8a4c2acad1e27e5f7bbac0820c571", "shasum": "" }, "require": { @@ -156,7 +156,7 @@ "observer", "psr-0" ], - "time": "2014-10-27 21:53:58" + "time": "2014-10-28 22:12:53" }, { "name": "phpextra/sorter", @@ -742,6 +742,53 @@ "url" ], "time": "2014-10-26 07:41:27" + }, + { + "name": "symfony/stopwatch", + "version": "dev-master", + "target-dir": "Symfony/Component/Stopwatch", + "source": { + "type": "git", + "url": "https://github.com/symfony/Stopwatch.git", + "reference": "f7cca9c342ce395d2aa17383d0f9a409d81ca585" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/f7cca9c342ce395d2aa17383d0f9a409d81ca585", + "reference": "f7cca9c342ce395d2aa17383d0f9a409d81ca585", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.6-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Component\\Stopwatch\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "http://symfony.com", + "time": "2014-09-22 11:59:59" } ], "packages-dev": [ diff --git a/src/PHPExtra/EventManager/Silex/CustomEventDispatcher.php b/src/PHPExtra/EventManager/Silex/CustomEventDispatcher.php index f319bb3..320412f 100644 --- a/src/PHPExtra/EventManager/Silex/CustomEventDispatcher.php +++ b/src/PHPExtra/EventManager/Silex/CustomEventDispatcher.php @@ -25,6 +25,9 @@ class CustomEventDispatcher extends EventDispatcher implements EventManagerAware */ protected $proxyMapper; + /** + * {@inheritdoc} + */ public function dispatch($eventName, Event $event = null) { if (null === $event) { diff --git a/src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php b/src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php index 75ad9a0..f2997ab 100644 --- a/src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php +++ b/src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php @@ -5,6 +5,7 @@ use PHPExtra\EventManager\EventManager; use Silex\Application; use Silex\ServiceProviderInterface; +use Symfony\Component\Stopwatch\Stopwatch; /** * The SilexProvider class @@ -20,38 +21,39 @@ public function register(Application $app) { $app['dispatcher_class'] = 'PHPExtra\\EventManager\\Silex\\CustomEventDispatcher'; - $app['event_manager'] = $app->share( - function (Application $app) { - $em = new EventManager(); + $app['event_manager'] = $app->share(function (Application $app) { - if ($app['debug'] == true) { - $em->setThrowExceptions(true); - } + $em = new ProfilableEventManager(); + $em->setLogger($app['logger']); - if ($app['logger'] !== null) { - $em->setLogger($app['logger']); - } - - return $em; + if($app['debug']){ + $em + ->setStopwatch($app['stopwatch']) + ->setThrowExceptions($app['debug']) + ; + }else{ + $em->setStopwatch(new NullStopwatch()); } - ); - $app['event_manager.proxy_mapper'] = $app->share( - function (Application $app) { - return new ProxyMapper(); - } - ); + return $em; + }); - $app->extend( - 'dispatcher', - function (CustomEventDispatcher $dispatcher, Application $app) { - $dispatcher - ->setProxyMapper($app['event_manager.proxy_mapper']) - ->setEventManager($app['event_manager']); + $app['event_manager.proxy_mapper'] = $app->share(function (Application $app) { + return new ProxyMapper(); + }); - return $dispatcher; - } - ); + $app->extend('dispatcher', function (CustomEventDispatcher $dispatcher, Application $app) { + $dispatcher + ->setProxyMapper($app['event_manager.proxy_mapper']) + ->setEventManager($app['event_manager']) + ; + + return $dispatcher; + }); + + $app['stopwatch'] = $app->share(function () { + return new Stopwatch(); + }); } /** diff --git a/src/PHPExtra/EventManager/Silex/NullStopwatch.php b/src/PHPExtra/EventManager/Silex/NullStopwatch.php new file mode 100644 index 0000000..5ecfa35 --- /dev/null +++ b/src/PHPExtra/EventManager/Silex/NullStopwatch.php @@ -0,0 +1,33 @@ + + * See the file LICENSE.txt for copying permission. + */ + +namespace PHPExtra\EventManager\Silex; + +use Symfony\Component\Stopwatch\Stopwatch; + +/** + * The NullStopwatch class + * + * @author Jacek Kobus + */ +class NullStopwatch extends Stopwatch +{ + /** + * {@inheritdoc} + */ + public function start($name, $category = null) + { + } + + /** + * {@inheritdoc} + */ + public function stop($name) + { + } + +} \ No newline at end of file diff --git a/src/PHPExtra/EventManager/Silex/ProfilableEventManager.php b/src/PHPExtra/EventManager/Silex/ProfilableEventManager.php new file mode 100644 index 0000000..f21e36b --- /dev/null +++ b/src/PHPExtra/EventManager/Silex/ProfilableEventManager.php @@ -0,0 +1,63 @@ + + * See the file LICENSE.txt for copying permission. + */ + +namespace PHPExtra\EventManager\Silex; + +use PHPExtra\EventManager\Event\EventInterface; +use PHPExtra\EventManager\EventManager; +use PHPExtra\EventManager\EventManagerInterface; +use PHPExtra\EventManager\Worker\WorkerInterface; +use Symfony\Component\Stopwatch\Stopwatch; + +/** + * Adds Symfony Stopwatch + * + * @author Jacek Kobus + */ +class ProfilableEventManager extends EventManager implements EventManagerInterface +{ + /** + * @var Stopwatch + */ + private $stopwatch; + + /** + * {@inheritdoc} + */ + public function trigger(EventInterface $event) + { + $eventName = get_class($event); + $this->stopwatch->start($eventName); + $result = parent::trigger($event); + $this->stopwatch->stop($eventName); + return $result; + } + + /** + * {@inheritdoc} + */ + protected function runWorker(WorkerInterface $worker, EventInterface $event) + { + $workerName = sprintf('%s::%s', $worker->getListenerClass(), $worker->getMethodName()); + $this->stopwatch->start($workerName); + $result = parent::runWorker($worker, $event); + $this->stopwatch->stop($workerName); + return $result; + } + + /** + * @param Stopwatch $stopwatch + * + * @return $this + */ + public function setStopwatch(Stopwatch $stopwatch) + { + $this->stopwatch = $stopwatch; + + return $this; + } +} \ No newline at end of file From 78aeca71b5545d41ad880e8106973eeb848b9365 Mon Sep 17 00:00:00 2001 From: Jacek Kobus Date: Wed, 29 Oct 2014 00:15:54 +0100 Subject: [PATCH 4/9] added null logger if no logger is present --- .../EventManager/Silex/EventManagerServiceProvider.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php b/src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php index f2997ab..0b94b84 100644 --- a/src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php +++ b/src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php @@ -3,6 +3,7 @@ namespace PHPExtra\EventManager\Silex; use PHPExtra\EventManager\EventManager; +use Psr\Log\NullLogger; use Silex\Application; use Silex\ServiceProviderInterface; use Symfony\Component\Stopwatch\Stopwatch; @@ -24,7 +25,12 @@ public function register(Application $app) $app['event_manager'] = $app->share(function (Application $app) { $em = new ProfilableEventManager(); - $em->setLogger($app['logger']); + + if ($app['logger'] !== null) { + $em->setLogger($app['logger']); + }else{ + $em->setLogger(new NullLogger()); + } if($app['debug']){ $em From 6b86f8bcbb45c4cfb97ec7517a382d7d31e3649e Mon Sep 17 00:00:00 2001 From: Jacek Kobus Date: Wed, 29 Oct 2014 00:57:00 +0100 Subject: [PATCH 5/9] removed unused import --- src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php | 1 - 1 file changed, 1 deletion(-) diff --git a/src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php b/src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php index 0b94b84..5c099c7 100644 --- a/src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php +++ b/src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php @@ -2,7 +2,6 @@ namespace PHPExtra\EventManager\Silex; -use PHPExtra\EventManager\EventManager; use Psr\Log\NullLogger; use Silex\Application; use Silex\ServiceProviderInterface; From 4ee25bd00201d227281f0fa60dac0646f87d6230 Mon Sep 17 00:00:00 2001 From: Jacek Kobus Date: Wed, 29 Oct 2014 15:51:21 +0100 Subject: [PATCH 6/9] updated custom event dispatcher with latest interface changes --- src/PHPExtra/EventManager/Silex/CustomEventDispatcher.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PHPExtra/EventManager/Silex/CustomEventDispatcher.php b/src/PHPExtra/EventManager/Silex/CustomEventDispatcher.php index 320412f..be4fec0 100644 --- a/src/PHPExtra/EventManager/Silex/CustomEventDispatcher.php +++ b/src/PHPExtra/EventManager/Silex/CustomEventDispatcher.php @@ -68,7 +68,7 @@ public function getProxyMapper() /** * {@inheritdoc} */ - public function setEventManager(EventManager $manager) + public function setEventManager(EventManagerInterface $manager) { $this->eventManager = $manager; From 87f69a9f3a19e1bd2af5770c367853b227d5efaa Mon Sep 17 00:00:00 2001 From: Jacek Kobus Date: Fri, 5 Jun 2015 14:46:59 +0200 Subject: [PATCH 7/9] changes towards integration with EM 3.0 --- .gitignore | 5 +- .travis.yml | 18 +- README.md | 85 +- build.properties | 5 - build.xml | 149 -- composer.json | 12 +- composer.lock | 1318 ++++++++--------- .../Silex/CustomEventDispatcher.php | 44 +- .../Silex/Event/PostDispatchEvent.php | 49 - .../Silex/Event/PostRequestEvent.php | 21 - .../Silex/Event/PostResponseEvent.php | 21 - .../Silex/Event/PreDispatchEvent.php | 26 - .../EventManager/Silex/Event/RequestEvent.php | 65 - .../Silex/Event/ResponseEvent.php | 34 - .../Silex/Event/SilexKernelEvent.php | 49 - .../Silex/EventManagerServiceProvider.php | 18 +- .../Silex/ProfilableEventManager.php | 2 +- .../EventManager/Silex/ProxyMapper.php | 69 - .../Silex/ProxyMapperInterface.php | 23 - .../Silex/{Event => }/SilexEvent.php | 47 +- tests/fixtures/CustomEventDispatcherTest.php | 43 + tests/fixtures/EventManagerProviderTest.php | 56 +- tests/fixtures/ProxyMapperTest.php | 89 -- 23 files changed, 827 insertions(+), 1421 deletions(-) delete mode 100644 build.properties delete mode 100644 build.xml delete mode 100644 src/PHPExtra/EventManager/Silex/Event/PostDispatchEvent.php delete mode 100644 src/PHPExtra/EventManager/Silex/Event/PostRequestEvent.php delete mode 100644 src/PHPExtra/EventManager/Silex/Event/PostResponseEvent.php delete mode 100644 src/PHPExtra/EventManager/Silex/Event/PreDispatchEvent.php delete mode 100644 src/PHPExtra/EventManager/Silex/Event/RequestEvent.php delete mode 100644 src/PHPExtra/EventManager/Silex/Event/ResponseEvent.php delete mode 100644 src/PHPExtra/EventManager/Silex/Event/SilexKernelEvent.php delete mode 100644 src/PHPExtra/EventManager/Silex/ProxyMapper.php delete mode 100644 src/PHPExtra/EventManager/Silex/ProxyMapperInterface.php rename src/PHPExtra/EventManager/Silex/{Event => }/SilexEvent.php (51%) create mode 100644 tests/fixtures/CustomEventDispatcherTest.php delete mode 100644 tests/fixtures/ProxyMapperTest.php diff --git a/.gitignore b/.gitignore index 2faf80e..e423313 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ .idea vendor -build/* -!build/phpcs.xml -!build/phpmd.xml -!build/sami-config.xml +build diff --git a/.travis.yml b/.travis.yml index 8e8cd36..76f47b0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,18 @@ language: php -php: - - 5.3 - - 5.4 - - 5.5 + +matrix: + fast_finish: true + include: + - php: 5.4 + - php: 5.5 + - php: 5.6 + - php: 7 + - php: hhvm + allow_failures: + - php: 7 + - php: hhvm script: ./vendor/bin/phpunit -c ./phpunit.xml.dist ./tests/fixtures before_script: - composer self-update - - composer install --verbose \ No newline at end of file + - composer install --dev --prefer-source \ No newline at end of file diff --git a/README.md b/README.md index 318c176..d9f8377 100644 --- a/README.md +++ b/README.md @@ -4,39 +4,13 @@ No configuration is needed. This provider will replace your EventDispatcher class. Default Symfony events were not removed and have higher priority. -It means that PHPExtra event is always running after Symfony events. +It means that PHPExtra event is always running after Symfony event. -Below is a reference, to see how events from PHPExtra are mapped onto vanilla sf events. -All events are cancellable (propagationStop property in sf event). -**Unlike in Symfony, cancellable events are still sent to all listeners**. - -## Symfony event mapping +All events are cancellable using propagation flag set in symfony event. +Event will be triggered even if propagation will be stopped. +To see if event was cancelled, use `SilexEvent::isCancelled()` before taking any action. -``` -kernel.request -PHPExtra\EventManager\Silex\Event\RequestEvent -Symfony\Component\HttpKernel\Event\GetResponseEvent - -kernel.controller -PHPExtra\EventManager\Silex\Event\PreDispatchEvent -Symfony\Component\HttpKernel\Event\FilterControllerEvent - -kernel.view -PHPExtra\EventManager\Silex\Event\PostDispatchEvent -Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent - -kernel.response -PHPExtra\EventManager\Silex\Event\ResponseEvent -Symfony\Component\HttpKernel\Event\FilterResponseEvent - -kernel.finish_request -PHPExtra\EventManager\Silex\Event\PostRequestEvent -Symfony\Component\HttpKernel\Event\FinishRequestEvent - -kernel.terminate -PHPExtra\EventManager\Silex\Event\PostResponseEvent -Symfony\Component\HttpKernel\Event\PostResponseEvent -``` +**Unlike in Symfony, cancellable events are still sent to all listeners**. ##Installation and usage @@ -44,38 +18,65 @@ If you are using logger, it will be automatically injected into the event manage Every class can now be a listener. ```php +#bootstrap.php + $app = new Silex\Application(array('debug' => true)); $app->register(new \PHPExtra\EventManager\Silex\EventManagerProvider()); -$em = $app['event_manager']; -$em->addListener(new \PHPExtra\EventManager\Listener\AnonymousListener(function(RequestEvent $event){ - echo "Im in RequestEvent (Sf GetResponseEvent)"; -})); +$em = $app['event_manager']; -$em->addListener(new \PHPExtra\EventManager\Listener\AnonymousListener(function(SilexKernelEvent $event){ +$em->addListener(new \PHPExtra\EventManager\Listener\AnonymousListener(function(SilexEvent $event){ echo "Im in some Symfony KernelEvent !"; })); $em->addListener($app['my_controller']); - $em->addListener($app['mailer']); -... + +# etc ... ``` ##Exception handling -Exceptions that will occur during an event are suppressed in production mode. +Exceptions that will occur during an event are suppressed in production mode and **will not brake the event loop**. In development, the event manager will break the event loop and throw an exception. ```php $em->setThrowExceptions(false); // suppress exceptions and continue event loop ``` -##Profiling (Symfony stopwatch) +##Integration with profiler and symfony's Stopwatch component Stopwatch is enabled when debug mode is on. In production EventManager uses NullStopwatch. +## Symfony event mapping + +``` +kernel.request +PHPExtra\EventManager\Silex\Event\RequestEvent +Symfony\Component\HttpKernel\Event\GetResponseEvent + +kernel.controller +PHPExtra\EventManager\Silex\Event\PreDispatchEvent +Symfony\Component\HttpKernel\Event\FilterControllerEvent + +kernel.view +PHPExtra\EventManager\Silex\Event\PostDispatchEvent +Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent + +kernel.response +PHPExtra\EventManager\Silex\Event\ResponseEvent +Symfony\Component\HttpKernel\Event\FilterResponseEvent + +kernel.finish_request +PHPExtra\EventManager\Silex\Event\PostRequestEvent +Symfony\Component\HttpKernel\Event\FinishRequestEvent + +kernel.terminate +PHPExtra\EventManager\Silex\Event\PostResponseEvent +Symfony\Component\HttpKernel\Event\PostResponseEvent +``` + ##Contributing All code contributions must go through a pull request. @@ -84,10 +85,6 @@ To ensure a consistent code base, you should make sure the code follows the [coding standards](http://symfony.com/doc/2.0/contributing/code/standards.html). If you would like to help take a look at the list of issues. -##Requirements - -See **composer.json** for a full list of dependencies. - ##Authors Jacek Kobus - diff --git a/build.properties b/build.properties deleted file mode 100644 index c358503..0000000 --- a/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -#Tue, 15 Apr 2014 17:54:20 +0200 - -build.major.number=1 -build.minor.number=0 -build.revision.number=1 diff --git a/build.xml b/build.xml deleted file mode 100644 index e54ea93..0000000 --- a/build.xml +++ /dev/null @@ -1,149 +0,0 @@ - - - - - - - - - - - - - - - - - - Current version: ${build.version} - - - - - - - - - Release complete: - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - Changing build version towards the next release - - - - - - - - ${build.version} -> ${next.build.version} - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/composer.json b/composer.json index 115d595..c7ef875 100644 --- a/composer.json +++ b/composer.json @@ -14,13 +14,13 @@ } }, "require": { - "phpextra/event-manager": "~2.0@dev", - "symfony/stopwatch": "~2.5", - "silex/silex": "~1.2" + "php": "~5.4", + "phpextra/event-manager": "~3.0", + "silex/silex": "~1.3" }, "require-dev": { - "mockery/mockery": "0.9.2", - "phpunit/phpunit": "~4.2", - "symfony/browser-kit": "~2.5" + "silex/web-profiler": "~1.0", + "phpunit/phpunit": "~4.2", + "symfony/browser-kit": "~2.5" } } diff --git a/composer.lock b/composer.lock index 8c8a6d3..cc648cd 100644 --- a/composer.lock +++ b/composer.lock @@ -1,137 +1,33 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", "This file is @generated automatically" ], - "hash": "8e716739bae4e3c8827d01a1f2996940", + "hash": "cc8ca3783bd34305ee361227c2c629ef", "packages": [ - { - "name": "phpextra/collection", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/phpextra/collection.git", - "reference": "b692a5641f57c9082c89573cadde5146426a8eb9" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpextra/collection/zipball/b692a5641f57c9082c89573cadde5146426a8eb9", - "reference": "b692a5641f57c9082c89573cadde5146426a8eb9", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "phpextra/unknown": "dev-master as 1.0.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "PHPExtra\\Type\\Collection": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jacek Kobus", - "email": "kobus.jacek@gmail.com" - } - ], - "description": "Collection type for PHP", - "homepage": "https://github.com/phpextra/collection", - "keywords": [ - "collection" - ], - "time": "2014-10-20 20:29:15" - }, - { - "name": "phpextra/enum", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/phpextra/enum.git", - "reference": "c1862b41a4db9a9794bb32c16456f8ea4fdf7ce1" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpextra/enum/zipball/c1862b41a4db9a9794bb32c16456f8ea4fdf7ce1", - "reference": "c1862b41a4db9a9794bb32c16456f8ea4fdf7ce1", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "PHPExtra\\Type\\Enum": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jacek Kobus", - "email": "kobus.jacek@gmail.com" - } - ], - "description": "Enum type for PHP", - "homepage": "https://github.com/phpextra/enum", - "keywords": [ - "enum" - ], - "time": "2014-08-16 15:44:29" - }, { "name": "phpextra/event-manager", - "version": "2.0.x-dev", + "version": "3.0.x-dev", "source": { "type": "git", "url": "https://github.com/phpextra/event-manager.git", - "reference": "6c3fbf936ab8a4c2acad1e27e5f7bbac0820c571" + "reference": "6117646a8c3f0ab334cccba4f16f2f3ad2ad5473" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpextra/event-manager/zipball/6c3fbf936ab8a4c2acad1e27e5f7bbac0820c571", - "reference": "6c3fbf936ab8a4c2acad1e27e5f7bbac0820c571", + "url": "https://api.github.com/repos/phpextra/event-manager/zipball/6117646a8c3f0ab334cccba4f16f2f3ad2ad5473", + "reference": "6117646a8c3f0ab334cccba4f16f2f3ad2ad5473", "shasum": "" }, "require": { "php": ">=5.3.0", - "phpextra/collection": "dev-master as 1.0.0", - "phpextra/sorter": "dev-master as 1.0.0", "psr/log": "~1.0.0" }, "require-dev": { "phpunit/phpunit": "~4.2" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, "autoload": { "psr-0": { "PHPExtra\\EventManager": "src/" @@ -156,126 +52,19 @@ "observer", "psr-0" ], - "time": "2014-10-28 22:12:53" - }, - { - "name": "phpextra/sorter", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/phpextra/sorter.git", - "reference": "e5e2fc53f05940879623c54a4b569a1d91b53045" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpextra/sorter/zipball/e5e2fc53f05940879623c54a4b569a1d91b53045", - "reference": "e5e2fc53f05940879623c54a4b569a1d91b53045", - "shasum": "" - }, - "require": { - "ext-bcmath": "*", - "ext-intl": ">=1.0.0", - "php": ">=5.3.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "PHPExtra\\Sorter": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jacek Kobus", - "email": "kobus.jacek@gmail.com" - } - ], - "description": "Sort arrays and objects by multiple fields with unicode characters", - "homepage": "https://github.com/phpextra/sorter", - "keywords": [ - "array", - "collections", - "objects", - "psr-0", - "sort", - "sorter" - ], - "time": "2014-10-24 10:05:31" - }, - { - "name": "phpextra/unknown", - "version": "dev-master", - "source": { - "type": "git", - "url": "https://github.com/phpextra/unknown.git", - "reference": "c24b3058fe3393df71d109f6b3bea44c2355b72c" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpextra/unknown/zipball/c24b3058fe3393df71d109f6b3bea44c2355b72c", - "reference": "c24b3058fe3393df71d109f6b3bea44c2355b72c", - "shasum": "" - }, - "require": { - "php": ">=5.3.0", - "phpextra/collection": "dev-master as 1.0.0", - "phpextra/enum": "~1.0", - "phpextra/sorter": "~1.0" - }, - "require-dev": { - "phpunit/phpunit": "~4.2" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "PHPExtra\\Type\\Unknown": "src/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Jacek Kobus", - "email": "kobus.jacek@gmail.com" - } - ], - "description": "Unknown type for PHP", - "homepage": "https://github.com/phpextra/unknown", - "keywords": [ - "object wrapper", - "unknown type" - ], - "time": "2014-10-21 09:34:08" + "time": "2015-06-05 11:05:11" }, { "name": "pimple/pimple", "version": "1.1.x-dev", "source": { "type": "git", - "url": "https://github.com/fabpot/Pimple.git", + "url": "https://github.com/silexphp/Pimple.git", "reference": "bc2fc12cdf1f29bcad9e650d493a54a8fd1f3d85" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/fabpot/Pimple/zipball/bc2fc12cdf1f29bcad9e650d493a54a8fd1f3d85", + "url": "https://api.github.com/repos/silexphp/Pimple/zipball/bc2fc12cdf1f29bcad9e650d493a54a8fd1f3d85", "reference": "bc2fc12cdf1f29bcad9e650d493a54a8fd1f3d85", "shasum": "" }, @@ -319,14 +108,17 @@ "source": { "type": "git", "url": "https://github.com/php-fig/log.git", - "reference": "a78d6504ff5d4367497785ab2ade91db3a9fbe11" + "reference": "9e45edca52cc9c954680072c93e621f8b71fab26" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/a78d6504ff5d4367497785ab2ade91db3a9fbe11", - "reference": "a78d6504ff5d4367497785ab2ade91db3a9fbe11", + "url": "https://api.github.com/repos/php-fig/log/zipball/9e45edca52cc9c954680072c93e621f8b71fab26", + "reference": "9e45edca52cc9c954680072c93e621f8b71fab26", "shasum": "" }, + "require": { + "php": ">=5.3.0" + }, "type": "library", "extra": { "branch-alias": { @@ -334,8 +126,8 @@ } }, "autoload": { - "psr-0": { - "Psr\\Log\\": "" + "psr-4": { + "Psr\\Log\\": "Psr/Log/" } }, "notification-url": "https://packagist.org/downloads/", @@ -354,67 +146,67 @@ "psr", "psr-3" ], - "time": "2014-01-18 15:33:09" + "time": "2015-06-02 13:48:41" }, { "name": "silex/silex", - "version": "1.2.x-dev", + "version": "1.3.x-dev", "source": { "type": "git", "url": "https://github.com/silexphp/Silex.git", - "reference": "2603afb3d2d902a3dbc19075d91f0b39a9d46c40" + "reference": "44d736ff81c41ba1d73c7927d1f53c47e60c42d5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/silexphp/Silex/zipball/2603afb3d2d902a3dbc19075d91f0b39a9d46c40", - "reference": "2603afb3d2d902a3dbc19075d91f0b39a9d46c40", + "url": "https://api.github.com/repos/silexphp/Silex/zipball/44d736ff81c41ba1d73c7927d1f53c47e60c42d5", + "reference": "44d736ff81c41ba1d73c7927d1f53c47e60c42d5", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=5.3.9", "pimple/pimple": "~1.0", - "symfony/event-dispatcher": ">=2.3,<2.6-dev", - "symfony/http-foundation": ">=2.3,<2.6-dev", - "symfony/http-kernel": ">=2.3,<2.6-dev", - "symfony/routing": ">=2.3,<2.6-dev" + "symfony/event-dispatcher": "~2.3,<3.0", + "symfony/http-foundation": "~2.3,<3.0", + "symfony/http-kernel": "~2.3,<3.0", + "symfony/routing": "~2.3,<3.0" }, "require-dev": { "doctrine/dbal": "~2.2", "monolog/monolog": "~1.4,>=1.4.1", "swiftmailer/swiftmailer": "5.*", - "symfony/browser-kit": ">=2.3,<2.6-dev", - "symfony/config": ">=2.3,<2.6-dev", - "symfony/css-selector": ">=2.3,<2.6-dev", - "symfony/debug": ">=2.3,<2.6-dev", - "symfony/dom-crawler": ">=2.3,<2.6-dev", - "symfony/finder": ">=2.3,<2.6-dev", - "symfony/form": ">=2.3,<2.6-dev", - "symfony/locale": ">=2.3,<2.6-dev", - "symfony/monolog-bridge": ">=2.3,<2.6-dev", - "symfony/options-resolver": ">=2.3,<2.6-dev", - "symfony/process": ">=2.3,<2.6-dev", - "symfony/security": ">=2.3,<2.6-dev", - "symfony/serializer": ">=2.3,<2.6-dev", - "symfony/translation": ">=2.3,<2.6-dev", - "symfony/twig-bridge": ">=2.3,<2.6-dev", - "symfony/validator": ">=2.3,<2.6-dev", + "symfony/browser-kit": "~2.3,<3.0", + "symfony/config": "~2.3,<3.0", + "symfony/css-selector": "~2.3,<3.0", + "symfony/debug": "~2.3,<3.0", + "symfony/dom-crawler": "~2.3,<3.0", + "symfony/finder": "~2.3,<3.0", + "symfony/form": "~2.3,<3.0", + "symfony/locale": "~2.3,<3.0", + "symfony/monolog-bridge": "~2.3,<3.0", + "symfony/options-resolver": "~2.3,<3.0", + "symfony/process": "~2.3,<3.0", + "symfony/security": "~2.3,<3.0", + "symfony/serializer": "~2.3,<3.0", + "symfony/translation": "~2.3,<3.0", + "symfony/twig-bridge": "~2.3,<3.0", + "symfony/validator": "~2.3,<3.0", "twig/twig": ">=1.8.0,<2.0-dev" }, "suggest": { - "symfony/browser-kit": ">=2.3,<2.6-dev", - "symfony/css-selector": ">=2.3,<2.6-dev", - "symfony/dom-crawler": ">=2.3,<2.6-dev", - "symfony/form": ">=2.3,<2.6-dev" + "symfony/browser-kit": "~2.3", + "symfony/css-selector": "~2.3", + "symfony/dom-crawler": "~2.3", + "symfony/form": "~2.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { - "psr-0": { - "Silex": "src/" + "psr-4": { + "Silex\\": "src/Silex" } }, "notification-url": "https://packagist.org/downloads/", @@ -436,30 +228,34 @@ "keywords": [ "microframework" ], - "time": "2014-10-12 12:14:54" + "time": "2015-06-04 21:29:31" }, { "name": "symfony/debug", - "version": "dev-master", - "target-dir": "Symfony/Component/Debug", + "version": "2.8.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/Debug.git", - "reference": "5e0da6230cf3aad7e0a6d992b7aa416f6b8e59c8" + "reference": "36805d83b3277cd49d5a31f0cef78c2ace09eef5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/5e0da6230cf3aad7e0a6d992b7aa416f6b8e59c8", - "reference": "5e0da6230cf3aad7e0a6d992b7aa416f6b8e59c8", + "url": "https://api.github.com/repos/symfony/Debug/zipball/36805d83b3277cd49d5a31f0cef78c2ace09eef5", + "reference": "36805d83b3277cd49d5a31f0cef78c2ace09eef5", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=5.3.9", "psr/log": "~1.0" }, + "conflict": { + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" + }, "require-dev": { - "symfony/http-foundation": "~2.1", - "symfony/http-kernel": "~2.1" + "symfony/class-loader": "~2.2|~3.0.0", + "symfony/http-foundation": "~2.1|~3.0.0", + "symfony/http-kernel": "~2.3.24|~2.5.9|~2.6,>=2.6.2|~3.0.0", + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "suggest": { "symfony/http-foundation": "", @@ -468,11 +264,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.8-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Debug\\": "" } }, @@ -481,42 +277,43 @@ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony Debug Component", - "homepage": "http://symfony.com", - "time": "2014-10-26 07:46:28" + "homepage": "https://symfony.com", + "time": "2015-06-04 20:21:09" }, { "name": "symfony/event-dispatcher", - "version": "2.5.x-dev", - "target-dir": "Symfony/Component/EventDispatcher", + "version": "2.8.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "5beb53f4f3d89dd6209d14494ade282af169fb15" + "reference": "8766cebf28beac9a45b511d7dba053da9d35eb9f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/5beb53f4f3d89dd6209d14494ade282af169fb15", - "reference": "5beb53f4f3d89dd6209d14494ade282af169fb15", + "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/8766cebf28beac9a45b511d7dba053da9d35eb9f", + "reference": "8766cebf28beac9a45b511d7dba053da9d35eb9f", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" }, "require-dev": { "psr/log": "~1.0", - "symfony/config": "~2.0", - "symfony/dependency-injection": "~2.0,<2.6.0", - "symfony/stopwatch": "~2.2" + "symfony/config": "~2.0,>=2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" }, "suggest": { "symfony/dependency-injection": "", @@ -525,11 +322,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.8-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\EventDispatcher\\": "" } }, @@ -538,52 +335,52 @@ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony EventDispatcher Component", - "homepage": "http://symfony.com", - "time": "2014-10-26 07:41:27" + "homepage": "https://symfony.com", + "time": "2015-05-12 15:16:46" }, { "name": "symfony/http-foundation", - "version": "2.5.x-dev", - "target-dir": "Symfony/Component/HttpFoundation", + "version": "2.8.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "b7ddbe0b53a807bc3eb3143a9fbdc2818dfaa489" + "reference": "bc048f0cb84726b12d75983596eb61f5326c4295" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/b7ddbe0b53a807bc3eb3143a9fbdc2818dfaa489", - "reference": "b7ddbe0b53a807bc3eb3143a9fbdc2818dfaa489", + "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/bc048f0cb84726b12d75983596eb61f5326c4295", + "reference": "bc048f0cb84726b12d75983596eb61f5326c4295", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" }, "require-dev": { - "symfony/expression-language": "~2.4" + "symfony/expression-language": "~2.4|~3.0.0", + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.8-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\HttpFoundation\\": "" }, "classmap": [ - "Symfony/Component/HttpFoundation/Resources/stubs" + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -591,53 +388,60 @@ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony HttpFoundation Component", - "homepage": "http://symfony.com", - "time": "2014-10-26 07:41:27" + "homepage": "https://symfony.com", + "time": "2015-06-04 20:21:09" }, { "name": "symfony/http-kernel", - "version": "2.5.x-dev", - "target-dir": "Symfony/Component/HttpKernel", + "version": "2.8.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/HttpKernel.git", - "reference": "64a1e7a008c631896b60a4a1cdddb7affcaedc7e" + "reference": "f479a5495969db305eb8b69d02cf5cedbe664fbf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/64a1e7a008c631896b60a4a1cdddb7affcaedc7e", - "reference": "64a1e7a008c631896b60a4a1cdddb7affcaedc7e", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/f479a5495969db305eb8b69d02cf5cedbe664fbf", + "reference": "f479a5495969db305eb8b69d02cf5cedbe664fbf", "shasum": "" }, "require": { - "php": ">=5.3.3", + "php": ">=5.3.9", "psr/log": "~1.0", - "symfony/debug": "~2.5", - "symfony/event-dispatcher": "~2.5", - "symfony/http-foundation": "~2.5" + "symfony/debug": "~2.6,>=2.6.2", + "symfony/event-dispatcher": "~2.5.9|~2.6,>=2.6.2|~3.0.0", + "symfony/http-foundation": "~2.5,>=2.5.4|~3.0.0" + }, + "conflict": { + "symfony/config": "<2.7" }, "require-dev": { - "symfony/browser-kit": "~2.2", - "symfony/class-loader": "~2.1", - "symfony/config": "~2.0", - "symfony/console": "~2.2", - "symfony/dependency-injection": "~2.0", - "symfony/expression-language": "~2.4", - "symfony/finder": "~2.0", - "symfony/process": "~2.0", - "symfony/routing": "~2.2", - "symfony/stopwatch": "~2.2", - "symfony/templating": "~2.2" + "symfony/browser-kit": "~2.3|~3.0.0", + "symfony/class-loader": "~2.1|~3.0.0", + "symfony/config": "~2.7", + "symfony/console": "~2.3|~3.0.0", + "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.2|~3.0.0", + "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0", + "symfony/expression-language": "~2.4|~3.0.0", + "symfony/finder": "~2.0,>=2.0.5|~3.0.0", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/process": "~2.0,>=2.0.5|~3.0.0", + "symfony/routing": "~2.2|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0", + "symfony/templating": "~2.2|~3.0.0", + "symfony/translation": "~2.0,>=2.0.5|~3.0.0", + "symfony/var-dumper": "~2.6|~3.0.0" }, "suggest": { "symfony/browser-kit": "", @@ -645,16 +449,17 @@ "symfony/config": "", "symfony/console": "", "symfony/dependency-injection": "", - "symfony/finder": "" + "symfony/finder": "", + "symfony/var-dumper": "" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.8-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\HttpKernel\\": "" } }, @@ -663,44 +468,48 @@ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony HttpKernel Component", - "homepage": "http://symfony.com", - "time": "2014-10-26 07:41:27" + "homepage": "https://symfony.com", + "time": "2015-06-04 20:21:09" }, { "name": "symfony/routing", - "version": "2.5.x-dev", - "target-dir": "Symfony/Component/Routing", + "version": "2.8.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/Routing.git", - "reference": "eb5986e6b29e7e9b1afb7e42dd7055ab8169d576" + "reference": "0992f0bab04c2753a6a3747ea58cd80b26e5ad49" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/eb5986e6b29e7e9b1afb7e42dd7055ab8169d576", - "reference": "eb5986e6b29e7e9b1afb7e42dd7055ab8169d576", + "url": "https://api.github.com/repos/symfony/Routing/zipball/0992f0bab04c2753a6a3747ea58cd80b26e5ad49", + "reference": "0992f0bab04c2753a6a3747ea58cd80b26e5ad49", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" + }, + "conflict": { + "symfony/config": "<2.7" }, "require-dev": { "doctrine/annotations": "~1.0", + "doctrine/common": "~2.2", "psr/log": "~1.0", - "symfony/config": "~2.2", - "symfony/expression-language": "~2.4", - "symfony/http-foundation": "~2.3", - "symfony/yaml": "~2.0" + "symfony/config": "~2.7|~3.0.0", + "symfony/expression-language": "~2.4|~3.0.0", + "symfony/http-foundation": "~2.3|~3.0.0", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/yaml": "~2.0,>=2.0.5|~3.0.0" }, "suggest": { "doctrine/annotations": "For using the annotation loader", @@ -711,11 +520,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5-dev" + "dev-master": "2.8-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Routing\\": "" } }, @@ -724,71 +533,24 @@ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony Routing Component", - "homepage": "http://symfony.com", + "homepage": "https://symfony.com", "keywords": [ "router", "routing", "uri", "url" ], - "time": "2014-10-26 07:41:27" - }, - { - "name": "symfony/stopwatch", - "version": "dev-master", - "target-dir": "Symfony/Component/Stopwatch", - "source": { - "type": "git", - "url": "https://github.com/symfony/Stopwatch.git", - "reference": "f7cca9c342ce395d2aa17383d0f9a409d81ca585" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/f7cca9c342ce395d2aa17383d0f9a409d81ca585", - "reference": "f7cca9c342ce395d2aa17383d0f9a409d81ca585", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.6-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Stopwatch\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - } - ], - "description": "Symfony Stopwatch Component", - "homepage": "http://symfony.com", - "time": "2014-09-22 11:59:59" + "time": "2015-06-04 20:21:09" } ], "packages-dev": [ @@ -798,12 +560,12 @@ "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119" + "reference": "b70d22758c0813ea5fef9c22480caadd3a2b6a56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f976e5de371104877ebc89bd8fecb0019ed9c119", - "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/b70d22758c0813ea5fef9c22480caadd3a2b6a56", + "reference": "b70d22758c0813ea5fef9c22480caadd3a2b6a56", "shasum": "" }, "require": { @@ -814,7 +576,7 @@ "ext-pdo": "*", "ext-phar": "*", "phpunit/phpunit": "~4.0", - "squizlabs/php_codesniffer": "2.0.*@ALPHA" + "squizlabs/php_codesniffer": "~2.0" }, "type": "library", "extra": { @@ -823,8 +585,8 @@ } }, "autoload": { - "psr-0": { - "Doctrine\\Instantiator\\": "src" + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" } }, "notification-url": "https://packagist.org/downloads/", @@ -844,73 +606,7 @@ "constructor", "instantiate" ], - "time": "2014-10-13 12:58:55" - }, - { - "name": "mockery/mockery", - "version": "0.9.2", - "source": { - "type": "git", - "url": "https://github.com/padraic/mockery.git", - "reference": "95a4855380dc70176c51807c678fb3bd6198529a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/padraic/mockery/zipball/95a4855380dc70176c51807c678fb3bd6198529a", - "reference": "95a4855380dc70176c51807c678fb3bd6198529a", - "shasum": "" - }, - "require": { - "lib-pcre": ">=7.0", - "php": ">=5.3.2" - }, - "require-dev": { - "hamcrest/hamcrest-php": "~1.1", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "~0.7@dev" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "0.9.x-dev" - } - }, - "autoload": { - "psr-0": { - "Mockery": "library/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "BSD-3-Clause" - ], - "authors": [ - { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" - }, - { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" - } - ], - "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succint API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", - "homepage": "http://github.com/padraic/mockery", - "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" - ], - "time": "2014-09-03 10:11:10" + "time": "2015-05-13 13:33:36" }, { "name": "phpdocumentor/reflection-docblock", @@ -918,12 +614,12 @@ "source": { "type": "git", "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "fd0ac2007401505fb596fdfb859ec4e103d69e55" + "reference": "ae15da2ce234d3ffe5d7fafcdad19c7f1acf3568" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/fd0ac2007401505fb596fdfb859ec4e103d69e55", - "reference": "fd0ac2007401505fb596fdfb859ec4e103d69e55", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/ae15da2ce234d3ffe5d7fafcdad19c7f1acf3568", + "reference": "ae15da2ce234d3ffe5d7fafcdad19c7f1acf3568", "shasum": "" }, "require": { @@ -933,8 +629,8 @@ "phpunit/phpunit": "~4.0" }, "suggest": { - "dflydev/markdown": "~1.0", - "erusev/parsedown": "~1.0" + "erusev/parsedown": "~1.0", + "league/commonmark": "*" }, "type": "library", "extra": { @@ -959,7 +655,7 @@ "email": "mike.vanriel@naenius.com" } ], - "time": "2014-09-02 14:26:20" + "time": "2015-05-12 07:21:12" }, { "name": "phpspec/prophecy", @@ -967,17 +663,18 @@ "source": { "type": "git", "url": "https://github.com/phpspec/prophecy.git", - "reference": "2bbc78d0b4b1ce8049479395ba950d4b13f21d94" + "reference": "5a355f91730c845301a9e28f91c8a5053353c496" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/2bbc78d0b4b1ce8049479395ba950d4b13f21d94", - "reference": "2bbc78d0b4b1ce8049479395ba950d4b13f21d94", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/5a355f91730c845301a9e28f91c8a5053353c496", + "reference": "5a355f91730c845301a9e28f91c8a5053353c496", "shasum": "" }, "require": { - "doctrine/instantiator": "~1.0,>=1.0.2", - "phpdocumentor/reflection-docblock": "~2.0" + "doctrine/instantiator": "^1.0.2", + "phpdocumentor/reflection-docblock": "~2.0", + "sebastian/comparator": "~1.1" }, "require-dev": { "phpspec/phpspec": "~2.0" @@ -985,7 +682,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.4.x-dev" } }, "autoload": { @@ -1009,7 +706,7 @@ } ], "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "http://phpspec.org", + "homepage": "https://github.com/phpspec/prophecy", "keywords": [ "Double", "Dummy", @@ -1018,58 +715,7 @@ "spy", "stub" ], - "time": "2014-10-05 19:43:51" - }, - { - "name": "phpspec/prophecy-phpunit", - "version": "dev-master", - "target-dir": "Prophecy/PhpUnit", - "source": { - "type": "git", - "url": "https://github.com/phpspec/prophecy-phpunit.git", - "reference": "7abfc68caf9ec4c36346d170cdf68e441c2b4c8b" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy-phpunit/zipball/7abfc68caf9ec4c36346d170cdf68e441c2b4c8b", - "reference": "7abfc68caf9ec4c36346d170cdf68e441c2b4c8b", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "phpspec/prophecy": "~1.0" - }, - "suggest": { - "phpunit/phpunit": "if it is not installed globally" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.0.x-dev" - } - }, - "autoload": { - "psr-0": { - "Prophecy\\PhpUnit\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Christophe Coevoet", - "email": "stof@notk.org" - } - ], - "description": "PhpUnit test case integrating the Prophecy mocking library", - "homepage": "http://phpspec.net", - "keywords": [ - "phpunit", - "prophecy" - ], - "time": "2014-08-06 14:25:57" + "time": "2015-05-20 16:00:43" }, { "name": "phpunit/php-code-coverage", @@ -1077,12 +723,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "28d21b57c189cb72829056353de603c4d4da55a0" + "reference": "2b2747ae77a183948250c2ea5302b396ae9749fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/28d21b57c189cb72829056353de603c4d4da55a0", - "reference": "28d21b57c189cb72829056353de603c4d4da55a0", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/2b2747ae77a183948250c2ea5302b396ae9749fb", + "reference": "2b2747ae77a183948250c2ea5302b396ae9749fb", "shasum": "" }, "require": { @@ -1095,7 +741,7 @@ }, "require-dev": { "ext-xdebug": ">=2.1.4", - "phpunit/phpunit": "dev-master" + "phpunit/phpunit": "~4" }, "suggest": { "ext-dom": "*", @@ -1105,7 +751,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "2.2.x-dev" } }, "autoload": { @@ -1131,35 +777,37 @@ "testing", "xunit" ], - "time": "2014-10-05 10:46:54" + "time": "2015-06-04 07:35:25" }, { "name": "phpunit/php-file-iterator", - "version": "1.3.4", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" + "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/a923bb15680d0089e2316f7a4af8f437046e96bb", + "reference": "a923bb15680d0089e2316f7a4af8f437046e96bb", "shasum": "" }, "require": { "php": ">=5.3.3" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, "autoload": { "classmap": [ - "File/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], @@ -1176,7 +824,7 @@ "filesystem", "iterator" ], - "time": "2013-10-10 15:34:57" + "time": "2015-04-02 05:19:05" }, { "name": "phpunit/php-text-template", @@ -1272,12 +920,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "f8d5d08c56de5cfd592b3340424a81733259a876" + "reference": "eab81d02569310739373308137284e0158424330" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/f8d5d08c56de5cfd592b3340424a81733259a876", - "reference": "f8d5d08c56de5cfd592b3340424a81733259a876", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/eab81d02569310739373308137284e0158424330", + "reference": "eab81d02569310739373308137284e0158424330", "shasum": "" }, "require": { @@ -1290,7 +938,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.3-dev" + "dev-master": "1.4-dev" } }, "autoload": { @@ -1313,20 +961,20 @@ "keywords": [ "tokenizer" ], - "time": "2014-08-31 06:12:13" + "time": "2015-04-08 04:46:07" }, { "name": "phpunit/phpunit", - "version": "dev-master", + "version": "4.8.x-dev", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "018d9c639ad30226cc879ef866a4f6cad10b7e56" + "reference": "4c8222398ad122ccf7929e1f9b43301603a2ec39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/018d9c639ad30226cc879ef866a4f6cad10b7e56", - "reference": "018d9c639ad30226cc879ef866a4f6cad10b7e56", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/4c8222398ad122ccf7929e1f9b43301603a2ec39", + "reference": "4c8222398ad122ccf7929e1f9b43301603a2ec39", "shasum": "" }, "require": { @@ -1336,19 +984,19 @@ "ext-reflection": "*", "ext-spl": "*", "php": ">=5.3.3", - "phpspec/prophecy-phpunit": "~1.0", - "phpunit/php-code-coverage": "3.0.*@dev", - "phpunit/php-file-iterator": "~1.3.2", + "phpspec/prophecy": "~1.3,>=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.2", - "phpunit/phpunit-mock-objects": "2.4.*@dev", - "sebastian/comparator": "1.1.*@dev", - "sebastian/diff": "~1.1", + "phpunit/php-timer": "~1.0", + "phpunit/phpunit-mock-objects": "~2.3", + "sebastian/comparator": "~1.1", + "sebastian/diff": "~1.2", "sebastian/environment": "~1.2", - "sebastian/exporter": "~1.0", - "sebastian/global-state": "1.0.*@dev", + "sebastian/exporter": "~1.2", + "sebastian/global-state": "~1.0", "sebastian/version": "~1.0", - "symfony/yaml": "~2.0" + "symfony/yaml": "~2.1|~3.0" }, "suggest": { "phpunit/php-invoker": "~1.1" @@ -1359,7 +1007,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.5.x-dev" + "dev-master": "4.8.x-dev" } }, "autoload": { @@ -1385,7 +1033,7 @@ "testing", "xunit" ], - "time": "2014-10-27 16:44:02" + "time": "2015-06-05 05:59:40" }, { "name": "phpunit/phpunit-mock-objects", @@ -1393,12 +1041,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "96c5b81f9842f38fe6c73ad0020306cc4862a9e3" + "reference": "5034a3d9f2057a7b7d6ad03a984509dadfdda3cc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/96c5b81f9842f38fe6c73ad0020306cc4862a9e3", - "reference": "96c5b81f9842f38fe6c73ad0020306cc4862a9e3", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5034a3d9f2057a7b7d6ad03a984509dadfdda3cc", + "reference": "5034a3d9f2057a7b7d6ad03a984509dadfdda3cc", "shasum": "" }, "require": { @@ -1407,7 +1055,7 @@ "phpunit/php-text-template": "~1.2" }, "require-dev": { - "phpunit/phpunit": "4.4.*@dev" + "phpunit/phpunit": "~4.4" }, "suggest": { "ext-soap": "*" @@ -1415,7 +1063,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.4.x-dev" + "dev-master": "2.3.x-dev" } }, "autoload": { @@ -1440,7 +1088,7 @@ "mock", "xunit" ], - "time": "2014-10-04 10:04:20" + "time": "2015-06-03 13:12:50" }, { "name": "sebastian/comparator", @@ -1448,21 +1096,21 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "6f67d2ae044ba17ba30573941f4ac96c4777be97" + "reference": "1dd8869519a225f7f2b9eb663e225298fade819e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/6f67d2ae044ba17ba30573941f4ac96c4777be97", - "reference": "6f67d2ae044ba17ba30573941f4ac96c4777be97", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1dd8869519a225f7f2b9eb663e225298fade819e", + "reference": "1dd8869519a225f7f2b9eb663e225298fade819e", "shasum": "" }, "require": { "php": ">=5.3.3", - "sebastian/diff": "~1.1", - "sebastian/exporter": "~1.0" + "sebastian/diff": "~1.2", + "sebastian/exporter": "~1.2" }, "require-dev": { - "phpunit/phpunit": "~4.1" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { @@ -1504,7 +1152,7 @@ "compare", "equality" ], - "time": "2014-10-21 10:04:18" + "time": "2015-01-29 16:28:08" }, { "name": "sebastian/diff", @@ -1512,12 +1160,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "92d423df43b160006907ea4297b916fdf00415d8" + "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/92d423df43b160006907ea4297b916fdf00415d8", - "reference": "92d423df43b160006907ea4297b916fdf00415d8", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3", + "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3", "shasum": "" }, "require": { @@ -1529,7 +1177,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.3-dev" } }, "autoload": { @@ -1556,7 +1204,7 @@ "keywords": [ "diff" ], - "time": "2014-10-19 13:19:30" + "time": "2015-02-22 15:13:53" }, { "name": "sebastian/environment", @@ -1564,24 +1212,24 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "6e6c71d918088c251b181ba8b3088af4ac336dd7" + "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6e6c71d918088c251b181ba8b3088af4ac336dd7", - "reference": "6e6c71d918088c251b181ba8b3088af4ac336dd7", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5a8c7d31914337b69923db26c4221b81ff5a196e", + "reference": "5a8c7d31914337b69923db26c4221b81ff5a196e", "shasum": "" }, "require": { "php": ">=5.3.3" }, "require-dev": { - "phpunit/phpunit": "~4.3" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.3.x-dev" } }, "autoload": { @@ -1606,7 +1254,7 @@ "environment", "hhvm" ], - "time": "2014-10-25 08:00:45" + "time": "2015-01-01 10:01:08" }, { "name": "sebastian/exporter", @@ -1614,24 +1262,25 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0" + "reference": "84839970d05254c73cde183a721c7af13aede943" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c7d59948d6e82818e1bdff7cadb6c34710eb7dc0", - "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/84839970d05254c73cde183a721c7af13aede943", + "reference": "84839970d05254c73cde183a721c7af13aede943", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "sebastian/recursion-context": "~1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "phpunit/phpunit": "~4.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.2.x-dev" } }, "autoload": { @@ -1671,7 +1320,7 @@ "export", "exporter" ], - "time": "2014-09-10 00:51:36" + "time": "2015-01-27 07:23:06" }, { "name": "sebastian/global-state", @@ -1679,12 +1328,12 @@ "source": { "type": "git", "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "231d48620efde984fd077ee92916099a3ece9a59" + "reference": "007c441df427cf0e175372fcbb9d196bce7eb743" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/231d48620efde984fd077ee92916099a3ece9a59", - "reference": "231d48620efde984fd077ee92916099a3ece9a59", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/007c441df427cf0e175372fcbb9d196bce7eb743", + "reference": "007c441df427cf0e175372fcbb9d196bce7eb743", "shasum": "" }, "require": { @@ -1722,20 +1371,73 @@ "keywords": [ "global state" ], - "time": "2014-10-06 09:49:11" + "time": "2015-01-20 04:09:31" + }, + { + "name": "sebastian/recursion-context", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "3989662bbb30a29d20d9faa04a846af79b276252" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/3989662bbb30a29d20d9faa04a846af79b276252", + "reference": "3989662bbb30a29d20d9faa04a846af79b276252", + "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-01-24 09:48:32" }, { "name": "sebastian/version", - "version": "1.0.3", + "version": "1.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43" + "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", - "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/ab931d46cd0d3204a91e1b9a40c4bc13032b58e4", + "reference": "ab931d46cd0d3204a91e1b9a40c4bc13032b58e4", "shasum": "" }, "type": "library", @@ -1757,30 +1459,75 @@ ], "description": "Library that helps with managing the version number of Git-hosted PHP projects", "homepage": "https://github.com/sebastianbergmann/version", - "time": "2014-03-07 15:35:33" + "time": "2015-02-24 06:35:25" + }, + { + "name": "silex/web-profiler", + "version": "1.0.x-dev", + "target-dir": "Silex/Provider", + "source": { + "type": "git", + "url": "https://github.com/silexphp/Silex-WebProfiler.git", + "reference": "2afc6ba14f345d0a2ef70fe656e8a59ff52beb49" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/silexphp/Silex-WebProfiler/zipball/2afc6ba14f345d0a2ef70fe656e8a59ff52beb49", + "reference": "2afc6ba14f345d0a2ef70fe656e8a59ff52beb49", + "shasum": "" + }, + "require": { + "silex/silex": "~1.1", + "symfony/stopwatch": "~2.2", + "symfony/web-profiler-bundle": "~2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Silex\\Provider\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + } + ], + "description": "A WebProfiler for Silex", + "homepage": "http://silex.sensiolabs.org/", + "time": "2015-06-04 14:27:33" }, { "name": "symfony/browser-kit", - "version": "dev-master", - "target-dir": "Symfony/Component/BrowserKit", + "version": "2.8.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/BrowserKit.git", - "reference": "de6a5b6d09a67f5b53ce423a320b75afb335cca0" + "reference": "b312440539a8bda4ec9a5016fc68a2fad96b49da" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/de6a5b6d09a67f5b53ce423a320b75afb335cca0", - "reference": "de6a5b6d09a67f5b53ce423a320b75afb335cca0", + "url": "https://api.github.com/repos/symfony/BrowserKit/zipball/b312440539a8bda4ec9a5016fc68a2fad96b49da", + "reference": "b312440539a8bda4ec9a5016fc68a2fad96b49da", "shasum": "" }, "require": { - "php": ">=5.3.3", - "symfony/dom-crawler": "~2.0" + "php": ">=5.3.9", + "symfony/dom-crawler": "~2.0,>=2.0.5|~3.0.0" }, "require-dev": { - "symfony/css-selector": "~2.0", - "symfony/process": "~2.0" + "symfony/css-selector": "~2.0,>=2.0.5|~3.0.0", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/process": "~2.0,>=2.0.5|~3.0.0" }, "suggest": { "symfony/process": "" @@ -1788,11 +1535,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.8-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\BrowserKit\\": "" } }, @@ -1801,39 +1548,39 @@ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony BrowserKit Component", - "homepage": "http://symfony.com", - "time": "2014-10-26 07:46:28" + "homepage": "https://symfony.com", + "time": "2015-06-04 20:21:09" }, { "name": "symfony/dom-crawler", - "version": "dev-master", - "target-dir": "Symfony/Component/DomCrawler", + "version": "2.8.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/DomCrawler.git", - "reference": "4ce6a72b51cc79c3b4b20f88cbe56b36af4b073c" + "reference": "3fb7dae9cc8787f3ac20cc6ceefe22bf40bae9b8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/4ce6a72b51cc79c3b4b20f88cbe56b36af4b073c", - "reference": "4ce6a72b51cc79c3b4b20f88cbe56b36af4b073c", + "url": "https://api.github.com/repos/symfony/DomCrawler/zipball/3fb7dae9cc8787f3ac20cc6ceefe22bf40bae9b8", + "reference": "3fb7dae9cc8787f3ac20cc6ceefe22bf40bae9b8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" }, "require-dev": { - "symfony/css-selector": "~2.0" + "symfony/css-selector": "~2.3|~3.0.0", + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "suggest": { "symfony/css-selector": "" @@ -1841,11 +1588,11 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.8-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\DomCrawler\\": "" } }, @@ -1854,45 +1601,230 @@ "MIT" ], "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony DomCrawler Component", + "homepage": "https://symfony.com", + "time": "2015-06-04 20:21:09" + }, + { + "name": "symfony/stopwatch", + "version": "2.8.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/Stopwatch.git", + "reference": "a3cf998e50cae3e32e81e401150c7d4b3ecc03d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/a3cf998e50cae3e32e81e401150c7d4b3ecc03d5", + "reference": "a3cf998e50cae3e32e81e401150c7d4b3ecc03d5", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7|~3.0.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Stopwatch\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, { "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Stopwatch Component", + "homepage": "https://symfony.com", + "time": "2015-06-04 20:21:09" + }, + { + "name": "symfony/twig-bridge", + "version": "2.8.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/TwigBridge.git", + "reference": "994eb58d94ece611260ecaa5bc41cb5b772e67db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/TwigBridge/zipball/994eb58d94ece611260ecaa5bc41cb5b772e67db", + "reference": "994eb58d94ece611260ecaa5bc41cb5b772e67db", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "twig/twig": "~1.18" + }, + "require-dev": { + "symfony/asset": "~2.7|~3.0.0", + "symfony/console": "~2.7|~3.0.0", + "symfony/expression-language": "~2.4|~3.0.0", + "symfony/finder": "~2.3|~3.0.0", + "symfony/form": "~2.8|~3.0.0", + "symfony/http-kernel": "~2.3|~3.0.0", + "symfony/intl": "~2.3|~3.0.0", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/routing": "~2.2|~3.0.0", + "symfony/security": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.2|~3.0.0", + "symfony/templating": "~2.1|~3.0.0", + "symfony/translation": "~2.7|~3.0.0", + "symfony/var-dumper": "~2.6|~3.0.0", + "symfony/yaml": "~2.0,>=2.0.5|~3.0.0" + }, + "suggest": { + "symfony/asset": "For using the AssetExtension", + "symfony/expression-language": "For using the ExpressionExtension", + "symfony/finder": "", + "symfony/form": "For using the FormExtension", + "symfony/http-kernel": "For using the HttpKernelExtension", + "symfony/routing": "For using the RoutingExtension", + "symfony/security": "For using the SecurityExtension", + "symfony/stopwatch": "For using the StopwatchExtension", + "symfony/templating": "For using the TwigEngine", + "symfony/translation": "For using the TranslationExtension", + "symfony/var-dumper": "For using the DumpExtension", + "symfony/yaml": "For using the YamlExtension" + }, + "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bridge\\Twig\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Twig Bridge", + "homepage": "https://symfony.com", + "time": "2015-06-04 20:21:09" + }, + { + "name": "symfony/web-profiler-bundle", + "version": "2.8.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/WebProfilerBundle.git", + "reference": "2faf89d4eb7d0003abf16fdab793fe1c1e34a421" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/WebProfilerBundle/zipball/2faf89d4eb7d0003abf16fdab793fe1c1e34a421", + "reference": "2faf89d4eb7d0003abf16fdab793fe1c1e34a421", + "shasum": "" + }, + "require": { + "php": ">=5.3.9", + "symfony/http-kernel": "~2.4|~3.0.0", + "symfony/routing": "~2.2|~3.0.0", + "symfony/twig-bridge": "~2.7|~3.0.0" + }, + "require-dev": { + "symfony/config": "~2.2|~3.0.0", + "symfony/console": "~2.3|~3.0.0", + "symfony/dependency-injection": "~2.2|~3.0.0", + "symfony/phpunit-bridge": "~2.7|~3.0.0", + "symfony/stopwatch": "~2.2|~3.0.0" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Bundle\\WebProfilerBundle\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony DomCrawler Component", - "homepage": "http://symfony.com", - "time": "2014-10-26 07:46:28" + "description": "Symfony WebProfilerBundle", + "homepage": "https://symfony.com", + "time": "2015-06-04 20:21:09" }, { "name": "symfony/yaml", - "version": "dev-master", - "target-dir": "Symfony/Component/Yaml", + "version": "2.8.x-dev", "source": { "type": "git", "url": "https://github.com/symfony/Yaml.git", - "reference": "4c0baf9a5b5c9e50ddd7a46f3c75cb85baf5d6c5" + "reference": "2396832f6f9ab2b8f62f00b5d3f2e722fc773d65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/4c0baf9a5b5c9e50ddd7a46f3c75cb85baf5d6c5", - "reference": "4c0baf9a5b5c9e50ddd7a46f3c75cb85baf5d6c5", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/2396832f6f9ab2b8f62f00b5d3f2e722fc773d65", + "reference": "2396832f6f9ab2b8f62f00b5d3f2e722fc773d65", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.9" + }, + "require-dev": { + "symfony/phpunit-bridge": "~2.7|~3.0.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.6-dev" + "dev-master": "2.8-dev" } }, "autoload": { - "psr-0": { + "psr-4": { "Symfony\\Component\\Yaml\\": "" } }, @@ -1901,26 +1833,84 @@ "MIT" ], "authors": [ - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - }, { "name": "Fabien Potencier", "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], "description": "Symfony Yaml Component", - "homepage": "http://symfony.com", - "time": "2014-10-26 07:46:28" + "homepage": "https://symfony.com", + "time": "2015-05-12 15:16:46" + }, + { + "name": "twig/twig", + "version": "1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "dfddd2e0ef39fd39e201fd89f469769740d5a4a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/dfddd2e0ef39fd39e201fd89f469769740d5a4a1", + "reference": "dfddd2e0ef39fd39e201fd89f469769740d5a4a1", + "shasum": "" + }, + "require": { + "php": ">=5.2.7" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-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-06-02 14:50:15" } ], "aliases": [], "minimum-stability": "dev", - "stability-flags": { - "phpextra/event-manager": 20 - }, + "stability-flags": [], "prefer-stable": false, - "platform": [], + "prefer-lowest": false, + "platform": { + "php": "~5.4" + }, "platform-dev": [] } diff --git a/src/PHPExtra/EventManager/Silex/CustomEventDispatcher.php b/src/PHPExtra/EventManager/Silex/CustomEventDispatcher.php index be4fec0..3b0940c 100644 --- a/src/PHPExtra/EventManager/Silex/CustomEventDispatcher.php +++ b/src/PHPExtra/EventManager/Silex/CustomEventDispatcher.php @@ -2,14 +2,13 @@ namespace PHPExtra\EventManager\Silex; -use PHPExtra\EventManager\EventManager; use PHPExtra\EventManager\EventManagerAwareInterface; use PHPExtra\EventManager\EventManagerInterface; use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\EventDispatcher; /** - * The CustomEventDispatcher class + * Triggers symfony events on EventManager using SilexEvent class * * @author Jacek Kobus */ @@ -18,59 +17,30 @@ class CustomEventDispatcher extends EventDispatcher implements EventManagerAware /** * @var EventManagerInterface */ - protected $eventManager; - - /** - * @var ProxyMapperInterface - */ - protected $proxyMapper; + private $em; /** * {@inheritdoc} */ public function dispatch($eventName, Event $event = null) { + parent::dispatch($eventName, $event); + if (null === $event) { $event = new Event(); } - parent::dispatch($eventName, $event); - - $silexEvent = $this->getProxyMapper()->createProxyEvent($event); - - if ($silexEvent) { - $this->eventManager->trigger($silexEvent); - } + $this->em->trigger(new SilexEvent($eventName, $event)); return $event; } - /** - * @param ProxyMapperInterface $proxyMapper - * - * @return $this - */ - public function setProxyMapper($proxyMapper) - { - $this->proxyMapper = $proxyMapper; - - return $this; - } - - /** - * @return ProxyMapperInterface - */ - public function getProxyMapper() - { - return $this->proxyMapper; - } - /** * {@inheritdoc} */ - public function setEventManager(EventManagerInterface $manager) + public function setEventManager(EventManagerInterface $em) { - $this->eventManager = $manager; + $this->em = $em; return $this; } diff --git a/src/PHPExtra/EventManager/Silex/Event/PostDispatchEvent.php b/src/PHPExtra/EventManager/Silex/Event/PostDispatchEvent.php deleted file mode 100644 index 51c2ec5..0000000 --- a/src/PHPExtra/EventManager/Silex/Event/PostDispatchEvent.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class PostDispatchEvent extends SilexKernelEvent -{ - /** - * @param GetResponseForControllerResultEvent $event - */ - function __construct(GetResponseForControllerResultEvent $event) - { - parent::__construct($event); - } - - /** - * @return callable - */ - public function getControllerResult() - { - $event = $this->getSymfonyEvent(); - if ($event instanceof GetResponseForControllerResultEvent) { - return $event->getControllerResult(); - } - - return null; - } - - /** - * @param $result - * - * @return $this - */ - public function setControllerResult($result) - { - $event = $this->getSymfonyEvent(); - if ($event instanceof GetResponseForControllerResultEvent) { - $event->setControllerResult($result); - } - - return $this; - } -} \ No newline at end of file diff --git a/src/PHPExtra/EventManager/Silex/Event/PostRequestEvent.php b/src/PHPExtra/EventManager/Silex/Event/PostRequestEvent.php deleted file mode 100644 index 8d8c53e..0000000 --- a/src/PHPExtra/EventManager/Silex/Event/PostRequestEvent.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ -class PostRequestEvent extends SilexKernelEvent -{ - /** - * @param FinishRequestEvent $event - */ - function __construct(FinishRequestEvent $event) - { - parent::__construct($event); - } -} \ No newline at end of file diff --git a/src/PHPExtra/EventManager/Silex/Event/PostResponseEvent.php b/src/PHPExtra/EventManager/Silex/Event/PostResponseEvent.php deleted file mode 100644 index 79096a4..0000000 --- a/src/PHPExtra/EventManager/Silex/Event/PostResponseEvent.php +++ /dev/null @@ -1,21 +0,0 @@ - - */ -class PostResponseEvent extends SilexEvent -{ - /** - * @param SfPostResponseEvent $event - */ - function __construct(SfPostResponseEvent $event) - { - parent::__construct($event); - } -} \ No newline at end of file diff --git a/src/PHPExtra/EventManager/Silex/Event/PreDispatchEvent.php b/src/PHPExtra/EventManager/Silex/Event/PreDispatchEvent.php deleted file mode 100644 index 67a5147..0000000 --- a/src/PHPExtra/EventManager/Silex/Event/PreDispatchEvent.php +++ /dev/null @@ -1,26 +0,0 @@ - - */ -class PreDispatchEvent extends SilexKernelEvent -{ - /** - * @return callable - */ - public function getController() - { - $event = $this->getSymfonyEvent(); - if ($event instanceof FilterControllerEvent) { - return $event->getController(); - } - - return null; - } -} \ No newline at end of file diff --git a/src/PHPExtra/EventManager/Silex/Event/RequestEvent.php b/src/PHPExtra/EventManager/Silex/Event/RequestEvent.php deleted file mode 100644 index 59d39d6..0000000 --- a/src/PHPExtra/EventManager/Silex/Event/RequestEvent.php +++ /dev/null @@ -1,65 +0,0 @@ - - */ -class RequestEvent extends SilexKernelEvent -{ - /** - * @param GetResponseEvent $event - * @param string $name - */ - function __construct(GetResponseEvent $event = null, $name = null) - { - parent::__construct($event, $name); - } - - /** - * @return Response - */ - public function getResponse() - { - $event = $this->getSymfonyEvent(); - if ($event instanceof GetResponseEvent) { - return $event->getResponse(); - } - - return null; - } - - /** - * @param Response $response - * @return $this - */ - public function setResponse(Response $response) - { - $event = $this->getSymfonyEvent(); - if($event instanceof GetResponseEvent){ - $event->setResponse($response); - } - return $this; - } - - /** - * Null will be returned only if given sf event is not an instance of GetResponseEvent - * - * @return bool|null - */ - public function hasResponse() - { - $event = $this->getSymfonyEvent(); - if ($event instanceof GetResponseEvent) { - return $event->hasResponse(); - } - - return null; - } - -} \ No newline at end of file diff --git a/src/PHPExtra/EventManager/Silex/Event/ResponseEvent.php b/src/PHPExtra/EventManager/Silex/Event/ResponseEvent.php deleted file mode 100644 index 544e3a1..0000000 --- a/src/PHPExtra/EventManager/Silex/Event/ResponseEvent.php +++ /dev/null @@ -1,34 +0,0 @@ - - */ -class ResponseEvent extends SilexKernelEvent -{ - /** - * @param FilterResponseEvent $event - */ - function __construct(FilterResponseEvent $event) - { - parent::__construct($event); - } - - /** - * @return \Symfony\Component\HttpFoundation\Response - * @throws \RuntimeException - */ - public function getResponse() - { - $event = $this->getSymfonyEvent(); - if($event instanceof FilterResponseEvent){ - return $event->getResponse(); - } - throw new \RuntimeException(sprintf('Unexpected event type: %s (expecting %s)', get_class($event), 'FilterResponseEvent')); - } -} \ No newline at end of file diff --git a/src/PHPExtra/EventManager/Silex/Event/SilexKernelEvent.php b/src/PHPExtra/EventManager/Silex/Event/SilexKernelEvent.php deleted file mode 100644 index 021e28a..0000000 --- a/src/PHPExtra/EventManager/Silex/Event/SilexKernelEvent.php +++ /dev/null @@ -1,49 +0,0 @@ - - */ -class SilexKernelEvent extends SilexEvent -{ - /** - * @param KernelEvent $event - * @param string $name - */ - function __construct(KernelEvent $event = null, $name = null) - { - parent::__construct($event, $name); - } - - /** - * @return Request - */ - public function getRequest() - { - $event = $this->getSymfonyEvent(); - if ($event instanceof KernelEvent) { - return $event->getRequest(); - } - - return null; - } - - /** - * @return int - */ - public function getRequestType() - { - $event = $this->getSymfonyEvent(); - if ($event instanceof KernelEvent) { - return $event->getRequestType(); - } - - return null; - } -} \ No newline at end of file diff --git a/src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php b/src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php index 5c099c7..ad70da2 100644 --- a/src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php +++ b/src/PHPExtra/EventManager/Silex/EventManagerServiceProvider.php @@ -43,22 +43,16 @@ public function register(Application $app) return $em; }); - $app['event_manager.proxy_mapper'] = $app->share(function (Application $app) { - return new ProxyMapper(); - }); - $app->extend('dispatcher', function (CustomEventDispatcher $dispatcher, Application $app) { - $dispatcher - ->setProxyMapper($app['event_manager.proxy_mapper']) - ->setEventManager($app['event_manager']) - ; - + $dispatcher->setEventManager($app['event_manager']); return $dispatcher; }); - $app['stopwatch'] = $app->share(function () { - return new Stopwatch(); - }); + if(!isset($app['stopwatch'])){ + $app['stopwatch'] = $app->share(function () { + return new Stopwatch(); + }); + } } /** diff --git a/src/PHPExtra/EventManager/Silex/ProfilableEventManager.php b/src/PHPExtra/EventManager/Silex/ProfilableEventManager.php index f21e36b..995326b 100644 --- a/src/PHPExtra/EventManager/Silex/ProfilableEventManager.php +++ b/src/PHPExtra/EventManager/Silex/ProfilableEventManager.php @@ -14,7 +14,7 @@ use Symfony\Component\Stopwatch\Stopwatch; /** - * Adds Symfony Stopwatch + * The ProfilableEventManager class * * @author Jacek Kobus */ diff --git a/src/PHPExtra/EventManager/Silex/ProxyMapper.php b/src/PHPExtra/EventManager/Silex/ProxyMapper.php deleted file mode 100644 index 07af98c..0000000 --- a/src/PHPExtra/EventManager/Silex/ProxyMapper.php +++ /dev/null @@ -1,69 +0,0 @@ - - */ -class ProxyMapper implements ProxyMapperInterface -{ - /** - * Create proxy event for given Symfony dispatcher event - * - * @param Event $event - * - * @return EventInterface - */ - public function createProxyEvent(Event $event) - { - if ($event instanceof GetResponseForControllerResultEvent) { - $silexEvent = new PostDispatchEvent($event); - - } elseif ($event instanceof GetResponseEvent) { - $silexEvent = new RequestEvent($event); - - } elseif ($event instanceof FilterControllerEvent) { - $silexEvent = new PreDispatchEvent($event); - - } elseif ($event instanceof FilterResponseEvent) { - $silexEvent = new ResponseEvent($event); - - } elseif ($event instanceof SfPostResponseEvent) { - $silexEvent = new PostResponseEvent($event); - - } elseif ($event instanceof FinishRequestEvent) { - $silexEvent = new PostRequestEvent($event); - - } elseif ($event instanceof KernelEvent) { - $silexEvent = new SilexKernelEvent($event); - - } elseif ($event instanceof Event) { - $silexEvent = new SilexEvent($event); - - } else { - $silexEvent = null; // unknown event - } - - return $silexEvent; - } -} \ No newline at end of file diff --git a/src/PHPExtra/EventManager/Silex/ProxyMapperInterface.php b/src/PHPExtra/EventManager/Silex/ProxyMapperInterface.php deleted file mode 100644 index ce71b01..0000000 --- a/src/PHPExtra/EventManager/Silex/ProxyMapperInterface.php +++ /dev/null @@ -1,23 +0,0 @@ - - */ -interface ProxyMapperInterface -{ - /** - * Create proxy event for given Symfony dispatcher event - * - * @param Event $event - * - * @return EventInterface - */ - public function createProxyEvent(Event $event); -} \ No newline at end of file diff --git a/src/PHPExtra/EventManager/Silex/Event/SilexEvent.php b/src/PHPExtra/EventManager/Silex/SilexEvent.php similarity index 51% rename from src/PHPExtra/EventManager/Silex/Event/SilexEvent.php rename to src/PHPExtra/EventManager/Silex/SilexEvent.php index 76762c9..c7388e0 100644 --- a/src/PHPExtra/EventManager/Silex/Event/SilexEvent.php +++ b/src/PHPExtra/EventManager/Silex/SilexEvent.php @@ -1,6 +1,6 @@ setName($name); - } - - if ($event !== null) { - $this->setSymfonyEvent($event); - } - } - - /** - * @param SymfonyEvent $symfonyEvent - * - * @return $this - */ - protected function setSymfonyEvent($symfonyEvent) - { - $this->symfonyEvent = $symfonyEvent; - - return $this; + $this->event = $event; + $this->name = $name; } /** @@ -54,19 +37,7 @@ protected function setSymfonyEvent($symfonyEvent) */ public function getSymfonyEvent() { - return $this->symfonyEvent; - } - - /** - * @param string $name - * - * @return $this - */ - public function setName($name) - { - $this->name = $name; - - return $this; + return $this->event; } /** @@ -90,7 +61,7 @@ public function isCancelled() */ public function setIsCancelled() { - $this->getSymfonyEvent()->stopPropagation(); + $this->event->stopPropagation(); return $this; } diff --git a/tests/fixtures/CustomEventDispatcherTest.php b/tests/fixtures/CustomEventDispatcherTest.php new file mode 100644 index 0000000..6bde7c7 --- /dev/null +++ b/tests/fixtures/CustomEventDispatcherTest.php @@ -0,0 +1,43 @@ + + */ +class CustomEventDispatcherTest extends \PHPUnit_Framework_TestCase +{ + + public function testCreateNewInstance() + { + new CustomEventDispatcher(); + } + + public function testDispatcherTriggersEventManager() + { + $expected = array('test event'); + $events = array(); + + $em = new EventManager(); + $em->addListener(new AnonymousListener(function(SilexEvent $event) use (&$events){ + $events[] = $event->getName(); + })); + + $dispatcher = new CustomEventDispatcher(); + $dispatcher->setEventManager($em); + + $dispatcher->dispatch('test event', new Event()); + + $this->assertEquals($expected, $events); + } + + +} diff --git a/tests/fixtures/EventManagerProviderTest.php b/tests/fixtures/EventManagerProviderTest.php index 42f66f0..9d1d79a 100644 --- a/tests/fixtures/EventManagerProviderTest.php +++ b/tests/fixtures/EventManagerProviderTest.php @@ -4,10 +4,12 @@ use PHPExtra\EventManager\EventManagerInterface; use PHPExtra\EventManager\Listener\AnonymousListener; -use PHPExtra\EventManager\Silex\Event\SilexEvent; use PHPExtra\EventManager\Silex\EventManagerServiceProvider; +use PHPExtra\EventManager\Silex\SilexEvent; use Silex\Application; use Silex\WebTestCase; +use Symfony\Component\HttpFoundation\Response; +use Symfony\Component\HttpKernel\Event\GetResponseEvent; use Symfony\Component\HttpKernel\HttpKernel; /** @@ -50,25 +52,59 @@ public function testRunApplicationWithoutListenersReturnsValidResponse() $this->assertEquals('ok', $client->getResponse()->getContent()); } - public function testListenersAreTriggeredInCorrectOrder() + public function testRunApplicationWithListenersReturnsValidResponse() { + $listener = new AnonymousListener(function(SilexEvent $event) use (&$queue){ + $queue[] = $event->getName(); + }); + + $this->getEventManager()->addListener($listener); + + $client = $this->createClient(); + $client->request('GET', '/'); + + $this->assertTrue($client->getResponse()->isOk()); + $this->assertEquals('ok', $client->getResponse()->getContent()); + } + + public function testDefaultSymfonyEventsAreTriggeredInCorrectOrder() + { + $expected = array( + 'kernel.request', + 'kernel.controller', + 'kernel.view', + 'kernel.response', + 'kernel.finish_request', + 'kernel.terminate', + ); + $queue = array(); $listener = new AnonymousListener(function(SilexEvent $event) use (&$queue){ - $queue[] = get_class($event); + $queue[] = $event->getName(); }); + $this->getEventManager()->addListener($listener); + $this->createClient()->request('GET', '/'); + + $this->assertEquals($expected, $queue); + + } + + public function testResponseCanBeAlteredUsingEvents() + { + $listener = new AnonymousListener(function(SilexEvent $event) use (&$queue){ + $sfEvent = $event->getSymfonyEvent(); + + if($sfEvent instanceof GetResponseEvent){ + $sfEvent->setResponse(new Response('Response from event listener !')); + } + }); $this->getEventManager()->addListener($listener); $client = $this->createClient(); $client->request('GET', '/'); - $this->assertEquals('PHPExtra\EventManager\Silex\Event\RequestEvent', $queue[0]); - $this->assertEquals('PHPExtra\EventManager\Silex\Event\PreDispatchEvent', $queue[1]); - $this->assertEquals('PHPExtra\EventManager\Silex\Event\PostDispatchEvent', $queue[2]); - $this->assertEquals('PHPExtra\EventManager\Silex\Event\ResponseEvent', $queue[3]); - $this->assertEquals('PHPExtra\EventManager\Silex\Event\PostRequestEvent', $queue[4]); - $this->assertEquals('PHPExtra\EventManager\Silex\Event\PostResponseEvent', $queue[5]); - + $this->assertEquals($client->getResponse()->getContent(), 'Response from event listener !'); } } diff --git a/tests/fixtures/ProxyMapperTest.php b/tests/fixtures/ProxyMapperTest.php deleted file mode 100644 index eb29214..0000000 --- a/tests/fixtures/ProxyMapperTest.php +++ /dev/null @@ -1,89 +0,0 @@ - - */ -class ProxyMapperTest extends \PHPUnit_Framework_TestCase -{ - public function tearDown() - { - \Mockery::close(); - } - - /** - * @return ProxyMapperInterface - */ - public function getProxyMapper() - { - return new ProxyMapper(); - } - - public function testRequestEventIsMappedCorrect() - { - $sfEvent = \Mockery::mock('Symfony\Component\HttpKernel\Event\GetResponseEvent'); - $event = $this->getProxyMapper()->createProxyEvent($sfEvent); - - $this->assertInstanceOf('\PHPExtra\EventManager\Silex\Event\RequestEvent', $event); - } - - public function testPreDispatchEventIsMappedCorrect() - { - $sfEvent = \Mockery::mock('Symfony\Component\HttpKernel\Event\FilterControllerEvent'); - $event = $this->getProxyMapper()->createProxyEvent($sfEvent); - - $this->assertInstanceOf('\PHPExtra\EventManager\Silex\Event\PreDispatchEvent', $event); - } - - public function testPostDispatchEventIsMappedCorrect() - { - $sfEvent = \Mockery::mock('Symfony\Component\HttpKernel\Event\GetResponseForControllerResultEvent'); - $event = $this->getProxyMapper()->createProxyEvent($sfEvent); - - $this->assertInstanceOf('\PHPExtra\EventManager\Silex\Event\PostDispatchEvent', $event); - } - - public function testResponseEventIsMappedCorrect() - { - $sfEvent = \Mockery::mock('Symfony\Component\HttpKernel\Event\FilterResponseEvent'); - $event = $this->getProxyMapper()->createProxyEvent($sfEvent); - - $this->assertInstanceOf('\PHPExtra\EventManager\Silex\Event\ResponseEvent', $event); - } - - public function testPostRequestEventIsMappedCorrect() - { - $sfEvent = \Mockery::mock('Symfony\Component\HttpKernel\Event\FinishRequestEvent'); - $event = $this->getProxyMapper()->createProxyEvent($sfEvent); - - $this->assertInstanceOf('\PHPExtra\EventManager\Silex\Event\PostRequestEvent', $event); - } - - public function testPostResponseEventIsMappedCorrect() - { - $sfEvent = \Mockery::mock('Symfony\Component\HttpKernel\Event\PostResponseEvent'); - $event = $this->getProxyMapper()->createProxyEvent($sfEvent); - - $this->assertInstanceOf('\PHPExtra\EventManager\Silex\Event\PostResponseEvent', $event); - } - - public function testUnknownEventIsMappedCorrect() - { - $sfEvent = \Mockery::mock('Symfony\Component\EventDispatcher\Event'); - $event = $this->getProxyMapper()->createProxyEvent($sfEvent); - - $this->assertInstanceOf('\PHPExtra\EventManager\Silex\Event\SilexEvent', $event); - } - -} - \ No newline at end of file From c79c37c0bf9a574ba10d463d0f51f94b15224f64 Mon Sep 17 00:00:00 2001 From: Jacek Kobus Date: Fri, 5 Jun 2015 14:50:17 +0200 Subject: [PATCH 8/9] updated readme --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d9f8377..92bc5f8 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,12 @@ -#EventManager service provider for Silex (1.2) +#EventManager provider for Silex + +[![Latest Stable Version](https://poser.pugx.org/phpextra/event-manager/v/stable.svg)](https://packagist.org/packages/phpextra/event-manager-silex-provider) +[![Total Downloads](https://poser.pugx.org/phpextra/event-manager-silex-provider/downloads.svg)](https://packagist.org/packages/phpextra/event-manager-silex-provider) +[![License](https://poser.pugx.org/phpextra/event-manager-silex-provider/license.svg)](https://packagist.org/packages/phpextra/event-manager-silex-provider) +[![Build Status](http://img.shields.io/travis/phpextra/event-manager-silex-provider.svg)](https://travis-ci.org/phpextra/event-manager-silex-provider) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/phpextra/event-manager-silex-provider/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/phpextra/event-manager-silex-provider/?branch=master) +[![Code Coverage](https://scrutinizer-ci.com/g/phpextra/event-manager-silex-provider/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/phpextra/event-manager-silex-provider/?branch=3.0) +[![GitTip](http://img.shields.io/gittip/jkobus.svg)](https://www.gittip.com/jkobus) No configuration is needed. From c4229fd5c3676cd0af1b8464229e43e88216a3dc Mon Sep 17 00:00:00 2001 From: Jacek Kobus Date: Fri, 5 Jun 2015 14:51:33 +0200 Subject: [PATCH 9/9] updated composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c7ef875..9ed5a68 100644 --- a/composer.json +++ b/composer.json @@ -14,7 +14,7 @@ } }, "require": { - "php": "~5.4", + "php": ">=5.4", "phpextra/event-manager": "~3.0", "silex/silex": "~1.3" },