diff --git a/composer.json b/composer.json index a85203c..d8a3fe2 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,9 @@ "doctrine/data-fixtures": "~1.0" }, "require-dev": { - "phpunit/phpunit": "3.7.*" + "phpspec/phpspec": "2.1.x-dev", + "doctrine/orm": "~2.2,>=2.2.3", + "doctrine/doctrine-bundle": "~1.2" }, "autoload": { "psr-0": { "VIPSoft\\DoctrineDataFixturesExtension": "src/" } @@ -30,5 +32,8 @@ "dev-master": "3.0.x-dev", "dev-2.5": "2.5.x-dev" } + }, + "config": { + "bin-dir": "bin" } } diff --git a/composer.lock b/composer.lock index 22a004f..67b5541 100644 --- a/composer.lock +++ b/composer.lock @@ -3,28 +3,29 @@ "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" ], - "hash": "4441a05b7b32843a0ea11a1ee49a1917", + "hash": "964c0a6f80bbb47d5b2a0b644aca95e1", "packages": [ { "name": "behat/behat", - "version": "3.0.x-dev", + "version": "dev-master", "source": { "type": "git", "url": "https://github.com/Behat/Behat.git", - "reference": "d909b9e70e496a3f7e6770ee71a59e2791a53067" + "reference": "de1e96ffcf202252d0c9df9637f0e9b0abbfb32b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Behat/zipball/d909b9e70e496a3f7e6770ee71a59e2791a53067", - "reference": "d909b9e70e496a3f7e6770ee71a59e2791a53067", + "url": "https://api.github.com/repos/Behat/Behat/zipball/de1e96ffcf202252d0c9df9637f0e9b0abbfb32b", + "reference": "de1e96ffcf202252d0c9df9637f0e9b0abbfb32b", "shasum": "" }, "require": { - "behat/gherkin": "~4.0", + "behat/gherkin": "~4.1", "behat/transliterator": "~1.0", + "ext-mbstring": "*", "php": ">=5.3.3", "symfony/class-loader": "~2.1", - "symfony/config": "~2.1", + "symfony/config": "~2.3", "symfony/console": "~2.1", "symfony/dependency-injection": "~2.1", "symfony/event-dispatcher": "~2.1", @@ -33,7 +34,7 @@ }, "require-dev": { "phpspec/prophecy-phpunit": "~1.0", - "phpunit/phpunit": "~3.7.28", + "phpunit/phpunit": "~4.0.7", "symfony/process": "~2.1" }, "suggest": { @@ -45,6 +46,11 @@ "bin/behat" ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, "autoload": { "psr-0": { "Behat\\Behat": "src/", @@ -65,11 +71,20 @@ "description": "Scenario-oriented BDD framework for PHP 5.3", "homepage": "http://behat.org/", "keywords": [ + "Agile", "BDD", - "Behat", - "Symfony2" - ], - "time": "2014-01-28 23:15:13" + "ScenarioBDD", + "Scrum", + "StoryBDD", + "User story", + "business", + "development", + "documentation", + "examples", + "symfony", + "testing" + ], + "time": "2014-05-08 11:27:14" }, { "name": "behat/gherkin", @@ -77,30 +92,28 @@ "source": { "type": "git", "url": "https://github.com/Behat/Gherkin.git", - "reference": "5898721f460b91907ba1a841f9198b99ec278ad1" + "reference": "ca8ba535b544a42e67dfc1bb3a99b7bdb48d1cf9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Gherkin/zipball/5898721f460b91907ba1a841f9198b99ec278ad1", - "reference": "5898721f460b91907ba1a841f9198b99ec278ad1", + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/ca8ba535b544a42e67dfc1bb3a99b7bdb48d1cf9", + "reference": "ca8ba535b544a42e67dfc1bb3a99b7bdb48d1cf9", "shasum": "" }, "require": { "php": ">=5.3.1" }, "require-dev": { - "phpunit/phpunit": "~3.7.24", - "symfony/config": "~2.1", + "phpunit/phpunit": "~4.0", "symfony/yaml": "~2.1" }, "suggest": { - "symfony/config": "If you want to use Config component to manage resources", "symfony/yaml": "If you want to parse features, represented in YAML files" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "4.0-dev" + "dev-master": "4.1-dev" } }, "autoload": { @@ -129,7 +142,7 @@ "gherkin", "parser" ], - "time": "2014-01-05 15:28:02" + "time": "2014-05-05 12:07:29" }, { "name": "behat/symfony2-extension", @@ -137,24 +150,24 @@ "source": { "type": "git", "url": "https://github.com/Behat/Symfony2Extension.git", - "reference": "c5a2971e38622e467b34832b26313b765c5d5aa8" + "reference": "ad22eb652a5f866ea03ea2b53b38ce99ed61570c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Behat/Symfony2Extension/zipball/c5a2971e38622e467b34832b26313b765c5d5aa8", - "reference": "c5a2971e38622e467b34832b26313b765c5d5aa8", + "url": "https://api.github.com/repos/Behat/Symfony2Extension/zipball/ad22eb652a5f866ea03ea2b53b38ce99ed61570c", + "reference": "ad22eb652a5f866ea03ea2b53b38ce99ed61570c", "shasum": "" }, "require": { - "behat/behat": "~3.0.0-RC2@dev", + "behat/behat": "~3.0,>=3.0.4", "php": ">=5.3.3", "symfony/framework-bundle": "~2.0" }, "require-dev": { "behat/mink-browserkit-driver": "~1.0", "behat/mink-extension": "~2.0@dev", - "phpspec/phpspec": "2.0.*@dev", - "phpunit/phpunit": "~3.7", + "phpspec/phpspec": "~2.0", + "phpunit/phpunit": "~4.0", "symfony/symfony": "~2.1" }, "type": "behat-extension", @@ -173,6 +186,10 @@ "MIT" ], "authors": [ + { + "name": "Christophe Coevoet", + "email": "stof@notk.org" + }, { "name": "Konstantin Kudryashov", "email": "ever.zet@gmail.com", @@ -186,7 +203,7 @@ "framework", "symfony" ], - "time": "2014-01-14 09:37:01" + "time": "2014-05-09 01:46:47" }, { "name": "behat/transliterator", @@ -234,12 +251,12 @@ "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "a11349d39d85bef75a71bd69bd604ac4fb993f03" + "reference": "373c0d08bf1f326ff40bc237046aa10638bf28f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/a11349d39d85bef75a71bd69bd604ac4fb993f03", - "reference": "a11349d39d85bef75a71bd69bd604ac4fb993f03", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/373c0d08bf1f326ff40bc237046aa10638bf28f6", + "reference": "373c0d08bf1f326ff40bc237046aa10638bf28f6", "shasum": "" }, "require": { @@ -247,7 +264,8 @@ "php": ">=5.3.2" }, "require-dev": { - "doctrine/cache": "1.*" + "doctrine/cache": "1.*", + "phpunit/phpunit": "4.*" }, "type": "library", "extra": { @@ -266,7 +284,7 @@ ], "authors": [ { - "name": "Jonathan H. Wage", + "name": "Jonathan Wage", "email": "jonwage@gmail.com", "homepage": "http://www.jwage.com/", "role": "Creator" @@ -298,7 +316,7 @@ "docblock", "parser" ], - "time": "2013-12-20 21:39:07" + "time": "2014-04-24 04:07:43" }, { "name": "doctrine/cache", @@ -306,12 +324,12 @@ "source": { "type": "git", "url": "https://github.com/doctrine/cache.git", - "reference": "36c4eee5051629524389da376ba270f15765e49f" + "reference": "bb9b55b17bed5923c9446c8158a92623d39480c6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/cache/zipball/36c4eee5051629524389da376ba270f15765e49f", - "reference": "36c4eee5051629524389da376ba270f15765e49f", + "url": "https://api.github.com/repos/doctrine/cache/zipball/bb9b55b17bed5923c9446c8158a92623d39480c6", + "reference": "bb9b55b17bed5923c9446c8158a92623d39480c6", "shasum": "" }, "require": { @@ -341,7 +359,7 @@ ], "authors": [ { - "name": "Jonathan Wage", + "name": "Jonathan H. Wage", "email": "jonwage@gmail.com", "homepage": "http://www.jwage.com/", "role": "Creator" @@ -372,7 +390,7 @@ "cache", "caching" ], - "time": "2013-12-18 17:21:03" + "time": "2014-03-27 11:06:41" }, { "name": "doctrine/collections", @@ -380,12 +398,12 @@ "source": { "type": "git", "url": "https://github.com/doctrine/collections.git", - "reference": "e6d8f1240e10f268c8e8c30e9e88a12853f84695" + "reference": "97475b2761f22cd9817c135283ad1079543a4586" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/collections/zipball/e6d8f1240e10f268c8e8c30e9e88a12853f84695", - "reference": "e6d8f1240e10f268c8e8c30e9e88a12853f84695", + "url": "https://api.github.com/repos/doctrine/collections/zipball/97475b2761f22cd9817c135283ad1079543a4586", + "reference": "97475b2761f22cd9817c135283ad1079543a4586", "shasum": "" }, "require": { @@ -440,7 +458,7 @@ "collections", "iterator" ], - "time": "2014-01-01 23:58:38" + "time": "2014-05-07 01:20:20" }, { "name": "doctrine/common", @@ -448,12 +466,12 @@ "source": { "type": "git", "url": "https://github.com/doctrine/common.git", - "reference": "c94d6ff79e25418b1225e187c782bf4742f23a8b" + "reference": "b1a31ae3df2c18c24bec42e2cc32e3e4bedc07c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/common/zipball/c94d6ff79e25418b1225e187c782bf4742f23a8b", - "reference": "c94d6ff79e25418b1225e187c782bf4742f23a8b", + "url": "https://api.github.com/repos/doctrine/common/zipball/b1a31ae3df2c18c24bec42e2cc32e3e4bedc07c7", + "reference": "b1a31ae3df2c18c24bec42e2cc32e3e4bedc07c7", "shasum": "" }, "require": { @@ -515,7 +533,7 @@ "persistence", "spl" ], - "time": "2013-09-07 10:20:35" + "time": "2014-04-21 05:00:49" }, { "name": "doctrine/data-fixtures", @@ -523,20 +541,20 @@ "source": { "type": "git", "url": "https://github.com/doctrine/data-fixtures.git", - "reference": "d5d0f7d9743df904c1e88f48dbc091b91c23d877" + "reference": "e847b073c2b5350045edbb40443645ad09a59538" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/d5d0f7d9743df904c1e88f48dbc091b91c23d877", - "reference": "d5d0f7d9743df904c1e88f48dbc091b91c23d877", + "url": "https://api.github.com/repos/doctrine/data-fixtures/zipball/e847b073c2b5350045edbb40443645ad09a59538", + "reference": "e847b073c2b5350045edbb40443645ad09a59538", "shasum": "" }, "require": { - "doctrine/common": ">=2.2,<2.5-dev", + "doctrine/common": "~2.2", "php": ">=5.3.2" }, "require-dev": { - "doctrine/orm": ">=2.2,<2.5-dev" + "doctrine/orm": "~2.2" }, "suggest": { "doctrine/mongodb-odm": "For loading MongoDB ODM fixtures", @@ -571,7 +589,7 @@ "keywords": [ "database" ], - "time": "2014-01-24 15:18:31" + "time": "2014-03-13 12:26:17" }, { "name": "doctrine/inflector", @@ -579,17 +597,20 @@ "source": { "type": "git", "url": "https://github.com/doctrine/inflector.git", - "reference": "a81c334f2764b09e2f13a55cfd8fe3233946f728" + "reference": "64de2fe36d578c5d5f3807ac7984547bbba5f7c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/inflector/zipball/a81c334f2764b09e2f13a55cfd8fe3233946f728", - "reference": "a81c334f2764b09e2f13a55cfd8fe3233946f728", + "url": "https://api.github.com/repos/doctrine/inflector/zipball/64de2fe36d578c5d5f3807ac7984547bbba5f7c5", + "reference": "64de2fe36d578c5d5f3807ac7984547bbba5f7c5", "shasum": "" }, "require": { "php": ">=5.3.2" }, + "require-dev": { + "phpunit/phpunit": "4.*" + }, "type": "library", "extra": { "branch-alias": { @@ -640,7 +661,7 @@ "singularize", "string" ], - "time": "2013-12-21 19:19:50" + "time": "2014-04-23 12:36:11" }, { "name": "doctrine/lexer", @@ -749,12 +770,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/ClassLoader.git", - "reference": "7ccd928e3af41d8c5d9a8fc5182fbfc9fb261132" + "reference": "09e38e4d228c1f7f997f3dc7068d9d2fba9a10b0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/ClassLoader/zipball/7ccd928e3af41d8c5d9a8fc5182fbfc9fb261132", - "reference": "7ccd928e3af41d8c5d9a8fc5182fbfc9fb261132", + "url": "https://api.github.com/repos/symfony/ClassLoader/zipball/09e38e4d228c1f7f997f3dc7068d9d2fba9a10b0", + "reference": "09e38e4d228c1f7f997f3dc7068d9d2fba9a10b0", "shasum": "" }, "require": { @@ -781,7 +802,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -790,7 +813,7 @@ ], "description": "Symfony ClassLoader Component", "homepage": "http://symfony.com", - "time": "2014-01-07 13:29:57" + "time": "2014-04-16 10:36:34" }, { "name": "symfony/config", @@ -799,12 +822,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/Config.git", - "reference": "bde2f7192a52dfd07cf5484ad65d719da28effba" + "reference": "9c8caadb38ecc69ac35ab31af4d1996944b5a09f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Config/zipball/bde2f7192a52dfd07cf5484ad65d719da28effba", - "reference": "bde2f7192a52dfd07cf5484ad65d719da28effba", + "url": "https://api.github.com/repos/symfony/Config/zipball/9c8caadb38ecc69ac35ab31af4d1996944b5a09f", + "reference": "9c8caadb38ecc69ac35ab31af4d1996944b5a09f", "shasum": "" }, "require": { @@ -829,7 +852,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -838,7 +863,7 @@ ], "description": "Symfony Config Component", "homepage": "http://symfony.com", - "time": "2014-01-07 13:29:57" + "time": "2014-04-22 08:11:23" }, { "name": "symfony/console", @@ -847,21 +872,23 @@ "source": { "type": "git", "url": "https://github.com/symfony/Console.git", - "reference": "47e82eadf64a81e0a778c7249c7292987f1bfcff" + "reference": "ea1e32f8f3c78ca1a31f5a730229b028f1e76431" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Console/zipball/47e82eadf64a81e0a778c7249c7292987f1bfcff", - "reference": "47e82eadf64a81e0a778c7249c7292987f1bfcff", + "url": "https://api.github.com/repos/symfony/Console/zipball/ea1e32f8f3c78ca1a31f5a730229b028f1e76431", + "reference": "ea1e32f8f3c78ca1a31f5a730229b028f1e76431", "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", @@ -882,7 +909,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -891,7 +920,7 @@ ], "description": "Symfony Console Component", "homepage": "http://symfony.com", - "time": "2014-01-24 14:36:35" + "time": "2014-05-09 08:15:02" }, { "name": "symfony/debug", @@ -900,12 +929,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/Debug.git", - "reference": "ffad875704e293f196a72dcddcc313c8eccf4c9a" + "reference": "d167d2b2489de7dc61fb57f0e2ccc49950d06c65" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Debug/zipball/ffad875704e293f196a72dcddcc313c8eccf4c9a", - "reference": "ffad875704e293f196a72dcddcc313c8eccf4c9a", + "url": "https://api.github.com/repos/symfony/Debug/zipball/d167d2b2489de7dc61fb57f0e2ccc49950d06c65", + "reference": "d167d2b2489de7dc61fb57f0e2ccc49950d06c65", "shasum": "" }, "require": { @@ -937,7 +966,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -946,7 +977,7 @@ ], "description": "Symfony Debug Component", "homepage": "http://symfony.com", - "time": "2014-01-07 13:29:57" + "time": "2014-04-30 06:24:35" }, { "name": "symfony/dependency-injection", @@ -955,12 +986,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/DependencyInjection.git", - "reference": "26648a063db967e0a0510df14d22555f4afd898e" + "reference": "ca0cdf8d0ec4bb22f36f5c32341892a4eb53ac3d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/26648a063db967e0a0510df14d22555f4afd898e", - "reference": "26648a063db967e0a0510df14d22555f4afd898e", + "url": "https://api.github.com/repos/symfony/DependencyInjection/zipball/ca0cdf8d0ec4bb22f36f5c32341892a4eb53ac3d", + "reference": "ca0cdf8d0ec4bb22f36f5c32341892a4eb53ac3d", "shasum": "" }, "require": { @@ -994,7 +1025,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1003,7 +1036,7 @@ ], "description": "Symfony DependencyInjection Component", "homepage": "http://symfony.com", - "time": "2014-01-07 13:29:57" + "time": "2014-05-09 14:22:29" }, { "name": "symfony/event-dispatcher", @@ -1012,12 +1045,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/EventDispatcher.git", - "reference": "a37a9430e2eafb6a66de240ac13f91b45b4c3d37" + "reference": "cb62ec8dd05893fc8e4f0e6e21e326e1fc731fe8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/a37a9430e2eafb6a66de240ac13f91b45b4c3d37", - "reference": "a37a9430e2eafb6a66de240ac13f91b45b4c3d37", + "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/cb62ec8dd05893fc8e4f0e6e21e326e1fc731fe8", + "reference": "cb62ec8dd05893fc8e4f0e6e21e326e1fc731fe8", "shasum": "" }, "require": { @@ -1025,6 +1058,7 @@ }, "require-dev": { "psr/log": "~1.0", + "symfony/config": "~2.0", "symfony/dependency-injection": "~2.0", "symfony/stopwatch": "~2.2" }, @@ -1050,7 +1084,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1059,7 +1095,7 @@ ], "description": "Symfony EventDispatcher Component", "homepage": "http://symfony.com", - "time": "2014-01-07 13:29:57" + "time": "2014-04-29 10:13:57" }, { "name": "symfony/filesystem", @@ -1068,12 +1104,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/Filesystem.git", - "reference": "e81f1b30eb9748c3f8e0de3a92ea210845cff0a9" + "reference": "98e831eac836a0a5911626ce82684155f21d0e4d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Filesystem/zipball/e81f1b30eb9748c3f8e0de3a92ea210845cff0a9", - "reference": "e81f1b30eb9748c3f8e0de3a92ea210845cff0a9", + "url": "https://api.github.com/repos/symfony/Filesystem/zipball/98e831eac836a0a5911626ce82684155f21d0e4d", + "reference": "98e831eac836a0a5911626ce82684155f21d0e4d", "shasum": "" }, "require": { @@ -1097,7 +1133,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1106,7 +1144,7 @@ ], "description": "Symfony Filesystem Component", "homepage": "http://symfony.com", - "time": "2014-01-07 13:29:57" + "time": "2014-04-16 10:36:21" }, { "name": "symfony/framework-bundle", @@ -1115,12 +1153,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/FrameworkBundle.git", - "reference": "d1444309a29afdd69e3a4558187ce3e518c850b3" + "reference": "0f033b641090fb5ddbf51ef3faf7f6f8f0e3d9fb" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/FrameworkBundle/zipball/d1444309a29afdd69e3a4558187ce3e518c850b3", - "reference": "d1444309a29afdd69e3a4558187ce3e518c850b3", + "url": "https://api.github.com/repos/symfony/FrameworkBundle/zipball/0f033b641090fb5ddbf51ef3faf7f6f8f0e3d9fb", + "reference": "0f033b641090fb5ddbf51ef3faf7f6f8f0e3d9fb", "shasum": "" }, "require": { @@ -1131,7 +1169,7 @@ "symfony/event-dispatcher": "~2.5", "symfony/filesystem": "~2.3", "symfony/http-foundation": "~2.4", - "symfony/http-kernel": "~2.4", + "symfony/http-kernel": "~2.5", "symfony/routing": "~2.2", "symfony/security-core": "~2.4", "symfony/security-csrf": "~2.4", @@ -1171,7 +1209,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1180,7 +1220,7 @@ ], "description": "Symfony FrameworkBundle", "homepage": "http://symfony.com", - "time": "2014-01-24 14:36:35" + "time": "2014-05-04 16:56:58" }, { "name": "symfony/http-foundation", @@ -1189,17 +1229,20 @@ "source": { "type": "git", "url": "https://github.com/symfony/HttpFoundation.git", - "reference": "15b10d4638fa232b2f9373d51213419ab511e816" + "reference": "8fa350478681c3ee707106afbe04be80add2b3ff" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/15b10d4638fa232b2f9373d51213419ab511e816", - "reference": "15b10d4638fa232b2f9373d51213419ab511e816", + "url": "https://api.github.com/repos/symfony/HttpFoundation/zipball/8fa350478681c3ee707106afbe04be80add2b3ff", + "reference": "8fa350478681c3ee707106afbe04be80add2b3ff", "shasum": "" }, "require": { "php": ">=5.3.3" }, + "require-dev": { + "symfony/expression-language": "~2.4" + }, "type": "library", "extra": { "branch-alias": { @@ -1221,7 +1264,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1230,7 +1275,7 @@ ], "description": "Symfony HttpFoundation Component", "homepage": "http://symfony.com", - "time": "2014-01-07 13:29:57" + "time": "2014-04-28 17:44:51" }, { "name": "symfony/http-kernel", @@ -1239,18 +1284,18 @@ "source": { "type": "git", "url": "https://github.com/symfony/HttpKernel.git", - "reference": "0a62c02c6a8eabd4685f08a2976b6def35b6bd50" + "reference": "59c4dcd156820a4291da869fb37448768c340768" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/0a62c02c6a8eabd4685f08a2976b6def35b6bd50", - "reference": "0a62c02c6a8eabd4685f08a2976b6def35b6bd50", + "url": "https://api.github.com/repos/symfony/HttpKernel/zipball/59c4dcd156820a4291da869fb37448768c340768", + "reference": "59c4dcd156820a4291da869fb37448768c340768", "shasum": "" }, "require": { "php": ">=5.3.3", "psr/log": "~1.0", - "symfony/debug": "~2.3", + "symfony/debug": "~2.5", "symfony/event-dispatcher": "~2.1", "symfony/http-foundation": "~2.4" }, @@ -1292,7 +1337,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1301,7 +1348,7 @@ ], "description": "Symfony HttpKernel Component", "homepage": "http://symfony.com", - "time": "2014-01-24 14:36:35" + "time": "2014-04-29 10:38:03" }, { "name": "symfony/routing", @@ -1310,12 +1357,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/Routing.git", - "reference": "b82be802ea578ca94366ad88c8a3970bf78976b4" + "reference": "99b4e8e2978e6a08c086fd771cc0aa66c9e80a56" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Routing/zipball/b82be802ea578ca94366ad88c8a3970bf78976b4", - "reference": "b82be802ea578ca94366ad88c8a3970bf78976b4", + "url": "https://api.github.com/repos/symfony/Routing/zipball/99b4e8e2978e6a08c086fd771cc0aa66c9e80a56", + "reference": "99b4e8e2978e6a08c086fd771cc0aa66c9e80a56", "shasum": "" }, "require": { @@ -1352,7 +1399,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1367,39 +1416,51 @@ "uri", "url" ], - "time": "2014-01-26 21:33:16" + "time": "2014-04-23 14:08:54" }, { - "name": "symfony/security-core", + "name": "symfony/security", "version": "dev-master", - "target-dir": "Symfony/Component/Security/Core", + "target-dir": "Symfony/Component/Security", "source": { "type": "git", - "url": "https://github.com/symfony/security-core.git", - "reference": "a22cc4922be260ea8931bf7ca5ff3f9ce9074273" + "url": "https://github.com/symfony/Security.git", + "reference": "8ed00906f2841b145735c9a01a4905baa57be310" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/security-core/zipball/a22cc4922be260ea8931bf7ca5ff3f9ce9074273", - "reference": "a22cc4922be260ea8931bf7ca5ff3f9ce9074273", + "url": "https://api.github.com/repos/symfony/Security/zipball/8ed00906f2841b145735c9a01a4905baa57be310", + "reference": "8ed00906f2841b145735c9a01a4905baa57be310", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.3.3", + "symfony/event-dispatcher": "~2.1", + "symfony/http-foundation": "~2.1", + "symfony/http-kernel": "~2.4" + }, + "replace": { + "symfony/security-acl": "self.version", + "symfony/security-core": "self.version", + "symfony/security-csrf": "self.version", + "symfony/security-http": "self.version" }, "require-dev": { + "doctrine/common": "~2.2", + "doctrine/dbal": "~2.2", "ircmaxell/password-compat": "1.0.*", "psr/log": "~1.0", - "symfony/event-dispatcher": "~2.1", "symfony/expression-language": "~2.4", - "symfony/http-foundation": "~2.4", + "symfony/routing": "~2.2", "symfony/validator": "~2.2" }, "suggest": { + "doctrine/dbal": "For using the built-in ACL implementation", "ircmaxell/password-compat": "For using the BCrypt password encoder in PHP <5.5", - "symfony/event-dispatcher": "", + "symfony/class-loader": "For using the ACL generateSql script", "symfony/expression-language": "For using the expression voter", - "symfony/http-foundation": "", + "symfony/finder": "For using the ACL generateSql script", + "symfony/routing": "For using the HttpUtils class to create sub-requests, redirect the user, and match URLs", "symfony/validator": "For using the user password constraint" }, "type": "library", @@ -1410,7 +1471,7 @@ }, "autoload": { "psr-0": { - "Symfony\\Component\\Security\\Core\\": "" + "Symfony\\Component\\Security\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -1420,70 +1481,18 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", "homepage": "http://symfony.com/contributors" } ], - "description": "Symfony Security Component - Core Library", + "description": "Symfony Security Component", "homepage": "http://symfony.com", - "time": "2014-01-24 14:36:35" - }, - { - "name": "symfony/security-csrf", - "version": "dev-master", - "target-dir": "Symfony/Component/Security/Csrf", - "source": { - "type": "git", - "url": "https://github.com/symfony/security-csrf.git", - "reference": "c1c981940646d58c9e0bfc568cd55bbbffb6a42f" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/security-csrf/zipball/c1c981940646d58c9e0bfc568cd55bbbffb6a42f", - "reference": "c1c981940646d58c9e0bfc568cd55bbbffb6a42f", - "shasum": "" - }, - "require": { - "php": ">=5.3.3", - "symfony/security-core": "~2.4" - }, - "require-dev": { - "symfony/http-foundation": "~2.1" - }, - "suggest": { - "symfony/http-foundation": "For using the class SessionTokenStorage." - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.5-dev" - } - }, - "autoload": { - "psr-0": { - "Symfony\\Component\\Security\\Csrf\\": "" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" - }, - { - "name": "Symfony Community", - "homepage": "http://symfony.com/contributors" - } - ], - "description": "Symfony Security Component - CSRF Library", - "homepage": "http://symfony.com", - "time": "2014-01-07 13:29:57" + "time": "2014-04-28 05:15:04" }, { "name": "symfony/stopwatch", @@ -1492,12 +1501,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/Stopwatch.git", - "reference": "21a5c7490347b3128daae7f44dfa36aaacb624f9" + "reference": "724d73604ebe6c1c9bdf36533b556123bd9075a1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/21a5c7490347b3128daae7f44dfa36aaacb624f9", - "reference": "21a5c7490347b3128daae7f44dfa36aaacb624f9", + "url": "https://api.github.com/repos/symfony/Stopwatch/zipball/724d73604ebe6c1c9bdf36533b556123bd9075a1", + "reference": "724d73604ebe6c1c9bdf36533b556123bd9075a1", "shasum": "" }, "require": { @@ -1521,7 +1530,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1530,7 +1541,7 @@ ], "description": "Symfony Stopwatch Component", "homepage": "http://symfony.com", - "time": "2014-01-07 13:29:57" + "time": "2014-04-18 20:40:13" }, { "name": "symfony/templating", @@ -1539,12 +1550,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/Templating.git", - "reference": "a622689a75f60593168fab019a0b15152967ea78" + "reference": "782802d7a72ba9b1dd72dc98a69a5b3768fc18d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Templating/zipball/a622689a75f60593168fab019a0b15152967ea78", - "reference": "a622689a75f60593168fab019a0b15152967ea78", + "url": "https://api.github.com/repos/symfony/Templating/zipball/782802d7a72ba9b1dd72dc98a69a5b3768fc18d0", + "reference": "782802d7a72ba9b1dd72dc98a69a5b3768fc18d0", "shasum": "" }, "require": { @@ -1574,7 +1585,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1583,7 +1596,7 @@ ], "description": "Symfony Templating Component", "homepage": "http://symfony.com", - "time": "2014-01-07 13:29:57" + "time": "2014-04-18 19:44:02" }, { "name": "symfony/translation", @@ -1592,12 +1605,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/Translation.git", - "reference": "9c10bbce6bcd255661decff7ac61a03834b8f78d" + "reference": "254931b0bce3c70f6f1d58a403873c2628260a5b" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Translation/zipball/9c10bbce6bcd255661decff7ac61a03834b8f78d", - "reference": "9c10bbce6bcd255661decff7ac61a03834b8f78d", + "url": "https://api.github.com/repos/symfony/Translation/zipball/254931b0bce3c70f6f1d58a403873c2628260a5b", + "reference": "254931b0bce3c70f6f1d58a403873c2628260a5b", "shasum": "" }, "require": { @@ -1629,7 +1642,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1638,7 +1653,7 @@ ], "description": "Symfony Translation Component", "homepage": "http://symfony.com", - "time": "2014-01-24 14:36:35" + "time": "2014-05-04 16:56:58" }, { "name": "symfony/yaml", @@ -1647,12 +1662,12 @@ "source": { "type": "git", "url": "https://github.com/symfony/Yaml.git", - "reference": "9921872611710df49cf035c259e5a461ea2d0f8c" + "reference": "e9525fc511a51e7bfa214c6c420515c580fda35a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/Yaml/zipball/9921872611710df49cf035c259e5a461ea2d0f8c", - "reference": "9921872611710df49cf035c259e5a461ea2d0f8c", + "url": "https://api.github.com/repos/symfony/Yaml/zipball/e9525fc511a51e7bfa214c6c420515c580fda35a", + "reference": "e9525fc511a51e7bfa214c6c420515c580fda35a", "shasum": "" }, "require": { @@ -1676,7 +1691,9 @@ "authors": [ { "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" }, { "name": "Symfony Community", @@ -1685,384 +1702,705 @@ ], "description": "Symfony Yaml Component", "homepage": "http://symfony.com", - "time": "2014-01-07 13:29:57" + "time": "2014-04-18 20:40:13" } ], "packages-dev": [ { - "name": "phpunit/php-code-coverage", - "version": "1.2.x-dev", + "name": "doctrine/dbal", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "ef021526dce9c9d62238780668a7b0cb6cf6f439" + "url": "https://github.com/doctrine/dbal.git", + "reference": "9d6300fd862478f58a526fbcad0a8f630daa60aa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef021526dce9c9d62238780668a7b0cb6cf6f439", - "reference": "ef021526dce9c9d62238780668a7b0cb6cf6f439", + "url": "https://api.github.com/repos/doctrine/dbal/zipball/9d6300fd862478f58a526fbcad0a8f630daa60aa", + "reference": "9d6300fd862478f58a526fbcad0a8f630daa60aa", "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" + "doctrine/common": "2.4.*", + "php": ">=5.3.2" }, "require-dev": { - "phpunit/phpunit": "3.7.*@dev" + "phpunit/phpunit": "4.0.*", + "symfony/console": "2.*" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.0.5" + "symfony/console": "Allows use of the command line interface" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.5.x-dev" } }, "autoload": { - "classmap": [ - "PHP/" - ] + "psr-0": { + "Doctrine\\DBAL\\": "lib/" + } }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Jonathan Wage", + "email": "jonwage@gmail.com", + "homepage": "http://www.jwage.com/", + "role": "Creator" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com", + "homepage": "http://www.instaclick.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" } ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "description": "Database Abstraction Layer", + "homepage": "http://www.doctrine-project.org", "keywords": [ - "coverage", - "testing", - "xunit" + "database", + "dbal", + "persistence", + "queryobject" ], - "time": "2014-01-30 17:25:17" + "time": "2014-05-09 13:52:56" }, { - "name": "phpunit/php-file-iterator", + "name": "doctrine/doctrine-bundle", "version": "dev-master", + "target-dir": "Doctrine/Bundle/DoctrineBundle", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb" + "url": "https://github.com/doctrine/DoctrineBundle.git", + "reference": "5173c05e65668449214373f1bf8997f73848d36c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/acd690379117b042d1c8af1fafd61bde001bf6bb", - "reference": "acd690379117b042d1c8af1fafd61bde001bf6bb", + "url": "https://api.github.com/repos/doctrine/DoctrineBundle/zipball/5173c05e65668449214373f1bf8997f73848d36c", + "reference": "5173c05e65668449214373f1bf8997f73848d36c", "shasum": "" }, "require": { - "php": ">=5.3.3" + "doctrine/dbal": "~2.3", + "doctrine/doctrine-cache-bundle": "~1.0", + "jdorn/sql-formatter": "~1.1", + "php": ">=5.3.2", + "symfony/doctrine-bridge": "~2.2", + "symfony/framework-bundle": "~2.2" + }, + "require-dev": { + "doctrine/orm": "~2.3", + "phpunit/php-code-coverage": "~1.2", + "phpunit/phpunit": "~3.7", + "phpunit/phpunit-mock-objects": "~1.2", + "satooshi/php-coveralls": "~0.6.1", + "symfony/validator": "~2.2", + "symfony/yaml": "~2.2", + "twig/twig": "~1" + }, + "suggest": { + "doctrine/orm": "The Doctrine ORM integration is optional in the bundle.", + "symfony/web-profiler-bundle": "to use the data collector" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } }, - "type": "library", "autoload": { - "classmap": [ - "File/" - ] + "psr-0": { + "Doctrine\\Bundle\\DoctrineBundle": "" + } }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" + "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": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Doctrine Project", + "homepage": "http://www.doctrine-project.org/" + } + ], + "description": "Symfony DoctrineBundle", + "homepage": "http://www.doctrine-project.org", + "keywords": [ + "database", + "dbal", + "orm", + "persistence" ], + "time": "2014-05-07 15:48:46" + }, + { + "name": "doctrine/doctrine-cache-bundle", + "version": "dev-master", + "target-dir": "Doctrine/Bundle/DoctrineCacheBundle", + "source": { + "type": "git", + "url": "https://github.com/doctrine/DoctrineCacheBundle.git", + "reference": "8dc5d88800194304babf30695d231232cf65fedb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/DoctrineCacheBundle/zipball/8dc5d88800194304babf30695d231232cf65fedb", + "reference": "8dc5d88800194304babf30695d231232cf65fedb", + "shasum": "" + }, + "require": { + "doctrine/cache": "~1.3", + "doctrine/inflector": "~1.0", + "php": ">=5.3.2", + "symfony/doctrine-bridge": "~2.2", + "symfony/framework-bundle": "~2.2", + "symfony/security": "~2.2" + }, + "require-dev": { + "instaclick/coding-standard": "~1.1", + "instaclick/object-calisthenics-sniffs": "dev-master", + "instaclick/symfony2-coding-standard": "dev-remaster", + "phpunit/phpunit": "~3.7", + "satooshi/php-coveralls": "~0.6.1", + "squizlabs/php_codesniffer": "dev-master", + "symfony/validator": "~2.2", + "symfony/yaml": "~2.2" + }, + "type": "symfony-bundle", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Doctrine\\Bundle\\DoctrineCacheBundle": "" + } + }, + "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Symfony Community", + "homepage": "http://symfony.com/contributors" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" + }, + { + "name": "Fabio B. Silva", + "email": "fabio.bat.silva@gmail.com" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@hotmail.com" + }, + { + "name": "Doctrine Project", + "homepage": "http://www.doctrine-project.org/" } ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "description": "Symfony2 Bundle for Doctrine Cache", + "homepage": "http://www.doctrine-project.org", "keywords": [ - "filesystem", - "iterator" + "cache", + "caching" ], - "time": "2013-10-10 15:34:57" + "time": "2014-04-25 14:56:13" }, { - "name": "phpunit/php-text-template", + "name": "doctrine/orm", "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a" + "url": "https://github.com/doctrine/doctrine2.git", + "reference": "08347cf4f74f1f7461ba1005a5fe5bb93f3c2c5c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", - "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a", + "url": "https://api.github.com/repos/doctrine/doctrine2/zipball/08347cf4f74f1f7461ba1005a5fe5bb93f3c2c5c", + "reference": "08347cf4f74f1f7461ba1005a5fe5bb93f3c2c5c", "shasum": "" }, "require": { - "php": ">=5.3.3" + "doctrine/collections": "~1.1", + "doctrine/dbal": ">=2.5-dev,<2.6-dev", + "ext-pdo": "*", + "php": ">=5.3.2", + "symfony/console": "2.*" + }, + "require-dev": { + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "dev-master", + "symfony/yaml": "~2.1" + }, + "suggest": { + "symfony/yaml": "If you want to use YAML Metadata Mapping Driver" }, + "bin": [ + "bin/doctrine", + "bin/doctrine.php" + ], "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5.x-dev" + } + }, "autoload": { - "classmap": [ - "Text/" - ] + "psr-0": { + "Doctrine\\ORM\\": "lib/" + } }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Jonathan Wage", + "email": "jonwage@gmail.com", + "homepage": "http://www.jwage.com/", + "role": "Creator" + }, + { + "name": "Guilherme Blanco", + "email": "guilhermeblanco@gmail.com", + "homepage": "http://www.instaclick.com" + }, + { + "name": "Roman Borschel", + "email": "roman@code-factory.org" + }, + { + "name": "Benjamin Eberlei", + "email": "kontakt@beberlei.de" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "Object-Relational-Mapper for PHP", + "homepage": "http://www.doctrine-project.org", "keywords": [ - "template" + "database", + "orm" ], - "time": "2014-01-30 17:20:04" + "time": "2014-05-11 15:51:23" }, { - "name": "phpunit/php-timer", + "name": "jdorn/sql-formatter", "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c" + "url": "https://github.com/jdorn/sql-formatter.git", + "reference": "ffd2441bc082ab5aaf07be5676bfb1eadaeef77d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c", - "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c", + "url": "https://api.github.com/repos/jdorn/sql-formatter/zipball/ffd2441bc082ab5aaf07be5676bfb1eadaeef77d", + "reference": "ffd2441bc082ab5aaf07be5676bfb1eadaeef77d", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=5.2.4" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, "autoload": { "classmap": [ - "PHP/" + "lib" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Jeremy Dorn", + "email": "jeremy@jeremydorn.com", + "homepage": "http://jeremydorn.com/" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", + "description": "a PHP SQL highlighting library", + "homepage": "https://github.com/jdorn/sql-formatter/", "keywords": [ - "timer" + "highlight", + "sql" ], - "time": "2013-08-02 07:42:54" + "time": "2014-04-17 01:55:36" }, { - "name": "phpunit/php-token-stream", + "name": "phpdocumentor/reflection-docblock", "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "292f4d5772dad5a12775be69f4a8dd663b20f103" + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "07b195e1eee19ee99cd9432983e1fb39adacdde1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/292f4d5772dad5a12775be69f4a8dd663b20f103", - "reference": "292f4d5772dad5a12775be69f4a8dd663b20f103", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/07b195e1eee19ee99cd9432983e1fb39adacdde1", + "reference": "07b195e1eee19ee99cd9432983e1fb39adacdde1", "shasum": "" }, "require": { - "ext-tokenizer": "*", "php": ">=5.3.3" }, + "require-dev": { + "phpunit/phpunit": "3.7.*@stable" + }, + "suggest": { + "dflydev/markdown": "1.0.*", + "erusev/parsedown": "~0.7" + }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { - "classmap": [ - "PHP/" - ] + "psr-0": { + "phpDocumentor": [ + "src/" + ] + } }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "mike.vanriel@naenius.com" + } ], + "time": "2014-04-26 10:10:44" + }, + { + "name": "phpspec/php-diff", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/phpspec/php-diff.git", + "reference": "30e103d19519fe678ae64a60d77884ef3d71b28a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/php-diff/zipball/30e103d19519fe678ae64a60d77884ef3d71b28a", + "reference": "30e103d19519fe678ae64a60d77884ef3d71b28a", + "shasum": "" + }, + "type": "library", + "autoload": { + "psr-0": { + "Diff": "lib/" + } + }, + "notification-url": "https://packagist.org/downloads/", "license": [ "BSD-3-Clause" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Chris Boulton", + "homepage": "http://github.com/chrisboulton" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2013-10-21 14:03:39" + "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", + "time": "2013-11-01 13:02:21" }, { - "name": "phpunit/phpunit", - "version": "3.7.x-dev", + "name": "phpspec/phpspec", + "version": "dev-develop", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "c30d7914e440887c4411f6c6475a7882dd6e9945" + "url": "https://github.com/phpspec/phpspec.git", + "reference": "886a8c1f0a212d631942b5527691fadcd2aa8eb7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/c30d7914e440887c4411f6c6475a7882dd6e9945", - "reference": "c30d7914e440887c4411f6c6475a7882dd6e9945", + "url": "https://api.github.com/repos/phpspec/phpspec/zipball/886a8c1f0a212d631942b5527691fadcd2aa8eb7", + "reference": "886a8c1f0a212d631942b5527691fadcd2aa8eb7", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", "php": ">=5.3.3", - "phpunit/php-code-coverage": "~1.2.1", - "phpunit/php-file-iterator": ">=1.3.1", - "phpunit/php-text-template": ">=1.1.1", - "phpunit/php-timer": ">=1.0.4", - "phpunit/phpunit-mock-objects": "~1.2.0", - "symfony/yaml": "~2.0" + "phpspec/php-diff": "~1.0.0", + "phpspec/prophecy": "~1.1", + "symfony/console": "~2.1", + "symfony/event-dispatcher": "~2.1", + "symfony/finder": "~2.1", + "symfony/yaml": "~2.1" }, "require-dev": { - "pear-pear/pear": "1.9.4" + "behat/behat": "~2.5", + "bossa/phpspec2-expect": "dev-master", + "symfony/filesystem": "~2.1" }, "suggest": { - "ext-json": "*", - "ext-simplexml": "*", - "ext-tokenizer": "*", - "phpunit/php-invoker": ">=1.1.0,<1.2.0" + "phpspec/nyan-formatters": "~1.0 – Adds Nyan formatters" }, "bin": [ - "composer/bin/phpunit" + "bin/phpspec" ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.7.x-dev" + "dev-develop": "2.1.x-dev", + "dev-master": "2.1.x-dev" } }, "autoload": { - "classmap": [ - "PHPUnit/" - ] + "psr-0": { + "PhpSpec": "src/" + } }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "", - "../../symfony/yaml/" - ], "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "homepage": "http://marcelloduarte.net/" } ], - "description": "The PHP Unit Testing framework.", - "homepage": "http://www.phpunit.de/", + "description": "Specification-oriented BDD framework for PHP 5.3+", + "homepage": "http://phpspec.net/", "keywords": [ - "phpunit", + "BDD", + "SpecBDD", + "TDD", + "spec", + "specification", "testing", - "xunit" + "tests" ], - "time": "2014-01-30 18:55:57" + "time": "2014-05-09 09:04:39" }, { - "name": "phpunit/phpunit-mock-objects", - "version": "1.2.x-dev", + "name": "phpspec/prophecy", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "ed9c8ef8cecd7fa0e7dcee78970e5a972bcfd751" + "url": "https://github.com/phpspec/prophecy.git", + "reference": "31fa1e763382e4de535ed8b136d809690af3d268" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/ed9c8ef8cecd7fa0e7dcee78970e5a972bcfd751", - "reference": "ed9c8ef8cecd7fa0e7dcee78970e5a972bcfd751", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/31fa1e763382e4de535ed8b136d809690af3d268", + "reference": "31fa1e763382e4de535ed8b136d809690af3d268", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-text-template": ">=1.1.1@stable" + "phpdocumentor/reflection-docblock": "~2.0" }, "require-dev": { - "phpunit/phpunit": "3.7.*@dev" - }, - "suggest": { - "ext-soap": "*" + "phpspec/phpspec": "2.0.*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "1.1.x-dev" } }, "autoload": { - "classmap": [ - "PHPUnit/" - ] + "psr-0": { + "Prophecy\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" } ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "http://phpspec.org", "keywords": [ + "Double", + "Dummy", + "fake", "mock", - "xunit" + "spy", + "stub" + ], + "time": "2014-04-03 06:31:14" + }, + { + "name": "symfony/doctrine-bridge", + "version": "dev-master", + "target-dir": "Symfony/Bridge/Doctrine", + "source": { + "type": "git", + "url": "https://github.com/symfony/DoctrineBridge.git", + "reference": "3ec278c24dfeff1e829602425b69d8ba186e8740" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/DoctrineBridge/zipball/3ec278c24dfeff1e829602425b69d8ba186e8740", + "reference": "3ec278c24dfeff1e829602425b69d8ba186e8740", + "shasum": "" + }, + "require": { + "doctrine/common": "~2.2", + "php": ">=5.3.3" + }, + "require-dev": { + "doctrine/data-fixtures": "1.0.*", + "doctrine/dbal": "~2.2", + "doctrine/orm": "~2.2,>=2.2.3", + "symfony/dependency-injection": "~2.0", + "symfony/expression-language": "~2.2", + "symfony/form": "~2.2", + "symfony/http-kernel": "~2.2", + "symfony/security": "~2.2", + "symfony/stopwatch": "~2.2", + "symfony/validator": "~2.2" + }, + "suggest": { + "doctrine/data-fixtures": "", + "doctrine/dbal": "", + "doctrine/orm": "", + "symfony/form": "", + "symfony/validator": "" + }, + "type": "symfony-bridge", + "extra": { + "branch-alias": { + "dev-master": "2.5-dev" + } + }, + "autoload": { + "psr-0": { + "Symfony\\Bridge\\Doctrine\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" ], - "time": "2014-01-30 16:40:39" + "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 Doctrine Bridge", + "homepage": "http://symfony.com", + "time": "2014-04-28 05:15:04" + }, + { + "name": "symfony/finder", + "version": "dev-master", + "target-dir": "Symfony/Component/Finder", + "source": { + "type": "git", + "url": "https://github.com/symfony/Finder.git", + "reference": "51e3af2081d8497f6552cb3338e8a40541646773" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/Finder/zipball/51e3af2081d8497f6552cb3338e8a40541646773", + "reference": "51e3af2081d8497f6552cb3338e8a40541646773", + "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" + } + ], + "description": "Symfony Finder Component", + "homepage": "http://symfony.com", + "time": "2014-04-28 05:15:04" } ], "aliases": [ @@ -2070,8 +2408,8 @@ ], "minimum-stability": "dev", "stability-flags": { - "behat/behat": 20, - "behat/symfony2-extension": 20 + "behat/symfony2-extension": 20, + "phpspec/phpspec": 20 }, "platform": { "php": ">=5.3.6" diff --git a/spec/VIPSoft/DoctrineDataFixturesExtension/EventListener/OrmListenerSpec.php b/spec/VIPSoft/DoctrineDataFixturesExtension/EventListener/OrmListenerSpec.php new file mode 100644 index 0000000..89b6dce --- /dev/null +++ b/spec/VIPSoft/DoctrineDataFixturesExtension/EventListener/OrmListenerSpec.php @@ -0,0 +1,31 @@ +shouldHaveType('VIPSoft\DoctrineDataFixturesExtension\EventListener\OrmListener'); + } + + /** + * + * @param Doctrine\Common\Persistence\Event\LifecycleEventArgs $eventArgs + * @param \Doctrine\ORM\EntityManager $em + * @param \Doctrine\DBAL\Connection $conn + * @param \Doctrine\DBAL\Platforms\MySqlPlatform $platform + */ + function it_should_disable_foreign_key_checks_before_load_fixtures($eventArgs, $em, $conn, $platform) + { + $eventArgs->getObjectManager()->willReturn($em); + $em->getConnection()->willReturn($conn); + $conn->getDatabasePlatform()->willReturn($platform); + $conn->exec('SET foreign_key_checks = 0;')->shouldBeCalled(); + + $this->preTruncate($eventArgs); + } +} diff --git a/spec/VIPSoft/DoctrineDataFixturesExtension/FixtureExecutor/MongoDBFixtureExecutorSpec.php b/spec/VIPSoft/DoctrineDataFixturesExtension/FixtureExecutor/MongoDBFixtureExecutorSpec.php new file mode 100644 index 0000000..3a09d41 --- /dev/null +++ b/spec/VIPSoft/DoctrineDataFixturesExtension/FixtureExecutor/MongoDBFixtureExecutorSpec.php @@ -0,0 +1,14 @@ +shouldHaveType('VIPSoft\DoctrineDataFixturesExtension\FixtureExecutor\MongoDBFixtureExecutor'); + } +} diff --git a/spec/VIPSoft/DoctrineDataFixturesExtension/FixtureExecutor/OrmFixtureExecutorSpec.php b/spec/VIPSoft/DoctrineDataFixturesExtension/FixtureExecutor/OrmFixtureExecutorSpec.php new file mode 100644 index 0000000..c202e00 --- /dev/null +++ b/spec/VIPSoft/DoctrineDataFixturesExtension/FixtureExecutor/OrmFixtureExecutorSpec.php @@ -0,0 +1,22 @@ +shouldHaveType('VIPSoft\DoctrineDataFixturesExtension\FixtureExecutor\OrmFixtureExecutor'); + } + + /** + * @param \VIPSoft\DoctrineDataFixturesExtension\EventListener\OrmListener $listener + */ + function let($listener) + { + $this->beConstructedWith($listener); + } +} diff --git a/spec/VIPSoft/DoctrineDataFixturesExtension/Service/FixtureServiceSpec.php b/spec/VIPSoft/DoctrineDataFixturesExtension/Service/FixtureServiceSpec.php new file mode 100644 index 0000000..3f97a5a --- /dev/null +++ b/spec/VIPSoft/DoctrineDataFixturesExtension/Service/FixtureServiceSpec.php @@ -0,0 +1,58 @@ +executor = $fixtureExecutor; + $this->objectManager = $em; + + $kernelContainer->get('some_manager_id')->willReturn($this->objectManager); + + $kernel->getBundles()->willReturn(array()); + $kernel->getContainer()->willReturn($kernelContainer); + + $this->beConstructedWith($kernel, $fixtureExecutor, $this->getOptions()); + } + + function it_is_initializable() + { + $this->shouldHaveType('VIPSoft\DoctrineDataFixturesExtension\Service\FixtureService'); + } + + function it_should_call_fixtures_executor() + { + $referenceRepositoryArg = Argument::type('Doctrine\Common\DataFixtures\ProxyReferenceRepository'); + + $this->executor->loadFixtures($this->objectManager, $referenceRepositoryArg, array())->shouldBeCalled(); + + $this->loadFixtures(); + } + + /** + * @return Symfony\Component\DependencyInjection\ContainerInterface + */ + private function getOptions() + { + return [ + 'autoload' => true, + 'directories' => array(), + 'fixtures' => array(), + 'model_manager_id' => 'some_manager_id' + ]; + } +} diff --git a/src/VIPSoft/DoctrineDataFixturesExtension/EventListener/HookListener.php b/src/VIPSoft/DoctrineDataFixturesExtension/EventListener/HookListener.php index 05f2dc6..7d76d46 100644 --- a/src/VIPSoft/DoctrineDataFixturesExtension/EventListener/HookListener.php +++ b/src/VIPSoft/DoctrineDataFixturesExtension/EventListener/HookListener.php @@ -1,4 +1,5 @@ fixtureService = $fixtureService; $this->lifetime = $lifetime; } @@ -41,25 +50,15 @@ public static function getSubscribedEvents() { return array( ExerciseCompleted::BEFORE => 'beforeExercise', - FeatureTested::BEFORE => 'beforeFeature', - FeatureTested::AFTER => 'afterFeature', - ExampleTested::BEFORE => 'beforeScenario', - ScenarioTested::BEFORE => 'beforeScenario', - ExampleTested::AFTER => 'afterScenario', - ScenarioTested::AFTER => 'afterScenario', + FeatureTested::BEFORE => 'beforeFeature', + FeatureTested::AFTER => 'afterFeature', + ExampleTested::BEFORE => 'beforeScenario', + ScenarioTested::BEFORE => 'beforeScenario', + ExampleTested::AFTER => 'afterScenario', + ScenarioTested::AFTER => 'afterScenario', ); } - /** - * Set fixture service - * - * @param \VIPSoft\DoctrineDataFixturesExtension\Service\FixtureService $service - */ - public function setFixtureService($service) - { - $this->fixtureService = $service; - } - /** * Listens to "exercise.before" event. * @@ -67,8 +66,7 @@ public function setFixtureService($service) */ public function beforeExercise(ExerciseCompleted $event) { - $this->fixtureService - ->cacheFixtures(); + } /** @@ -82,8 +80,7 @@ public function beforeFeature(FeatureTested $event) return; } - $this->fixtureService - ->reloadFixtures(); + $this->fixtureService->loadFixtures(); } /** @@ -97,8 +94,7 @@ public function afterFeature(FeatureTested $event) return; } - $this->fixtureService - ->flush(); + $this->fixtureService->flush(); } /** @@ -112,8 +108,7 @@ public function beforeScenario(ScenarioTested $event) return; } - $this->fixtureService - ->reloadFixtures(); + $this->fixtureService->loadFixtures(); } /** @@ -127,7 +122,6 @@ public function afterScenario(ScenarioTested $event) return; } - $this->fixtureService - ->flush(); + $this->fixtureService->flush(); } } diff --git a/src/VIPSoft/DoctrineDataFixturesExtension/EventListener/PlatformListener.php b/src/VIPSoft/DoctrineDataFixturesExtension/EventListener/OrmListener.php similarity index 96% rename from src/VIPSoft/DoctrineDataFixturesExtension/EventListener/PlatformListener.php rename to src/VIPSoft/DoctrineDataFixturesExtension/EventListener/OrmListener.php index f209948..681863b 100644 --- a/src/VIPSoft/DoctrineDataFixturesExtension/EventListener/PlatformListener.php +++ b/src/VIPSoft/DoctrineDataFixturesExtension/EventListener/OrmListener.php @@ -15,7 +15,7 @@ * * @author Anthon Pang */ -class PlatformListener implements EventSubscriber +class OrmListener implements EventSubscriber { /** * {@inheritdoc} @@ -37,7 +37,6 @@ public function preTruncate(LifecycleEventArgs $args) { $connection = $args->getObjectManager()->getConnection(); $platform = $connection->getDatabasePlatform(); - if ($platform instanceof MySqlPlatform) { $connection->exec('SET foreign_key_checks = 0;'); } diff --git a/src/VIPSoft/DoctrineDataFixturesExtension/Extension.php b/src/VIPSoft/DoctrineDataFixturesExtension/Extension.php index e1ec8ff..db4c1ec 100644 --- a/src/VIPSoft/DoctrineDataFixturesExtension/Extension.php +++ b/src/VIPSoft/DoctrineDataFixturesExtension/Extension.php @@ -12,6 +12,8 @@ use Symfony\Component\Config\FileLocator; use Symfony\Component\DependencyInjection\ContainerBuilder; use Symfony\Component\DependencyInjection\Loader\XmlFileLoader; +use Symfony\Component\DependencyInjection\Definition; +use Symfony\Component\DependencyInjection\Reference; /** * Doctrine data fixtures extension for Behat class. @@ -40,29 +42,36 @@ public function initialize(ExtensionManager $extensionManager) */ public function configure(ArrayNodeDefinition $builder) { + $supportedDrivers = array('orm', 'mongodb'); + $builder - ->addDefaultsIfNotSet() - ->children() - ->scalarNode('autoload') - ->defaultValue(true) - ->end() - ->arrayNode('directories') - ->prototype('scalar')->end() - ->end() - ->arrayNode('fixtures') - ->prototype('scalar')->end() - ->end() - ->scalarNode('lifetime') - ->defaultValue('feature') - ->validate() - ->ifNotInArray(array('feature', 'scenario')) - ->thenInvalid('Invalid fixtures lifetime "%s"') + ->requiresAtLeastOneElement() + ->validate() + ->ifTrue(function($config) use ($supportedDrivers) { + return count(array_diff(array_keys($config), $supportedDrivers)) > 0; + }) + ->thenInvalid('Unknown behat fixture drivers. Available '.json_encode($supportedDrivers)) + ->end() + ->prototype('array') + ->children() + ->scalarNode('autoload') + ->defaultValue(true) + ->end() + ->arrayNode('directories') + ->prototype('scalar')->end() + ->end() + ->arrayNode('fixtures') + ->prototype('scalar')->end() + ->end() + ->scalarNode('lifetime') + ->defaultValue('feature') + ->validate() + ->ifNotInArray(array('feature', 'scenario')) + ->thenInvalid('Invalid fixtures lifetime "%s"') + ->end() ->end() ->end() - ->scalarNode('use_backup') - ->defaultValue(true) - ->end() - ->end(); + ; } /** @@ -73,24 +82,13 @@ public function load(ContainerBuilder $container, array $config) $loader = new XmlFileLoader($container, new FileLocator(__DIR__.'/Resources/config')); $loader->load('services.xml'); - if (isset($config['autoload'])) { - $container->setParameter('behat.doctrine_data_fixtures.autoload', $config['autoload']); - } - - if (isset($config['directories'])) { - $container->setParameter('behat.doctrine_data_fixtures.directories', $config['directories']); - } + foreach ($config as $dbDriver => $driverOptions) { + if (!array_key_exists('model_manager_id', $driverOptions)) { + $driverOptions['model_manager_id'] = $container->getParameter('behat.doctrine_data_fixtures.model_manager_id.'.$dbDriver); + } - if (isset($config['fixtures'])) { - $container->setParameter('behat.doctrine_data_fixtures.fixtures', $config['fixtures']); + $this->createDriverServices($container, $dbDriver, $driverOptions); } - - $container->setParameter( - 'behat.doctrine_data_fixtures.use_backup', - isset($config['use_backup']) ? $config['use_backup'] : true - ); - - $container->setParameter('behat.doctrine_data_fixtures.lifetime', $config['lifetime']); } /** @@ -99,4 +97,50 @@ public function load(ContainerBuilder $container, array $config) public function process(ContainerBuilder $container) { } + + /** + * + * @param \Symfony\Component\DependencyInjection\ContainerBuilder $container + * @param string $dbDriver + * @param array $options + */ + private function createDriverServices(ContainerBuilder $container, $dbDriver, array $options) + { + $loaderDefinition = new Definition( + $container->getParameter('behat.doctrine_data_fixtures.service.fixture_loader.class'), + array( + new Reference('symfony2_extension.kernel'), + new Reference('behat.doctrine_data_fixtures.fixtures_executor.'.$dbDriver), + $options + ) + ); + + $loaderReferenceName = 'behat.doctrine_data_fixtures.fixture_loader.' . $dbDriver; + $container->setDefinition($loaderReferenceName, $loaderDefinition); + + $contextInitializerDefinition = new Definition( + $container->getParameter('behat.doctrine_data_fixtures.initializer.fixture_service_aware.class'), + array( + new Reference($loaderReferenceName) + ) + ); + $contextInitializerDefinition->addTag('context.initializer'); + $container->setDefinition( + 'behat.doctrine_data_fixtures.initializer.fixture_service_aware.'.$dbDriver, + $contextInitializerDefinition + ); + + $listenerDefinition = new Definition( + $container->getParameter('behat.doctrine_data_fixtures.service.hook_listener.class'), + array( + new Reference($loaderReferenceName), + $options['lifetime'] + ) + ); + $listenerDefinition->addTag('event_dispatcher.subscriber'); + $container->setDefinition( + 'behat.doctrine_data_fixtures.service.'.$dbDriver.'.hook_listener', + $listenerDefinition + ); + } } diff --git a/src/VIPSoft/DoctrineDataFixturesExtension/FixtureExecutor/AbstractFixtureExecutor.php b/src/VIPSoft/DoctrineDataFixturesExtension/FixtureExecutor/AbstractFixtureExecutor.php new file mode 100644 index 0000000..f38a57d --- /dev/null +++ b/src/VIPSoft/DoctrineDataFixturesExtension/FixtureExecutor/AbstractFixtureExecutor.php @@ -0,0 +1,55 @@ +dispatchEvent($objectManager, 'preTruncate'); + + $this->executeFixtures($objectManager, $referenceRepository, $fixtures); + + $this->dispatchEvent($objectManager, 'postTruncate'); + } + + /** + * Dispatch event + * + * @param \Doctrine\ORM\EntityManager $em Entity manager + * @param string $event Event name + */ + private function dispatchEvent($em, $event) + { + $eventArgs = new LifecycleEventArgs(null, $em); + + $em->getEventManager()->dispatchEvent($event, $eventArgs); + } +} diff --git a/src/VIPSoft/DoctrineDataFixturesExtension/FixtureExecutor/MongoDBFixtureExecutor.php b/src/VIPSoft/DoctrineDataFixturesExtension/FixtureExecutor/MongoDBFixtureExecutor.php new file mode 100644 index 0000000..19775f8 --- /dev/null +++ b/src/VIPSoft/DoctrineDataFixturesExtension/FixtureExecutor/MongoDBFixtureExecutor.php @@ -0,0 +1,35 @@ +setReferenceRepository($referenceRepository); + $executor->purge(); + $executor->execute($fixtures, true); + } +} diff --git a/src/VIPSoft/DoctrineDataFixturesExtension/FixtureExecutor/OrmFixtureExecutor.php b/src/VIPSoft/DoctrineDataFixturesExtension/FixtureExecutor/OrmFixtureExecutor.php new file mode 100644 index 0000000..0902d7c --- /dev/null +++ b/src/VIPSoft/DoctrineDataFixturesExtension/FixtureExecutor/OrmFixtureExecutor.php @@ -0,0 +1,94 @@ +platformListener = $ormListener; + } + + /** + * @return \VIPSoft\DoctrineDataFixturesExtension\EventListener\OrmListener + */ + public function getPlatformListener() + { + return $this->platformListener; + } + + /** + * @return string + */ + public function getFixturesPath() + { + return '/DataFixtures/ORM'; + } + + /** + * @param \Doctrine\Common\Persistence\ObjectManager $objectManager + * @param \Doctrine\Common\DataFixtures\ProxyReferenceRepository $referenceRepository + * @param array $fixtures + */ + public function loadFixtures(ObjectManager $objectManager, ProxyReferenceRepository $referenceRepository, array $fixtures) + { + $this->initListener($objectManager); + + parent::loadFixtures($objectManager, $referenceRepository, $fixtures); + } + + /** + * @param \Doctrine\Common\Persistence\ObjectManager $objectManager + * @param \Doctrine\Common\DataFixtures\ProxyReferenceRepository $referenceRepository + * @param array $fixtures + */ + public function executeFixtures( + ObjectManager $objectManager, + ProxyReferenceRepository $referenceRepository, + array $fixtures + ) { + $purger = new ORMPurger($objectManager); + $purger->setPurgeMode(ORMPurger::PURGE_MODE_TRUNCATE); + + $executor = new ORMExecutor($objectManager, $purger); + $executor->setReferenceRepository($referenceRepository); + $executor->purge(); + $executor->execute($fixtures, true); + } + + /** + * @param \Doctrine\Common\Persistence\ObjectManager $objectManager + * @return boolean + */ + private function initListener(ObjectManager $objectManager) + { + if (self::$inited) { + return; + } + + $objectManager->getEventManager()->addEventSubscriber($this->getPlatformListener()); + + self::$inited = true; + } +} diff --git a/src/VIPSoft/DoctrineDataFixturesExtension/Resources/config/services.xml b/src/VIPSoft/DoctrineDataFixturesExtension/Resources/config/services.xml index 5644c1c..067785f 100644 --- a/src/VIPSoft/DoctrineDataFixturesExtension/Resources/config/services.xml +++ b/src/VIPSoft/DoctrineDataFixturesExtension/Resources/config/services.xml @@ -7,26 +7,20 @@ VIPSoft\DoctrineDataFixturesExtension\EventListener\HookListener VIPSoft\DoctrineDataFixturesExtension\Service\FixtureService VIPSoft\DoctrineDataFixturesExtension\Context\Initializer\FixtureServiceAwareInitializer + VIPSoft\DoctrineDataFixturesExtension\FixtureExecutor\MongoDBFixtureExecutor + VIPSoft\DoctrineDataFixturesExtension\FixtureExecutor\OrmFixtureExecutor + + doctrine_mongodb.odm.document_manager + doctrine.orm.entity_manager - - %behat.doctrine_data_fixtures.lifetime% - - - - - - - - - - %behat.doctrine_data_fixtures.use_backup% + + + - - - + diff --git a/src/VIPSoft/DoctrineDataFixturesExtension/Service/FixtureService.php b/src/VIPSoft/DoctrineDataFixturesExtension/Service/FixtureService.php index de3b4e2..12b1e54 100644 --- a/src/VIPSoft/DoctrineDataFixturesExtension/Service/FixtureService.php +++ b/src/VIPSoft/DoctrineDataFixturesExtension/Service/FixtureService.php @@ -1,4 +1,5 @@ autoload = $container->getParameter('behat.doctrine_data_fixtures.autoload'); - $this->fixtures = $container->getParameter('behat.doctrine_data_fixtures.fixtures'); - $this->directories = $container->getParameter('behat.doctrine_data_fixtures.directories'); - $this->useBackup = $container->getParameter('behat.doctrine_data_fixtures.use_backup'); - $this->kernel = $kernel; - } + $this->kernel = $kernel; + $this->fixtureExecutor = $executor; - /** - * Returns the reference repository while loading the fixtures. - * - * @return \Doctrine\Common\DataFixtures\ReferenceRepository|null - */ - public function getReferenceRepository() - { - return $this->referenceRepository; - } + $bundleDirectories = $options['autoload'] ? $this->getBundleFixtureDirectories() : array(); - /** - * Lazy init - */ - private function init() - { - $this->listener = new PlatformListener(); + $directories = $options['directories']; + $defaultDirectories = is_array($directories) ? $directories : array(); - $this->entityManager = $this->kernel->getContainer()->get('doctrine')->getManager(); - $this->entityManager->getEventManager()->addEventSubscriber($this->listener); + $this->fixtureDirectories = array_merge($defaultDirectories, $bundleDirectories); + $this->fixtureClasses = $options['fixtures']; - $this->referenceRepository = new ProxyReferenceRepository($this->entityManager); + $this->objectManager = $this->kernel->getContainer()->get($options['model_manager_id']); + $this->referenceRepository = new ProxyReferenceRepository($this->objectManager); } /** - * Retrieve Data fixtures loader + * Fetch fixtures * - * @return mixed + * @return array */ - private function getFixtureLoader() + public function fetchFixtures($loader) { - $container = $this->kernel->getContainer(); + foreach ($this->fixtureDirectories as $directoryName) { + $loader->loadFromDirectory($directoryName); + } - $loader = class_exists('Symfony\Bridge\Doctrine\DataFixtures\ContainerAwareLoader') - ? new DataFixturesLoader($container) - : (class_exists('Doctrine\Bundle\FixturesBundle\Common\DataFixtures\Loader') - ? new DoctrineFixturesLoader($container) - : new SymfonyFixturesLoader($container)); + if (!empty($this->fixtureClasses)) { + $this->fetchFixturesFromClasses($this->fixtureClasses); + } - return $loader; + return $loader->getFixtures(); } /** - * Calculate hash on data fixture class names, class file names and modification timestamps - * - * @param array $fixtures - * - * @return string + * + * @return array */ - private function generateHash($fixtures) + public function getFixtures($force = false) { - $classNames = array_map('get_class', $fixtures); - - foreach ($classNames as & $className) { - $class = new \ReflectionClass($className); - $fileName = $class->getFileName(); - - $className .= ':' . $fileName . '@' . filemtime($fileName); + if ($this->fixtures === null || $force) { + $this->fixtures = $this->fetchFixtures($this->getFixtureLoader()); } - sort($classNames); - - return sha1(serialize($classNames)); + return $this->fixtures; } /** - * Get bundle fixture directories - * - * @return array Array of directories + * Load fixtures into database */ - private function getBundleFixtureDirectories() + public function loadFixtures() { - return array_filter(array_map(function ($bundle) { - $path = $bundle->getPath() . '/DataFixtures/ORM'; - - return is_dir($path) ? $path : null; - }, $this->kernel->getBundles())); + $this->fixtureExecutor->loadFixtures( + $this->objectManager, + $this->referenceRepository, + $this->getFixtures() + ); } /** - * Fetch fixtures from directories - * - * @param array $directoryNames + * Flush entity manager */ - private function fetchFixturesFromDirectories($directoryNames) + public function flush() { - foreach ($directoryNames as $directoryName) { - $this->loader->loadFromDirectory($directoryName); + $objectManager = $this->objectManager; + $objectManager->flush(); + $objectManager->clear(); + + $cacheDriver = $objectManager->getMetadataFactory()->getCacheDriver(); + + if ($cacheDriver) { + $cacheDriver->deleteAll(); } } /** - * Load a data fixture class. - * - * @param string $className Class name + * + * @return \Doctrine\Common\DataFixtures\ProxyReferenceRepository */ - private function loadFixtureClass($className) + public function getReferenceRepository() { - $fixture = new $className(); - - if ($this->loader->hasFixture($fixture)) { - unset($fixture); - - return; - } - - $this->loader->addFixture(new $className()); - - if ($fixture instanceof DependentFixtureInterface) { - foreach ($fixture->getDependencies() as $dependency) { - $this->loadFixtureClass($dependency); - } - } + return $this->referenceRepository; } - + /** * Fetch fixtures from classes * * @param array $classNames */ - private function fetchFixturesFromClasses($classNames) + private function fetchFixturesFromClasses(array $classNames) { foreach ($classNames as $className) { if (substr($className, 0, 1) !== '\\') { $className = '\\' . $className; } - if (! class_exists($className, false)) { + if (!class_exists($className, false)) { $this->loadFixtureClass($className); } } } /** - * Fetch fixtures - * - * @return array - */ - private function fetchFixtures() - { - $this->loader = $this->getFixtureLoader(); - - $bundleDirectories = $this->autoload ? $this->getBundleFixtureDirectories() : array(); - - $this->fetchFixturesFromDirectories($bundleDirectories); - $this->fetchFixturesFromDirectories($this->directories ?: array()); - $this->fetchFixturesFromClasses($this->fixtures ?: array()); - - return $this->loader->getFixtures(); - } - - /** - * Dispatch event - * - * @param \Doctrine\ORM\EntityManager $em Entity manager - * @param string $event Event name - */ - private function dispatchEvent($em, $event) - { - $eventArgs = new LifecycleEventArgs(null, $em); - - $em->getEventManager()->dispatchEvent($event, $eventArgs); - } - - /** - * Load fixtures into database - */ - private function loadFixtures() - { - $em = $this->entityManager; - - $this->dispatchEvent($em, 'preTruncate'); - - $purger = new ORMPurger($em); - $purger->setPurgeMode(ORMPurger::PURGE_MODE_TRUNCATE); - - $executor = new ORMExecutor($em, $purger); - $executor->setReferenceRepository($this->referenceRepository); - $executor->purge(); - $executor->execute($this->fixtures, true); - - $this->dispatchEvent($em, 'postTruncate'); - } - - /** - * Get path to .db file when using SqliteDriver + * Load a data fixture class. * - * @return string - */ - private function getDatabaseFile() - { - $em = $this->entityManager; - $connection = $em->getConnection(); - - if ($connection->getDriver() instanceof SqliteDriver) { - $params = $connection->getParams(); - } - - return isset($params['path']) ? $params['path'] : null; - } - - /** - * Create database - */ - private function createDatabase($path) - { - $em = $this->entityManager; - - $schemaTool = new SchemaTool($em); - $schemaTool->dropDatabase($path); - $schemaTool->createSchema($em->getMetadataFactory()->getAllMetadata()); - } - - /** - * Cache data fixtures + * @param string $className Class name */ - public function cacheFixtures() + private function loadFixtureClass($className) { - $this->init(); + $fixture = new $className(); - $this->databaseFile = $this->getDatabaseFile(); + if ($this->getLoader()->hasFixture($fixture)) { + unset($fixture); - if ($this->databaseFile && ! file_exists($this->databaseFile)) { - $this->createDatabase($this->databaseFile); + return; } - $this->fixtures = $this->fetchFixtures(); + $this->getLoader()->addFixture(new $className()); - if ($this->databaseFile) { - $cacheDirectory = $this->kernel->getContainer()->getParameter('kernel.cache_dir'); - $this->backupDbFile = $cacheDirectory . '/test_' . $this->generateHash($this->fixtures) . '.db'; + if ($fixture instanceof DependentFixtureInterface) { + foreach ($fixture->getDependencies() as $dependency) { + $this->loadFixtureClass($dependency); + } } } /** - * Reload data fixtures + * Retrieve Data fixtures loader + * + * @return mixed */ - public function reloadFixtures() + private function getFixtureLoader() { - if (! $this->useBackup || ! $this->databaseFile) { - $this->loadFixtures(); - - return; - } - - if (file_exists($this->backupDbFile)) { - copy($this->backupDbFile, $this->databaseFile); - $this->referenceRepository->load($this->backupDbFile); - - return; - } - - $this->loadFixtures(); + $container = $this->kernel->getContainer(); + $loader = class_exists('Symfony\Bridge\Doctrine\DataFixtures\ContainerAwareLoader') ? + new DataFixturesLoader($container) : + (class_exists('Doctrine\Bundle\FixturesBundle\Common\DataFixtures\Loader') ? + new DoctrineFixturesLoader($container) : + new SymfonyFixturesLoader($container)); - copy($this->databaseFile, $this->backupDbFile); - $this->referenceRepository->save($this->backupDbFile); + return $loader; } /** - * Flush entity manager + * Get bundle fixture directories + * + * @return array Array of directories */ - public function flush() + private function getBundleFixtureDirectories() { - $em = $this->entityManager; - $em->flush(); - $em->clear(); + $fixtureExecutor = $this->fixtureExecutor; - $cacheDriver = $em->getMetadataFactory()->getCacheDriver(); + return array_filter( + array_map( + function ($bundle) use ($fixtureExecutor) { + $path = $bundle->getPath() . $fixtureExecutor->getFixturesPath(); - if ($cacheDriver) { - $cacheDriver->deleteAll(); - } + return is_dir($path) ? $path : null; + }, + $this->kernel->getBundles() + ) + ); } }