From 29d2eeca2e958b1dce3ef3611fc52b9eea91687d Mon Sep 17 00:00:00 2001 From: Sergey Gonimar Date: Mon, 3 Feb 2014 23:08:31 +0500 Subject: [PATCH 01/12] Fix url for db panel. --- extensions/debug/views/default/index.php | 1 + 1 file changed, 1 insertion(+) diff --git a/extensions/debug/views/default/index.php b/extensions/debug/views/default/index.php index 6af1f9939d..66994b4b7e 100644 --- a/extensions/debug/views/default/index.php +++ b/extensions/debug/views/default/index.php @@ -65,6 +65,7 @@ echo GridView::widget([ $dbPanel = $this->context->module->panels['db']; if ($dbPanel->isQueryCountCritical($data['sqlCount'])) { + $dbPanel->tag = $data['tag']; $content = Html::tag('b', $data['sqlCount']) . ' ' . Html::tag('span','',['class' => 'glyphicon glyphicon-exclamation-sign']); return Html::a($content, $dbPanel->getUrl(), [ From 201422a7230dcf45b9b0feb085be4a90467477c3 Mon Sep 17 00:00:00 2001 From: Sergey Gonimar Date: Tue, 4 Feb 2014 00:24:56 +0600 Subject: [PATCH 02/12] Fix url for db panel. --- extensions/debug/views/default/index.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/extensions/debug/views/default/index.php b/extensions/debug/views/default/index.php index 66994b4b7e..b83f68e6d9 100644 --- a/extensions/debug/views/default/index.php +++ b/extensions/debug/views/default/index.php @@ -65,10 +65,9 @@ echo GridView::widget([ $dbPanel = $this->context->module->panels['db']; if ($dbPanel->isQueryCountCritical($data['sqlCount'])) { - $dbPanel->tag = $data['tag']; $content = Html::tag('b', $data['sqlCount']) . ' ' . Html::tag('span','',['class' => 'glyphicon glyphicon-exclamation-sign']); - return Html::a($content, $dbPanel->getUrl(), [ + return Html::a($content, ['view', 'panel' => 'db', 'tag' => $data['tag']], [ 'title' => 'Too many queries. Allowed count is ' . $dbPanel->criticalQueryThreshold, ]); From 0e3fae36a48ec83c1b1cafd9dfe59532d7258b41 Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 4 Feb 2014 19:54:45 +0400 Subject: [PATCH 03/12] added globalFixtures option --- .../console/controllers/FixtureController.php | 68 +++++++++++-------- 1 file changed, 38 insertions(+), 30 deletions(-) diff --git a/framework/console/controllers/FixtureController.php b/framework/console/controllers/FixtureController.php index b787b424e7..1d18fe751e 100644 --- a/framework/console/controllers/FixtureController.php +++ b/framework/console/controllers/FixtureController.php @@ -12,8 +12,6 @@ use yii\console\Controller; use yii\console\Exception; use yii\helpers\Console; use yii\helpers\FileHelper; -use yii\helpers\ArrayHelper; -use yii\helpers\Inflector; use yii\test\FixtureTrait; /** @@ -68,11 +66,17 @@ class FixtureController extends Controller * @var string id of the database connection component of the application. */ public $db = 'db'; - /** * @var string default namespace to search fixtures in */ public $namespace = 'tests\unit\fixtures'; + /** + * @var array global fixtures that should be applied when loading and unloading. By default it is set to `InitDbFixture` + * that disables and enables integrity check, so your data can be safely loaded. + */ + public $globalFixtures = [ + 'yii\test\InitDbFixture', + ]; /** * Returns the names of the global options for this command. @@ -81,18 +85,19 @@ class FixtureController extends Controller public function globalOptions() { return array_merge(parent::globalOptions(), [ - 'db', 'namespace' + 'db', 'namespace','globalFixtures' ]); } /** - * Apply given fixture to the table. You can load several fixtures specifying - * their names separated with commas, like: tbl_user,tbl_profile. Be sure there is no - * whitespace between tables names. + * Loads given fixture. You can load several fixtures specifying + * their names separated with commas, like: User,UserProfile,MyCustom. Be sure there is no + * whitespace between names. Note that if you are loading fixtures to storage, for example: database or nosql, + * storage will not be cleared, data will be appended to already existed. * @param array $fixtures * @throws \yii\console\Exception */ - public function actionApply(array $fixtures, array $except = []) + public function actionLoad(array $fixtures, array $except = []) { $foundFixtures = $this->findFixtures($fixtures); @@ -110,39 +115,38 @@ class FixtureController extends Controller ); } - if (!$this->confirmApply($foundFixtures, $except)) { + if (!$this->confirmLoad($foundFixtures, $except)) { return; } - $fixtures = $this->getFixturesConfig(array_diff($foundFixtures, $except)); + $filtered = array_diff($foundFixtures, $except); + $fixtures = $this->getFixturesConfig(array_merge($this->globalFixtures ,$filtered)); if (!$fixtures) { throw new Exception('No fixtures were found in namespace: "' . $this->namespace . '"' . ''); } - $transaction = Yii::$app->db->beginTransaction(); + $transaction = $this->getDbConnection()->beginTransaction(); try { - $this->getDbConnection()->createCommand()->checkIntegrity(false)->execute(); $this->loadFixtures($this->createFixtures($fixtures)); - $this->getDbConnection()->createCommand()->checkIntegrity(true)->execute(); $transaction->commit(); } catch (\Exception $e) { $transaction->rollback(); $this->stdout("Exception occurred, transaction rollback. Tables will be in same state.\n", Console::BG_RED); throw $e; } - $this->notifyLoaded(ArrayHelper::getColumn($fixtures, 'class', false)); + $this->notifyLoaded($fixtures); } /** * Unloads given fixtures. You can clear environment and unload multiple fixtures by specifying - * their names separated with commas, like: tbl_user,tbl_profile. Be sure there is no + * their names separated with commas, like: User,UserProfile,MyCustom. Be sure there is no * whitespace between tables names. * @param array|string $fixtures * @param array|string $except */ - public function actionClear(array $fixtures, array $except = []) + public function actionUnload(array $fixtures, array $except = []) { $foundFixtures = $this->findFixtures($fixtures); @@ -160,22 +164,21 @@ class FixtureController extends Controller ); } - if (!$this->confirmClear($foundFixtures, $except)) { + if (!$this->confirmUnload($foundFixtures, $except)) { return; } - $fixtures = $this->getFixturesConfig(array_diff($foundFixtures, $except)); + $filtered = array_diff($foundFixtures, $except); + $fixtures = $this->getFixturesConfig(array_merge($this->globalFixtures ,$filtered)); if (!$fixtures) { throw new Exception('No fixtures were found in namespace: ' . $this->namespace . '".'); } - $transaction = Yii::$app->db->beginTransaction(); + $transaction = $this->getDbConnection()->beginTransaction(); try { - $this->getDbConnection()->createCommand()->checkIntegrity(false)->execute(); $this->unloadFixtures($this->createFixtures($fixtures)); - $this->getDbConnection()->createCommand()->checkIntegrity(true)->execute(); $transaction->commit(); } catch (\Exception $e) { @@ -183,7 +186,7 @@ class FixtureController extends Controller $this->stdout("Exception occurred, transaction rollback. Tables will be in same state.\n", Console::BG_RED); throw $e; } - $this->notifyUnloaded(ArrayHelper::getColumn($fixtures, 'class', false)); + $this->notifyUnloaded($fixtures); } /** @@ -243,12 +246,15 @@ class FixtureController extends Controller * @param array $except * @return boolean */ - private function confirmApply($fixtures, $except) + private function confirmLoad($fixtures, $except) { $this->stdout("Fixtures namespace is: \n", Console::FG_YELLOW); $this->stdout("\t" . $this->namespace . "\n\n", Console::FG_GREEN); - $this->stdout("Fixtures below will be loaded:\n\n", Console::FG_YELLOW); + $this->stdout("Global fixtures will be loaded:\n\n", Console::FG_YELLOW); + $this->outputList($this->globalFixtures); + + $this->stdout("\nFixtures below will be loaded:\n\n", Console::FG_YELLOW); $this->outputList($fixtures); if (count($except)) { @@ -265,12 +271,15 @@ class FixtureController extends Controller * @param array $except * @return boolean */ - private function confirmClear($fixtures, $except) + private function confirmUnload($fixtures, $except) { $this->stdout("Fixtures namespace is: \n", Console::FG_YELLOW); $this->stdout("\t" . $this->namespace . "\n\n", Console::FG_GREEN); - $this->stdout("Fixtures below will be unloaded:\n\n", Console::FG_YELLOW); + $this->stdout("Global fixtures will be unloaded:\n\n", Console::FG_YELLOW); + $this->outputList($this->globalFixtures); + + $this->stdout("\nFixtures below will be unloaded:\n\n", Console::FG_YELLOW); $this->outputList($fixtures); if (count($except)) { @@ -339,12 +348,11 @@ class FixtureController extends Controller foreach ($fixtures as $fixture) { - $fullClassName = $this->namespace . '\\' . $fixture . 'Fixture'; + $isNamespaced = (strpos($fixture, '\\') !== false); + $fullClassName = $isNamespaced ? $fixture : $this->namespace . '\\' . $fixture . 'Fixture'; if (class_exists($fullClassName)) { - $config[Inflector::camel2id($fixture, '_')] = [ - 'class' => $fullClassName, - ]; + $config[] = $fullClassName; } } From 14d303d4799af6ba49b13135e432e0a7b2fdf6af Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 4 Feb 2014 19:56:01 +0400 Subject: [PATCH 04/12] added suffix --- framework/console/controllers/FixtureController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/console/controllers/FixtureController.php b/framework/console/controllers/FixtureController.php index 1d18fe751e..697096d328 100644 --- a/framework/console/controllers/FixtureController.php +++ b/framework/console/controllers/FixtureController.php @@ -349,7 +349,7 @@ class FixtureController extends Controller foreach ($fixtures as $fixture) { $isNamespaced = (strpos($fixture, '\\') !== false); - $fullClassName = $isNamespaced ? $fixture : $this->namespace . '\\' . $fixture . 'Fixture'; + $fullClassName = $isNamespaced ? $fixture . 'Fixture' : $this->namespace . '\\' . $fixture . 'Fixture'; if (class_exists($fullClassName)) { $config[] = $fullClassName; From a4d967ca40e640011e84744a346625e35f101c50 Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 4 Feb 2014 19:59:10 +0400 Subject: [PATCH 05/12] added docs --- docs/guide/console-fixture.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/docs/guide/console-fixture.md b/docs/guide/console-fixture.md index ff8ef06af4..161c22b156 100644 --- a/docs/guide/console-fixture.md +++ b/docs/guide/console-fixture.md @@ -79,6 +79,11 @@ yii fixtures User --db='customDbConnectionId' // apply fixtures, but search them in different namespace. By default namespace is: tests\unit\fixtures. yii fixtures User --namespace='alias\my\custom\namespace' + +// apply global fixture `some\name\space\CustomFixture` before other fixtures will be loaded. +// By default this option is set to `InitDbFixture` to disable/enable integrity checks. You can specify several +// global fixtures separated by comma. +yii fixtures User --globalFixtures='some\name\space\Custom' ``` Unloading fixtures @@ -97,7 +102,7 @@ yii fixture/clear User,UserProfile yii fixture/clear all ``` -Same command options like: `db`, `namespace` also can be applied to this command. +Same command options like: `db`, `namespace`, `globalFixtures` also can be applied to this command. Configure Command Globally -------------------------- @@ -111,6 +116,10 @@ different migration path as follows: 'class' => 'yii\console\controllers\FixtureController', 'db' => 'customDbConnectionId', 'namespace' => 'myalias\some\custom\namespace', + 'globalFixtures' => [ + 'some\name\space\Foo', + 'other\name\space\Bar' + ], ], ] ``` From 91a957251d691b9c0dc8e2572733b251c2691a6c Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 4 Feb 2014 20:00:52 +0400 Subject: [PATCH 06/12] method names fixed --- docs/guide/console-fixture.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/guide/console-fixture.md b/docs/guide/console-fixture.md index 161c22b156..d6dc979d88 100644 --- a/docs/guide/console-fixture.md +++ b/docs/guide/console-fixture.md @@ -49,38 +49,38 @@ Loading fixtures Fixture classes should be suffixed by `Fixture` class. By default fixtures will be searched under `tests\unit\fixtures` namespace, you can change this behavior with config or command options. -To apply fixture, run the following command: +To load fixture, run the following command: ``` -yii fixture/apply +yii fixture/load ``` The required `fixture_name` parameter specifies a fixture name which data will be loaded. You can load several fixtures at once. Below are correct formats of this command: ``` -// apply `users` fixture -yii fixture/apply User +// load `users` fixture +yii fixture/load User // same as above, because default action of "fixture" command is "apply" yii fixture User -// apply several fixtures. Note that there should not be any whitespace between ",", it should be one string. +// load several fixtures. Note that there should not be any whitespace between ",", it should be one string. yii fixture User,UserProfile -// apply all fixtures +// load all fixtures yii fixture/apply all // same as above yii fixture all -// apply fixtures, but for other database connection. +// load fixtures, but for other database connection. yii fixtures User --db='customDbConnectionId' -// apply fixtures, but search them in different namespace. By default namespace is: tests\unit\fixtures. +// load fixtures, but search them in different namespace. By default namespace is: tests\unit\fixtures. yii fixtures User --namespace='alias\my\custom\namespace' -// apply global fixture `some\name\space\CustomFixture` before other fixtures will be loaded. +// load global fixture `some\name\space\CustomFixture` before other fixtures will be loaded. // By default this option is set to `InitDbFixture` to disable/enable integrity checks. You can specify several // global fixtures separated by comma. yii fixtures User --globalFixtures='some\name\space\Custom' @@ -93,13 +93,13 @@ To unload fixture, run the following command: ``` // unload Users fixture, by default it will clear fixture storage (for example "users" table, or "users" collection if this is mongodb fixture). -yii fixture/clear User +yii fixture/unload User // Unload several fixtures. Note that there should not be any whitespace between ",", it should be one string. -yii fixture/clear User,UserProfile +yii fixture/unload User,UserProfile // unload all fixtures -yii fixture/clear all +yii fixture/unload all ``` Same command options like: `db`, `namespace`, `globalFixtures` also can be applied to this command. From cb8fc55a663394f476f1888ea53266ed31e31fd3 Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 4 Feb 2014 20:04:00 +0400 Subject: [PATCH 07/12] removed suffix, since it will be applied later in getFixturesConfig method. --- framework/console/controllers/FixtureController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/console/controllers/FixtureController.php b/framework/console/controllers/FixtureController.php index 697096d328..68979378c0 100644 --- a/framework/console/controllers/FixtureController.php +++ b/framework/console/controllers/FixtureController.php @@ -75,7 +75,7 @@ class FixtureController extends Controller * that disables and enables integrity check, so your data can be safely loaded. */ public $globalFixtures = [ - 'yii\test\InitDbFixture', + 'yii\test\InitDb', ]; /** From 663e898ba7fb88f86d4738e5220bd39bb7da1905 Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 4 Feb 2014 21:00:52 +0400 Subject: [PATCH 08/12] fixed docs, added checks --- docs/guide/console-fixture.md | 8 ++++---- .../console/controllers/FixtureController.php | 18 +++++++++++------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/docs/guide/console-fixture.md b/docs/guide/console-fixture.md index d6dc979d88..c1e2399b4c 100644 --- a/docs/guide/console-fixture.md +++ b/docs/guide/console-fixture.md @@ -62,23 +62,23 @@ Below are correct formats of this command: // load `users` fixture yii fixture/load User -// same as above, because default action of "fixture" command is "apply" +// same as above, because default action of "fixture" command is "load" yii fixture User // load several fixtures. Note that there should not be any whitespace between ",", it should be one string. yii fixture User,UserProfile // load all fixtures -yii fixture/apply all +yii fixture/load all // same as above yii fixture all // load fixtures, but for other database connection. -yii fixtures User --db='customDbConnectionId' +yii fixture User --db='customDbConnectionId' // load fixtures, but search them in different namespace. By default namespace is: tests\unit\fixtures. -yii fixtures User --namespace='alias\my\custom\namespace' +yii fixture User --namespace='alias\my\custom\namespace' // load global fixture `some\name\space\CustomFixture` before other fixtures will be loaded. // By default this option is set to `InitDbFixture` to disable/enable integrity checks. You can specify several diff --git a/framework/console/controllers/FixtureController.php b/framework/console/controllers/FixtureController.php index 68979378c0..67f2700700 100644 --- a/framework/console/controllers/FixtureController.php +++ b/framework/console/controllers/FixtureController.php @@ -33,16 +33,16 @@ use yii\test\FixtureTrait; * * ~~~ * #load fixtures under $fixturePath from UsersFixture class with default namespace "tests\unit\fixtures" - * yii fixture/apply User + * yii fixture/load User * * #also a short version of this command (generate action is default) * yii fixture User * * #load fixtures under $fixturePath with the different database connection - * yii fixture/apply User --db=someOtherDbConnection + * yii fixture/load User --db=someOtherDbConnection * * #load fixtures under different $fixturePath. - * yii fixture/apply User --namespace=alias\my\custom\namespace\goes\here + * yii fixture/load User --namespace=alias\my\custom\namespace\goes\here * ~~~ * * @author Mark Jebri @@ -251,8 +251,10 @@ class FixtureController extends Controller $this->stdout("Fixtures namespace is: \n", Console::FG_YELLOW); $this->stdout("\t" . $this->namespace . "\n\n", Console::FG_GREEN); - $this->stdout("Global fixtures will be loaded:\n\n", Console::FG_YELLOW); - $this->outputList($this->globalFixtures); + if (count($this->globalFixtures)) { + $this->stdout("Global fixtures will be loaded:\n\n", Console::FG_YELLOW); + $this->outputList($this->globalFixtures); + } $this->stdout("\nFixtures below will be loaded:\n\n", Console::FG_YELLOW); $this->outputList($fixtures); @@ -276,8 +278,10 @@ class FixtureController extends Controller $this->stdout("Fixtures namespace is: \n", Console::FG_YELLOW); $this->stdout("\t" . $this->namespace . "\n\n", Console::FG_GREEN); - $this->stdout("Global fixtures will be unloaded:\n\n", Console::FG_YELLOW); - $this->outputList($this->globalFixtures); + if (count($this->globalFixtures)) { + $this->stdout("Global fixtures will be unloaded:\n\n", Console::FG_YELLOW); + $this->outputList($this->globalFixtures); + } $this->stdout("\nFixtures below will be unloaded:\n\n", Console::FG_YELLOW); $this->outputList($fixtures); From 1caa22d79dd4f8b4b87e8ecdef77e14492b44d9a Mon Sep 17 00:00:00 2001 From: Mark Date: Tue, 4 Feb 2014 21:02:09 +0400 Subject: [PATCH 09/12] docs fix --- docs/guide/console-fixture.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/guide/console-fixture.md b/docs/guide/console-fixture.md index c1e2399b4c..1ddf7a3fd3 100644 --- a/docs/guide/console-fixture.md +++ b/docs/guide/console-fixture.md @@ -83,7 +83,7 @@ yii fixture User --namespace='alias\my\custom\namespace' // load global fixture `some\name\space\CustomFixture` before other fixtures will be loaded. // By default this option is set to `InitDbFixture` to disable/enable integrity checks. You can specify several // global fixtures separated by comma. -yii fixtures User --globalFixtures='some\name\space\Custom' +yii fixture User --globalFixtures='some\name\space\Custom' ``` Unloading fixtures From 646e371b44ca2d6ea853ff960457e82404e58406 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Tue, 4 Feb 2014 17:02:32 -0500 Subject: [PATCH 10/12] Fixes #1812: Hide potential warning message due to race condition occurring to `Session::regenerateID()` call --- framework/CHANGELOG.md | 1 + framework/web/Session.php | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 51425e8692..c6bd605ce3 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -26,6 +26,7 @@ Yii Framework 2 Change Log - Bug #1710: OpenId auth client does not request required attributes correctly (klimov-paul) - Bug #1798: Fixed label attributes for array fields (zhuravljov) - Bug #1800: Better check for `$_SERVER['HTTPS']` in `yii\web\Request::getIsSecureConnection()` (ginus, samdark) +- Bug #1812: Hide potential warning message due to race condition occurring to `Session::regenerateID()` call (qiangxue) - Bug #1827: Debugger toolbar is loaded twice if an action is calling `run()` to execute another action (qiangxue) - Bug #1868: Added ability to exclude tables from FixtureController apply/clear actions. (Ragazzo) - Bug #1869: Fixed tables clearing. `TRUNCATE` changed to `DELETE` to avoid postgresql tables checks (and truncating all tables) (Ragazzo) diff --git a/framework/web/Session.php b/framework/web/Session.php index 0ea60ed411..ad2f596af6 100644 --- a/framework/web/Session.php +++ b/framework/web/Session.php @@ -211,7 +211,9 @@ class Session extends Component implements \IteratorAggregate, \ArrayAccess, \Co */ public function regenerateID($deleteOldSession = false) { - session_regenerate_id($deleteOldSession); + // add @ to inhibit possible warning due to race condition + // https://github.com/yiisoft/yii2/pull/1812 + @session_regenerate_id($deleteOldSession); } /** From 42981fabeea3c8cd1e7a43c470195c3addd73d54 Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Tue, 4 Feb 2014 18:41:31 -0500 Subject: [PATCH 11/12] adjusted required packages for yii2-dev. --- composer.json | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index ff94657d6f..9eb63fe899 100644 --- a/composer.json +++ b/composer.json @@ -75,12 +75,10 @@ "yiisoft/yii2-composer": "*", "yiisoft/jquery": "~2.0 | ~1.10", "ezyang/htmlpurifier": "4.6.*", - "michelf/php-markdown": "1.3.*", - "phpspec/php-diff": ">=1.0.2" + "michelf/php-markdown": "1.3.*" }, "require-dev": { - "phpunit/phpunit": "3.7.*", - "twig/twig": "*" + "phpunit/phpunit": "3.7.*" }, "suggest": { "phpdocumentor/reflection": "required by yii2-apidoc extension", @@ -93,7 +91,8 @@ "imagine/imagine": "required by yii2-imagine extension", "smarty/smarty": "required by yii2-smarty extension", "swiftmailer/swiftmailer": "required by yii2-swiftmailer extension", - "twig/twig": "required by yii2-twig extension" + "twig/twig": "required by yii2-twig extension", + "phpspec/php-diff": "required by yii2-gii extension" }, "autoload": { "psr-4": { From 3e732a2bd9cf82457dee819a417d02a8fa9bc54f Mon Sep 17 00:00:00 2001 From: Qiang Xue Date: Tue, 4 Feb 2014 18:56:55 -0500 Subject: [PATCH 12/12] fixed test break. --- composer.json | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/composer.json b/composer.json index 9eb63fe899..6817246e03 100644 --- a/composer.json +++ b/composer.json @@ -75,10 +75,12 @@ "yiisoft/yii2-composer": "*", "yiisoft/jquery": "~2.0 | ~1.10", "ezyang/htmlpurifier": "4.6.*", - "michelf/php-markdown": "1.3.*" + "michelf/php-markdown": "1.3.*", + "phpspec/php-diff": ">=1.0.2" }, "require-dev": { - "phpunit/phpunit": "3.7.*" + "phpunit/phpunit": "3.7.*", + "twig/twig": "*" }, "suggest": { "phpdocumentor/reflection": "required by yii2-apidoc extension", @@ -90,9 +92,7 @@ "fzaninotto/faker": "required by yii2-faker extension", "imagine/imagine": "required by yii2-imagine extension", "smarty/smarty": "required by yii2-smarty extension", - "swiftmailer/swiftmailer": "required by yii2-swiftmailer extension", - "twig/twig": "required by yii2-twig extension", - "phpspec/php-diff": "required by yii2-gii extension" + "swiftmailer/swiftmailer": "required by yii2-swiftmailer extension" }, "autoload": { "psr-4": {