Commit 1755c39324a0e7d6d021993aa6bc058c06f636a4
1 parent
db5390cc
Basic template init files
Showing
141 changed files
with
7041 additions
and
7 deletions
Show diff stats
1 | +Options FollowSymLinks | |
2 | +AddDefaultCharset utf-8 | |
3 | + | |
4 | +<IfModule mod_rewrite.c> | |
5 | + RewriteEngine On | |
6 | + | |
7 | + # the main rewrite rule for the frontend application | |
8 | + RewriteCond %{REQUEST_URI} !^/(backend/web|admin|uploads) | |
9 | + RewriteRule !^frontend/web /frontend/web%{REQUEST_URI} [L] | |
10 | + | |
11 | + # redirect to the page without a trailing slash (uncomment if necessary) | |
12 | + #RewriteCond %{REQUEST_URI} ^/admin/$ | |
13 | + #RewriteRule ^(admin)/ /$1 [L,R=301] | |
14 | + # the main rewrite rule for the backend application | |
15 | + RewriteCond %{REQUEST_URI} ^/admin | |
16 | + RewriteRule ^admin(.*) /backend/web/$1 [L] | |
17 | + | |
18 | + # if a directory or a file of the uploads folder exists, use the request directly | |
19 | + RewriteCond %{REQUEST_URI} ^/uploads | |
20 | + RewriteCond %{REQUEST_FILENAME} !-f | |
21 | + RewriteCond %{REQUEST_FILENAME} !-d | |
22 | + # otherwise forward the request to index.php of grontend app | |
23 | + RewriteRule . /frontend/web/index.php [L] | |
24 | + | |
25 | + # if a directory or a file of the frontend application exists, use the request directly | |
26 | + RewriteCond %{REQUEST_URI} ^/frontend/web | |
27 | + RewriteCond %{REQUEST_FILENAME} !-f | |
28 | + RewriteCond %{REQUEST_FILENAME} !-d | |
29 | + # otherwise forward the request to index.php | |
30 | + RewriteRule . /frontend/web/index.php [L] | |
31 | + | |
32 | + # if a directory or a file of the backend application exists, use the request directly | |
33 | + RewriteCond %{REQUEST_URI} ^/backend/web | |
34 | + RewriteCond %{REQUEST_FILENAME} !-f | |
35 | + RewriteCond %{REQUEST_FILENAME} !-d | |
36 | + # otherwise forward the request to index.php | |
37 | + RewriteRule . /backend/web/index.php [L] | |
38 | + | |
39 | + RewriteCond %{REQUEST_URI} \.(htaccess|htpasswd|svn|git) | |
40 | + RewriteRule \.(htaccess|htpasswd|svn|git) - [F] | |
41 | +</IfModule> | |
0 | 42 | \ No newline at end of file | ... | ... |
1 | +The Yii framework is free software. It is released under the terms of | |
2 | +the following BSD License. | |
3 | + | |
4 | +Copyright ยฉ 2008 by Yii Software LLC (http://www.yiisoft.com) | |
5 | +All rights reserved. | |
6 | + | |
7 | +Redistribution and use in source and binary forms, with or without | |
8 | +modification, are permitted provided that the following conditions | |
9 | +are met: | |
10 | + | |
11 | + * Redistributions of source code must retain the above copyright | |
12 | + notice, this list of conditions and the following disclaimer. | |
13 | + * Redistributions in binary form must reproduce the above copyright | |
14 | + notice, this list of conditions and the following disclaimer in | |
15 | + the documentation and/or other materials provided with the | |
16 | + distribution. | |
17 | + * Neither the name of Yii Software LLC nor the names of its | |
18 | + contributors may be used to endorse or promote products derived | |
19 | + from this software without specific prior written permission. | |
20 | + | |
21 | +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | |
22 | +"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | |
23 | +LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | |
24 | +FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | |
25 | +COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | |
26 | +INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | |
27 | +BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | |
28 | +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | |
29 | +CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | |
30 | +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | |
31 | +ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
32 | +POSSIBILITY OF SUCH DAMAGE. | ... | ... |
1 | +Yii 2 Advanced Project Template | |
2 | +=============================== | |
3 | + | |
4 | +Yii 2 Advanced Project Template is a skeleton [Yii 2](http://www.yiiframework.com/) application best for | |
5 | +developing complex Web applications with multiple tiers. | |
6 | + | |
7 | +The template includes three tiers: front end, back end, and console, each of which | |
8 | +is a separate Yii application. | |
9 | + | |
10 | +The template is designed to work in a team development environment. It supports | |
11 | +deploying the application in different environments. | |
12 | + | |
13 | +Documentation is at [docs/guide/README.md](docs/guide/README.md). | |
14 | + | |
15 | +[](https://packagist.org/packages/yiisoft/yii2-app-advanced) | |
16 | +[](https://packagist.org/packages/yiisoft/yii2-app-advanced) | |
17 | +[](https://travis-ci.org/yiisoft/yii2-app-advanced) | |
18 | + | |
19 | +DIRECTORY STRUCTURE | |
20 | +------------------- | |
21 | + | |
22 | +``` | |
23 | +common | |
24 | + config/ contains shared configurations | |
25 | + mail/ contains view files for e-mails | |
26 | + models/ contains model classes used in both backend and frontend | |
27 | + tests/ contains tests for common classes | |
28 | +console | |
29 | + config/ contains console configurations | |
30 | + controllers/ contains console controllers (commands) | |
31 | + migrations/ contains database migrations | |
32 | + models/ contains console-specific model classes | |
33 | + runtime/ contains files generated during runtime | |
34 | +backend | |
35 | + assets/ contains application assets such as JavaScript and CSS | |
36 | + config/ contains backend configurations | |
37 | + controllers/ contains Web controller classes | |
38 | + models/ contains backend-specific model classes | |
39 | + runtime/ contains files generated during runtime | |
40 | + tests/ contains tests for backend application | |
41 | + views/ contains view files for the Web application | |
42 | + web/ contains the entry script and Web resources | |
43 | +frontend | |
44 | + assets/ contains application assets such as JavaScript and CSS | |
45 | + config/ contains frontend configurations | |
46 | + controllers/ contains Web controller classes | |
47 | + models/ contains frontend-specific model classes | |
48 | + runtime/ contains files generated during runtime | |
49 | + tests/ contains tests for frontend application | |
50 | + views/ contains view files for the Web application | |
51 | + web/ contains the entry script and Web resources | |
52 | + widgets/ contains frontend widgets | |
53 | +vendor/ contains dependent 3rd-party packages | |
54 | +environments/ contains environment-based overrides | |
55 | +``` | ... | ... |
1 | +<?php | |
2 | + | |
3 | +namespace backend\assets; | |
4 | + | |
5 | +use yii\web\AssetBundle; | |
6 | + | |
7 | +/** | |
8 | + * Main backend application asset bundle. | |
9 | + */ | |
10 | +class AppAsset extends AssetBundle | |
11 | +{ | |
12 | + public $basePath = '@webroot'; | |
13 | + public $baseUrl = '@web'; | |
14 | + public $css = [ | |
15 | + 'css/site.css', | |
16 | + ]; | |
17 | + public $js = [ | |
18 | + ]; | |
19 | + public $depends = [ | |
20 | + 'yii\web\YiiAsset', | |
21 | + 'yii\bootstrap\BootstrapAsset', | |
22 | + ]; | |
23 | +} | ... | ... |
1 | +namespace: backend\tests | |
2 | +actor: Tester | |
3 | +paths: | |
4 | + tests: tests | |
5 | + log: tests/_output | |
6 | + data: tests/_data | |
7 | + helpers: tests/_support | |
8 | +settings: | |
9 | + bootstrap: _bootstrap.php | |
10 | + colors: true | |
11 | + memory_limit: 1024M | |
12 | +modules: | |
13 | + config: | |
14 | + Yii2: | |
15 | + configFile: 'config/test-local.php' | ... | ... |
1 | +<?php | ... | ... |
1 | +<?php | |
2 | +$params = array_merge( | |
3 | + require(__DIR__ . '/../../common/config/params.php'), | |
4 | + require(__DIR__ . '/../../common/config/params-local.php'), | |
5 | + require(__DIR__ . '/params.php'), | |
6 | + require(__DIR__ . '/params-local.php') | |
7 | +); | |
8 | + | |
9 | +return [ | |
10 | + 'id' => 'app-backend', | |
11 | + 'basePath' => dirname(__DIR__), | |
12 | + 'controllerNamespace' => 'backend\controllers', | |
13 | + 'bootstrap' => ['log'], | |
14 | + 'modules' => [], | |
15 | + 'components' => [ | |
16 | + 'request' => [ | |
17 | + 'csrfParam' => '_csrf-backend', | |
18 | + ], | |
19 | + 'user' => [ | |
20 | + 'identityClass' => 'common\models\User', | |
21 | + 'enableAutoLogin' => true, | |
22 | + 'identityCookie' => ['name' => '_identity-backend', 'httpOnly' => true], | |
23 | + ], | |
24 | + 'session' => [ | |
25 | + // this is the name of the session cookie used for login on the backend | |
26 | + 'name' => 'advanced-backend', | |
27 | + ], | |
28 | + 'log' => [ | |
29 | + 'traceLevel' => YII_DEBUG ? 3 : 0, | |
30 | + 'targets' => [ | |
31 | + [ | |
32 | + 'class' => 'yii\log\FileTarget', | |
33 | + 'levels' => ['error', 'warning'], | |
34 | + ], | |
35 | + ], | |
36 | + ], | |
37 | + 'errorHandler' => [ | |
38 | + 'errorAction' => 'site/error', | |
39 | + ], | |
40 | + /* | |
41 | + 'urlManager' => [ | |
42 | + 'enablePrettyUrl' => true, | |
43 | + 'showScriptName' => false, | |
44 | + 'rules' => [ | |
45 | + ], | |
46 | + ], | |
47 | + */ | |
48 | + ], | |
49 | + 'params' => $params, | |
50 | +]; | ... | ... |
1 | +<?php | |
2 | +namespace backend\controllers; | |
3 | + | |
4 | +use Yii; | |
5 | +use yii\web\Controller; | |
6 | +use yii\filters\VerbFilter; | |
7 | +use yii\filters\AccessControl; | |
8 | +use common\models\LoginForm; | |
9 | + | |
10 | +/** | |
11 | + * Site controller | |
12 | + */ | |
13 | +class SiteController extends Controller | |
14 | +{ | |
15 | + /** | |
16 | + * @inheritdoc | |
17 | + */ | |
18 | + public function behaviors() | |
19 | + { | |
20 | + return [ | |
21 | + 'access' => [ | |
22 | + 'class' => AccessControl::className(), | |
23 | + 'rules' => [ | |
24 | + [ | |
25 | + 'actions' => ['login', 'error'], | |
26 | + 'allow' => true, | |
27 | + ], | |
28 | + [ | |
29 | + 'actions' => ['logout', 'index'], | |
30 | + 'allow' => true, | |
31 | + 'roles' => ['@'], | |
32 | + ], | |
33 | + ], | |
34 | + ], | |
35 | + 'verbs' => [ | |
36 | + 'class' => VerbFilter::className(), | |
37 | + 'actions' => [ | |
38 | + 'logout' => ['post'], | |
39 | + ], | |
40 | + ], | |
41 | + ]; | |
42 | + } | |
43 | + | |
44 | + /** | |
45 | + * @inheritdoc | |
46 | + */ | |
47 | + public function actions() | |
48 | + { | |
49 | + return [ | |
50 | + 'error' => [ | |
51 | + 'class' => 'yii\web\ErrorAction', | |
52 | + ], | |
53 | + ]; | |
54 | + } | |
55 | + | |
56 | + /** | |
57 | + * Displays homepage. | |
58 | + * | |
59 | + * @return string | |
60 | + */ | |
61 | + public function actionIndex() | |
62 | + { | |
63 | + return $this->render('index'); | |
64 | + } | |
65 | + | |
66 | + /** | |
67 | + * Login action. | |
68 | + * | |
69 | + * @return string | |
70 | + */ | |
71 | + public function actionLogin() | |
72 | + { | |
73 | + if (!Yii::$app->user->isGuest) { | |
74 | + return $this->goHome(); | |
75 | + } | |
76 | + | |
77 | + $model = new LoginForm(); | |
78 | + if ($model->load(Yii::$app->request->post()) && $model->login()) { | |
79 | + return $this->goBack(); | |
80 | + } else { | |
81 | + return $this->render('login', [ | |
82 | + 'model' => $model, | |
83 | + ]); | |
84 | + } | |
85 | + } | |
86 | + | |
87 | + /** | |
88 | + * Logout action. | |
89 | + * | |
90 | + * @return string | |
91 | + */ | |
92 | + public function actionLogout() | |
93 | + { | |
94 | + Yii::$app->user->logout(); | |
95 | + | |
96 | + return $this->goHome(); | |
97 | + } | |
98 | +} | ... | ... |
1 | +* | ... | ... |
1 | +<?php | |
2 | +defined('YII_DEBUG') or define('YII_DEBUG', true); | |
3 | +defined('YII_ENV') or define('YII_ENV', 'test'); | |
4 | +defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', __DIR__.'/../../'); | |
5 | + | |
6 | +require_once(YII_APP_BASE_PATH . '/vendor/autoload.php'); | |
7 | +require_once(YII_APP_BASE_PATH . '/vendor/yiisoft/yii2/Yii.php'); | |
8 | +require_once(YII_APP_BASE_PATH . '/common/config/bootstrap.php'); | |
9 | +require_once(__DIR__ . '/../config/bootstrap.php'); | ... | ... |
1 | +<?php | |
2 | +return [ | |
3 | + [ | |
4 | + 'username' => 'erau', | |
5 | + 'auth_key' => 'tUu1qHcde0diwUol3xeI-18MuHkkprQI', | |
6 | + // password_0 | |
7 | + 'password_hash' => '$2y$13$nJ1WDlBaGcbCdbNC5.5l4.sgy.OMEKCqtDQOdQ2OWpgiKRWYyzzne', | |
8 | + 'password_reset_token' => 'RkD_Jw0_8HEedzLk7MM-ZKEFfYR7VbMr_1392559490', | |
9 | + 'created_at' => '1392559490', | |
10 | + 'updated_at' => '1392559490', | |
11 | + 'email' => 'sfriesen@jenkins.info', | |
12 | + ], | |
13 | +]; | ... | ... |
1 | +_generated | ... | ... |
1 | +<?php | |
2 | +namespace backend\tests; | |
3 | + | |
4 | +/** | |
5 | + * Inherited Methods | |
6 | + * @method void wantToTest($text) | |
7 | + * @method void wantTo($text) | |
8 | + * @method void execute($callable) | |
9 | + * @method void expectTo($prediction) | |
10 | + * @method void expect($prediction) | |
11 | + * @method void amGoingTo($argumentation) | |
12 | + * @method void am($role) | |
13 | + * @method void lookForwardTo($achieveValue) | |
14 | + * @method void comment($description) | |
15 | + * @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL) | |
16 | + * | |
17 | + * @SuppressWarnings(PHPMD) | |
18 | + */ | |
19 | +class FunctionalTester extends \Codeception\Actor | |
20 | +{ | |
21 | + use _generated\FunctionalTesterActions; | |
22 | + /** | |
23 | + * Define custom actions here | |
24 | + */ | |
25 | +} | ... | ... |
1 | +<?php | |
2 | +namespace backend\tests; | |
3 | + | |
4 | +/** | |
5 | + * Inherited Methods | |
6 | + * @method void wantToTest($text) | |
7 | + * @method void wantTo($text) | |
8 | + * @method void execute($callable) | |
9 | + * @method void expectTo($prediction) | |
10 | + * @method void expect($prediction) | |
11 | + * @method void amGoingTo($argumentation) | |
12 | + * @method void am($role) | |
13 | + * @method void lookForwardTo($achieveValue) | |
14 | + * @method void comment($description) | |
15 | + * @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL) | |
16 | + * | |
17 | + * @SuppressWarnings(PHPMD) | |
18 | + */ | |
19 | +class UnitTester extends \Codeception\Actor | |
20 | +{ | |
21 | + use _generated\UnitTesterActions; | |
22 | + /** | |
23 | + * Define custom actions here | |
24 | + */ | |
25 | +} | ... | ... |
1 | +<?php | |
2 | + | |
3 | +namespace backend\tests\functional; | |
4 | + | |
5 | +use \backend\tests\FunctionalTester; | |
6 | +use common\fixtures\User as UserFixture; | |
7 | + | |
8 | +/** | |
9 | + * Class LoginCest | |
10 | + */ | |
11 | +class LoginCest | |
12 | +{ | |
13 | + public function _before(FunctionalTester $I) | |
14 | + { | |
15 | + $I->haveFixtures([ | |
16 | + 'user' => [ | |
17 | + 'class' => UserFixture::className(), | |
18 | + 'dataFile' => codecept_data_dir() . 'login_data.php' | |
19 | + ] | |
20 | + ]); | |
21 | + } | |
22 | + /** | |
23 | + * @param FunctionalTester $I | |
24 | + */ | |
25 | + public function loginUser(FunctionalTester $I) | |
26 | + { | |
27 | + $I->amOnPage('/site/login'); | |
28 | + $I->fillField('Username', 'erau'); | |
29 | + $I->fillField('Password', 'password_0'); | |
30 | + $I->click('login-button'); | |
31 | + | |
32 | + $I->see('Logout (erau)', 'form button[type=submit]'); | |
33 | + $I->dontSeeLink('Login'); | |
34 | + $I->dontSeeLink('Signup'); | |
35 | + } | |
36 | +} | ... | ... |
1 | +<?php | |
2 | +/** | |
3 | + * Here you can initialize variables via \Codeception\Util\Fixtures class | |
4 | + * to store data in global array and use it in Cests. | |
5 | + * | |
6 | + * ```php | |
7 | + * // Here _bootstrap.php | |
8 | + * \Codeception\Util\Fixtures::add('user1', ['name' => 'davert']); | |
9 | + * ``` | |
10 | + * | |
11 | + * In Cests | |
12 | + * | |
13 | + * ```php | |
14 | + * \Codeception\Util\Fixtures::get('user1'); | |
15 | + * ``` | |
16 | + */ | |
0 | 17 | \ No newline at end of file | ... | ... |
1 | +class_name: UnitTester | ... | ... |
1 | +<?php | |
2 | +/** | |
3 | + * Here you can initialize variables via \Codeception\Util\Fixtures class | |
4 | + * to store data in global array and use it in Tests. | |
5 | + * | |
6 | + * ```php | |
7 | + * // Here _bootstrap.php | |
8 | + * \Codeception\Util\Fixtures::add('user1', ['name' => 'davert']); | |
9 | + * ``` | |
10 | + * | |
11 | + * In Tests | |
12 | + * | |
13 | + * ```php | |
14 | + * \Codeception\Util\Fixtures::get('user1'); | |
15 | + * ``` | |
16 | + */ | ... | ... |
1 | +<?php | |
2 | + | |
3 | +/* @var $this \yii\web\View */ | |
4 | +/* @var $content string */ | |
5 | + | |
6 | +use backend\assets\AppAsset; | |
7 | +use yii\helpers\Html; | |
8 | +use yii\bootstrap\Nav; | |
9 | +use yii\bootstrap\NavBar; | |
10 | +use yii\widgets\Breadcrumbs; | |
11 | +use common\widgets\Alert; | |
12 | + | |
13 | +AppAsset::register($this); | |
14 | +?> | |
15 | +<?php $this->beginPage() ?> | |
16 | +<!DOCTYPE html> | |
17 | +<html lang="<?= Yii::$app->language ?>"> | |
18 | +<head> | |
19 | + <meta charset="<?= Yii::$app->charset ?>"> | |
20 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | |
21 | + <?= Html::csrfMetaTags() ?> | |
22 | + <title><?= Html::encode($this->title) ?></title> | |
23 | + <?php $this->head() ?> | |
24 | +</head> | |
25 | +<body> | |
26 | +<?php $this->beginBody() ?> | |
27 | + | |
28 | +<div class="wrap"> | |
29 | + <?php | |
30 | + NavBar::begin([ | |
31 | + 'brandLabel' => 'My Company', | |
32 | + 'brandUrl' => Yii::$app->homeUrl, | |
33 | + 'options' => [ | |
34 | + 'class' => 'navbar-inverse navbar-fixed-top', | |
35 | + ], | |
36 | + ]); | |
37 | + $menuItems = [ | |
38 | + ['label' => 'Home', 'url' => ['/site/index']], | |
39 | + ]; | |
40 | + if (Yii::$app->user->isGuest) { | |
41 | + $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']]; | |
42 | + } else { | |
43 | + $menuItems[] = '<li>' | |
44 | + . Html::beginForm(['/site/logout'], 'post') | |
45 | + . Html::submitButton( | |
46 | + 'Logout (' . Yii::$app->user->identity->username . ')', | |
47 | + ['class' => 'btn btn-link logout'] | |
48 | + ) | |
49 | + . Html::endForm() | |
50 | + . '</li>'; | |
51 | + } | |
52 | + echo Nav::widget([ | |
53 | + 'options' => ['class' => 'navbar-nav navbar-right'], | |
54 | + 'items' => $menuItems, | |
55 | + ]); | |
56 | + NavBar::end(); | |
57 | + ?> | |
58 | + | |
59 | + <div class="container"> | |
60 | + <?= Breadcrumbs::widget([ | |
61 | + 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], | |
62 | + ]) ?> | |
63 | + <?= Alert::widget() ?> | |
64 | + <?= $content ?> | |
65 | + </div> | |
66 | +</div> | |
67 | + | |
68 | +<footer class="footer"> | |
69 | + <div class="container"> | |
70 | + <p class="pull-left">© My Company <?= date('Y') ?></p> | |
71 | + | |
72 | + <p class="pull-right"><?= Yii::powered() ?></p> | |
73 | + </div> | |
74 | +</footer> | |
75 | + | |
76 | +<?php $this->endBody() ?> | |
77 | +</body> | |
78 | +</html> | |
79 | +<?php $this->endPage() ?> | ... | ... |
1 | +<?php | |
2 | + | |
3 | +/* @var $this yii\web\View */ | |
4 | +/* @var $name string */ | |
5 | +/* @var $message string */ | |
6 | +/* @var $exception Exception */ | |
7 | + | |
8 | +use yii\helpers\Html; | |
9 | + | |
10 | +$this->title = $name; | |
11 | +?> | |
12 | +<div class="site-error"> | |
13 | + | |
14 | + <h1><?= Html::encode($this->title) ?></h1> | |
15 | + | |
16 | + <div class="alert alert-danger"> | |
17 | + <?= nl2br(Html::encode($message)) ?> | |
18 | + </div> | |
19 | + | |
20 | + <p> | |
21 | + The above error occurred while the Web server was processing your request. | |
22 | + </p> | |
23 | + <p> | |
24 | + Please contact us if you think this is a server error. Thank you. | |
25 | + </p> | |
26 | + | |
27 | +</div> | ... | ... |
1 | +<?php | |
2 | + | |
3 | +/* @var $this yii\web\View */ | |
4 | + | |
5 | +$this->title = 'My Yii Application'; | |
6 | +?> | |
7 | +<div class="site-index"> | |
8 | + | |
9 | + <div class="jumbotron"> | |
10 | + <h1>Congratulations!</h1> | |
11 | + | |
12 | + <p class="lead">You have successfully created your Yii-powered application.</p> | |
13 | + | |
14 | + <p><a class="btn btn-lg btn-success" href="http://www.yiiframework.com">Get started with Yii</a></p> | |
15 | + </div> | |
16 | + | |
17 | + <div class="body-content"> | |
18 | + | |
19 | + <div class="row"> | |
20 | + <div class="col-lg-4"> | |
21 | + <h2>Heading</h2> | |
22 | + | |
23 | + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et | |
24 | + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip | |
25 | + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu | |
26 | + fugiat nulla pariatur.</p> | |
27 | + | |
28 | + <p><a class="btn btn-default" href="http://www.yiiframework.com/doc/">Yii Documentation »</a></p> | |
29 | + </div> | |
30 | + <div class="col-lg-4"> | |
31 | + <h2>Heading</h2> | |
32 | + | |
33 | + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et | |
34 | + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip | |
35 | + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu | |
36 | + fugiat nulla pariatur.</p> | |
37 | + | |
38 | + <p><a class="btn btn-default" href="http://www.yiiframework.com/forum/">Yii Forum »</a></p> | |
39 | + </div> | |
40 | + <div class="col-lg-4"> | |
41 | + <h2>Heading</h2> | |
42 | + | |
43 | + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et | |
44 | + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip | |
45 | + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu | |
46 | + fugiat nulla pariatur.</p> | |
47 | + | |
48 | + <p><a class="btn btn-default" href="http://www.yiiframework.com/extensions/">Yii Extensions »</a></p> | |
49 | + </div> | |
50 | + </div> | |
51 | + | |
52 | + </div> | |
53 | +</div> | ... | ... |
1 | +<?php | |
2 | + | |
3 | +/* @var $this yii\web\View */ | |
4 | +/* @var $form yii\bootstrap\ActiveForm */ | |
5 | +/* @var $model \common\models\LoginForm */ | |
6 | + | |
7 | +use yii\helpers\Html; | |
8 | +use yii\bootstrap\ActiveForm; | |
9 | + | |
10 | +$this->title = 'Login'; | |
11 | +$this->params['breadcrumbs'][] = $this->title; | |
12 | +?> | |
13 | +<div class="site-login"> | |
14 | + <h1><?= Html::encode($this->title) ?></h1> | |
15 | + | |
16 | + <p>Please fill out the following fields to login:</p> | |
17 | + | |
18 | + <div class="row"> | |
19 | + <div class="col-lg-5"> | |
20 | + <?php $form = ActiveForm::begin(['id' => 'login-form']); ?> | |
21 | + | |
22 | + <?= $form->field($model, 'username')->textInput(['autofocus' => true]) ?> | |
23 | + | |
24 | + <?= $form->field($model, 'password')->passwordInput() ?> | |
25 | + | |
26 | + <?= $form->field($model, 'rememberMe')->checkbox() ?> | |
27 | + | |
28 | + <div class="form-group"> | |
29 | + <?= Html::submitButton('Login', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?> | |
30 | + </div> | |
31 | + | |
32 | + <?php ActiveForm::end(); ?> | |
33 | + </div> | |
34 | + </div> | |
35 | +</div> | ... | ... |
1 | +html, | |
2 | +body { | |
3 | + height: 100%; | |
4 | +} | |
5 | + | |
6 | +.wrap { | |
7 | + min-height: 100%; | |
8 | + height: auto; | |
9 | + margin: 0 auto -60px; | |
10 | + padding: 0 0 60px; | |
11 | +} | |
12 | + | |
13 | +.wrap > .container { | |
14 | + padding: 70px 15px 20px; | |
15 | +} | |
16 | + | |
17 | +.footer { | |
18 | + height: 60px; | |
19 | + background-color: #f5f5f5; | |
20 | + border-top: 1px solid #ddd; | |
21 | + padding-top: 20px; | |
22 | +} | |
23 | + | |
24 | +.jumbotron { | |
25 | + text-align: center; | |
26 | + background-color: transparent; | |
27 | +} | |
28 | + | |
29 | +.jumbotron .btn { | |
30 | + font-size: 21px; | |
31 | + padding: 14px 24px; | |
32 | +} | |
33 | + | |
34 | +.not-set { | |
35 | + color: #c55; | |
36 | + font-style: italic; | |
37 | +} | |
38 | + | |
39 | +/* add sorting icons to gridview sort links */ | |
40 | +a.asc:after, a.desc:after { | |
41 | + position: relative; | |
42 | + top: 1px; | |
43 | + display: inline-block; | |
44 | + font-family: 'Glyphicons Halflings'; | |
45 | + font-style: normal; | |
46 | + font-weight: normal; | |
47 | + line-height: 1; | |
48 | + padding-left: 5px; | |
49 | +} | |
50 | + | |
51 | +a.asc:after { | |
52 | + content: /*"\e113"*/ "\e151"; | |
53 | +} | |
54 | + | |
55 | +a.desc:after { | |
56 | + content: /*"\e114"*/ "\e152"; | |
57 | +} | |
58 | + | |
59 | +.sort-numerical a.asc:after { | |
60 | + content: "\e153"; | |
61 | +} | |
62 | + | |
63 | +.sort-numerical a.desc:after { | |
64 | + content: "\e154"; | |
65 | +} | |
66 | + | |
67 | +.sort-ordinal a.asc:after { | |
68 | + content: "\e155"; | |
69 | +} | |
70 | + | |
71 | +.sort-ordinal a.desc:after { | |
72 | + content: "\e156"; | |
73 | +} | |
74 | + | |
75 | +.grid-view td { | |
76 | + white-space: nowrap; | |
77 | +} | |
78 | + | |
79 | +.grid-view .filters input, | |
80 | +.grid-view .filters select { | |
81 | + min-width: 50px; | |
82 | +} | |
83 | + | |
84 | +.hint-block { | |
85 | + display: block; | |
86 | + margin-top: 5px; | |
87 | + color: #999; | |
88 | +} | |
89 | + | |
90 | +.error-summary { | |
91 | + color: #a94442; | |
92 | + background: #fdf7f7; | |
93 | + border-left: 3px solid #eed3d7; | |
94 | + padding: 10px 20px; | |
95 | + margin: 0 0 15px 0; | |
96 | +} | |
97 | + | |
98 | +/* align the logout "link" (button in form) of the navbar */ | |
99 | +.nav li > form > button.logout { | |
100 | + padding: 15px; | |
101 | + border: none; | |
102 | +} | |
103 | + | |
104 | +@media(max-width:767px) { | |
105 | + .nav li > form > button.logout { | |
106 | + display:block; | |
107 | + text-align: left; | |
108 | + width: 100%; | |
109 | + padding: 10px 15px; | |
110 | + } | |
111 | +} | |
112 | + | |
113 | +.nav > li > form > button.logout:focus, | |
114 | +.nav > li > form > button.logout:hover { | |
115 | + text-decoration: none; | |
116 | +} | |
117 | + | |
118 | +.nav > li > form > button.logout:focus { | |
119 | + outline: none; | |
120 | +} | ... | ... |
No preview for this file type
1 | +namespace: common\tests | |
2 | +actor: Tester | |
3 | +paths: | |
4 | + tests: tests | |
5 | + log: tests/_output | |
6 | + data: tests/_data | |
7 | + helpers: tests/_support | |
8 | +settings: | |
9 | + bootstrap: _bootstrap.php | |
10 | + colors: true | |
11 | + memory_limit: 1024M | |
12 | +modules: | |
13 | + config: | |
14 | + Yii2: | |
15 | + configFile: 'config/test-local.php' | ... | ... |
1 | +<?php | |
2 | +use yii\helpers\Html; | |
3 | + | |
4 | +/* @var $this \yii\web\View view component instance */ | |
5 | +/* @var $message \yii\mail\MessageInterface the message being composed */ | |
6 | +/* @var $content string main view render result */ | |
7 | +?> | |
8 | +<?php $this->beginPage() ?> | |
9 | +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
10 | +<html xmlns="http://www.w3.org/1999/xhtml"> | |
11 | +<head> | |
12 | + <meta http-equiv="Content-Type" content="text/html; charset=<?= Yii::$app->charset ?>" /> | |
13 | + <title><?= Html::encode($this->title) ?></title> | |
14 | + <?php $this->head() ?> | |
15 | +</head> | |
16 | +<body> | |
17 | + <?php $this->beginBody() ?> | |
18 | + <?= $content ?> | |
19 | + <?php $this->endBody() ?> | |
20 | +</body> | |
21 | +</html> | |
22 | +<?php $this->endPage() ?> | ... | ... |
1 | +<?php | |
2 | + | |
3 | +use yii\helpers\Html; | |
4 | + | |
5 | +/** @var \yii\web\View $this view component instance */ | |
6 | +/** @var \yii\mail\MessageInterface $message the message being composed */ | |
7 | +/** @var string $content main view render result */ | |
8 | +?> | |
9 | + | |
10 | +<?php $this->beginPage() ?> | |
11 | +<?php $this->beginBody() ?> | |
12 | +<?= $content ?> | |
13 | +<?php $this->endBody() ?> | |
14 | +<?php $this->endPage() ?> | ... | ... |
1 | +<?php | |
2 | +use yii\helpers\Html; | |
3 | + | |
4 | +/* @var $this yii\web\View */ | |
5 | +/* @var $user common\models\User */ | |
6 | + | |
7 | +$resetLink = Yii::$app->urlManager->createAbsoluteUrl(['site/reset-password', 'token' => $user->password_reset_token]); | |
8 | +?> | |
9 | +<div class="password-reset"> | |
10 | + <p>Hello <?= Html::encode($user->username) ?>,</p> | |
11 | + | |
12 | + <p>Follow the link below to reset your password:</p> | |
13 | + | |
14 | + <p><?= Html::a(Html::encode($resetLink), $resetLink) ?></p> | |
15 | +</div> | ... | ... |
1 | +<?php | |
2 | + | |
3 | +/* @var $this yii\web\View */ | |
4 | +/* @var $user common\models\User */ | |
5 | + | |
6 | +$resetLink = Yii::$app->urlManager->createAbsoluteUrl(['site/reset-password', 'token' => $user->password_reset_token]); | |
7 | +?> | |
8 | +Hello <?= $user->username ?>, | |
9 | + | |
10 | +Follow the link below to reset your password: | |
11 | + | |
12 | +<?= $resetLink ?> | ... | ... |
1 | +<?php | |
2 | +namespace common\models; | |
3 | + | |
4 | +use Yii; | |
5 | +use yii\base\Model; | |
6 | + | |
7 | +/** | |
8 | + * Login form | |
9 | + */ | |
10 | +class LoginForm extends Model | |
11 | +{ | |
12 | + public $username; | |
13 | + public $password; | |
14 | + public $rememberMe = true; | |
15 | + | |
16 | + private $_user; | |
17 | + | |
18 | + | |
19 | + /** | |
20 | + * @inheritdoc | |
21 | + */ | |
22 | + public function rules() | |
23 | + { | |
24 | + return [ | |
25 | + // username and password are both required | |
26 | + [['username', 'password'], 'required'], | |
27 | + // rememberMe must be a boolean value | |
28 | + ['rememberMe', 'boolean'], | |
29 | + // password is validated by validatePassword() | |
30 | + ['password', 'validatePassword'], | |
31 | + ]; | |
32 | + } | |
33 | + | |
34 | + /** | |
35 | + * Validates the password. | |
36 | + * This method serves as the inline validation for password. | |
37 | + * | |
38 | + * @param string $attribute the attribute currently being validated | |
39 | + * @param array $params the additional name-value pairs given in the rule | |
40 | + */ | |
41 | + public function validatePassword($attribute, $params) | |
42 | + { | |
43 | + if (!$this->hasErrors()) { | |
44 | + $user = $this->getUser(); | |
45 | + if (!$user || !$user->validatePassword($this->password)) { | |
46 | + $this->addError($attribute, 'Incorrect username or password.'); | |
47 | + } | |
48 | + } | |
49 | + } | |
50 | + | |
51 | + /** | |
52 | + * Logs in a user using the provided username and password. | |
53 | + * | |
54 | + * @return bool whether the user is logged in successfully | |
55 | + */ | |
56 | + public function login() | |
57 | + { | |
58 | + if ($this->validate()) { | |
59 | + return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600 * 24 * 30 : 0); | |
60 | + } else { | |
61 | + return false; | |
62 | + } | |
63 | + } | |
64 | + | |
65 | + /** | |
66 | + * Finds user by [[username]] | |
67 | + * | |
68 | + * @return User|null | |
69 | + */ | |
70 | + protected function getUser() | |
71 | + { | |
72 | + if ($this->_user === null) { | |
73 | + $this->_user = User::findByUsername($this->username); | |
74 | + } | |
75 | + | |
76 | + return $this->_user; | |
77 | + } | |
78 | +} | ... | ... |
1 | +<?php | |
2 | +namespace common\models; | |
3 | + | |
4 | +use Yii; | |
5 | +use yii\base\NotSupportedException; | |
6 | +use yii\behaviors\TimestampBehavior; | |
7 | +use yii\db\ActiveRecord; | |
8 | +use yii\web\IdentityInterface; | |
9 | + | |
10 | +/** | |
11 | + * User model | |
12 | + * | |
13 | + * @property integer $id | |
14 | + * @property string $username | |
15 | + * @property string $password_hash | |
16 | + * @property string $password_reset_token | |
17 | + * @property string $email | |
18 | + * @property string $auth_key | |
19 | + * @property integer $status | |
20 | + * @property integer $created_at | |
21 | + * @property integer $updated_at | |
22 | + * @property string $password write-only password | |
23 | + */ | |
24 | +class User extends ActiveRecord implements IdentityInterface | |
25 | +{ | |
26 | + const STATUS_DELETED = 0; | |
27 | + const STATUS_ACTIVE = 10; | |
28 | + | |
29 | + | |
30 | + /** | |
31 | + * @inheritdoc | |
32 | + */ | |
33 | + public static function tableName() | |
34 | + { | |
35 | + return '{{%user}}'; | |
36 | + } | |
37 | + | |
38 | + /** | |
39 | + * @inheritdoc | |
40 | + */ | |
41 | + public function behaviors() | |
42 | + { | |
43 | + return [ | |
44 | + TimestampBehavior::className(), | |
45 | + ]; | |
46 | + } | |
47 | + | |
48 | + /** | |
49 | + * @inheritdoc | |
50 | + */ | |
51 | + public function rules() | |
52 | + { | |
53 | + return [ | |
54 | + ['status', 'default', 'value' => self::STATUS_ACTIVE], | |
55 | + ['status', 'in', 'range' => [self::STATUS_ACTIVE, self::STATUS_DELETED]], | |
56 | + ]; | |
57 | + } | |
58 | + | |
59 | + /** | |
60 | + * @inheritdoc | |
61 | + */ | |
62 | + public static function findIdentity($id) | |
63 | + { | |
64 | + return static::findOne(['id' => $id, 'status' => self::STATUS_ACTIVE]); | |
65 | + } | |
66 | + | |
67 | + /** | |
68 | + * @inheritdoc | |
69 | + */ | |
70 | + public static function findIdentityByAccessToken($token, $type = null) | |
71 | + { | |
72 | + throw new NotSupportedException('"findIdentityByAccessToken" is not implemented.'); | |
73 | + } | |
74 | + | |
75 | + /** | |
76 | + * Finds user by username | |
77 | + * | |
78 | + * @param string $username | |
79 | + * @return static|null | |
80 | + */ | |
81 | + public static function findByUsername($username) | |
82 | + { | |
83 | + return static::findOne(['username' => $username, 'status' => self::STATUS_ACTIVE]); | |
84 | + } | |
85 | + | |
86 | + /** | |
87 | + * Finds user by password reset token | |
88 | + * | |
89 | + * @param string $token password reset token | |
90 | + * @return static|null | |
91 | + */ | |
92 | + public static function findByPasswordResetToken($token) | |
93 | + { | |
94 | + if (!static::isPasswordResetTokenValid($token)) { | |
95 | + return null; | |
96 | + } | |
97 | + | |
98 | + return static::findOne([ | |
99 | + 'password_reset_token' => $token, | |
100 | + 'status' => self::STATUS_ACTIVE, | |
101 | + ]); | |
102 | + } | |
103 | + | |
104 | + /** | |
105 | + * Finds out if password reset token is valid | |
106 | + * | |
107 | + * @param string $token password reset token | |
108 | + * @return bool | |
109 | + */ | |
110 | + public static function isPasswordResetTokenValid($token) | |
111 | + { | |
112 | + if (empty($token)) { | |
113 | + return false; | |
114 | + } | |
115 | + | |
116 | + $timestamp = (int) substr($token, strrpos($token, '_') + 1); | |
117 | + $expire = Yii::$app->params['user.passwordResetTokenExpire']; | |
118 | + return $timestamp + $expire >= time(); | |
119 | + } | |
120 | + | |
121 | + /** | |
122 | + * @inheritdoc | |
123 | + */ | |
124 | + public function getId() | |
125 | + { | |
126 | + return $this->getPrimaryKey(); | |
127 | + } | |
128 | + | |
129 | + /** | |
130 | + * @inheritdoc | |
131 | + */ | |
132 | + public function getAuthKey() | |
133 | + { | |
134 | + return $this->auth_key; | |
135 | + } | |
136 | + | |
137 | + /** | |
138 | + * @inheritdoc | |
139 | + */ | |
140 | + public function validateAuthKey($authKey) | |
141 | + { | |
142 | + return $this->getAuthKey() === $authKey; | |
143 | + } | |
144 | + | |
145 | + /** | |
146 | + * Validates password | |
147 | + * | |
148 | + * @param string $password password to validate | |
149 | + * @return bool if password provided is valid for current user | |
150 | + */ | |
151 | + public function validatePassword($password) | |
152 | + { | |
153 | + return Yii::$app->security->validatePassword($password, $this->password_hash); | |
154 | + } | |
155 | + | |
156 | + /** | |
157 | + * Generates password hash from password and sets it to the model | |
158 | + * | |
159 | + * @param string $password | |
160 | + */ | |
161 | + public function setPassword($password) | |
162 | + { | |
163 | + $this->password_hash = Yii::$app->security->generatePasswordHash($password); | |
164 | + } | |
165 | + | |
166 | + /** | |
167 | + * Generates "remember me" authentication key | |
168 | + */ | |
169 | + public function generateAuthKey() | |
170 | + { | |
171 | + $this->auth_key = Yii::$app->security->generateRandomString(); | |
172 | + } | |
173 | + | |
174 | + /** | |
175 | + * Generates new password reset token | |
176 | + */ | |
177 | + public function generatePasswordResetToken() | |
178 | + { | |
179 | + $this->password_reset_token = Yii::$app->security->generateRandomString() . '_' . time(); | |
180 | + } | |
181 | + | |
182 | + /** | |
183 | + * Removes password reset token | |
184 | + */ | |
185 | + public function removePasswordResetToken() | |
186 | + { | |
187 | + $this->password_reset_token = null; | |
188 | + } | |
189 | +} | ... | ... |
1 | +<?php | |
2 | +defined('YII_DEBUG') or define('YII_DEBUG', true); | |
3 | +defined('YII_ENV') or define('YII_ENV', 'test'); | |
4 | +defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', __DIR__.'/../../'); | |
5 | + | |
6 | +require_once(__DIR__ . '/../../vendor/autoload.php'); | |
7 | +require_once(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'); | |
8 | +require(__DIR__ . '/../config/bootstrap.php'); | |
9 | + | ... | ... |
1 | +<?php | |
2 | + | |
3 | +return [ | |
4 | + [ | |
5 | + 'username' => 'bayer.hudson', | |
6 | + 'auth_key' => 'HP187Mvq7Mmm3CTU80dLkGmni_FUH_lR', | |
7 | + //password_0 | |
8 | + 'password_hash' => '$2y$13$EjaPFBnZOQsHdGuHI.xvhuDp1fHpo8hKRSk6yshqa9c5EG8s3C3lO', | |
9 | + 'password_reset_token' => 'ExzkCOaYc1L8IOBs4wdTGGbgNiG3Wz1I_1402312317', | |
10 | + 'created_at' => '1402312317', | |
11 | + 'updated_at' => '1402312317', | |
12 | + 'email' => 'nicole.paucek@schultz.info', | |
13 | + ], | |
14 | +]; | ... | ... |
1 | +_generated | ... | ... |
1 | +<?php | |
2 | +namespace common\tests; | |
3 | + | |
4 | +/** | |
5 | + * Inherited Methods | |
6 | + * @method void wantToTest($text) | |
7 | + * @method void wantTo($text) | |
8 | + * @method void execute($callable) | |
9 | + * @method void expectTo($prediction) | |
10 | + * @method void expect($prediction) | |
11 | + * @method void amGoingTo($argumentation) | |
12 | + * @method void am($role) | |
13 | + * @method void lookForwardTo($achieveValue) | |
14 | + * @method void comment($description) | |
15 | + * @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL) | |
16 | + * | |
17 | + * @SuppressWarnings(PHPMD) | |
18 | + */ | |
19 | +class UnitTester extends \Codeception\Actor | |
20 | +{ | |
21 | + use _generated\UnitTesterActions; | |
22 | + /** | |
23 | + * Define custom actions here | |
24 | + */ | |
25 | +} | ... | ... |
1 | +<?php | |
2 | + | |
3 | +namespace common\tests\unit\models; | |
4 | + | |
5 | +use Yii; | |
6 | +use common\models\LoginForm; | |
7 | +use common\fixtures\User as UserFixture; | |
8 | + | |
9 | +/** | |
10 | + * Login form test | |
11 | + */ | |
12 | +class LoginFormTest extends \Codeception\Test\Unit | |
13 | +{ | |
14 | + /** | |
15 | + * @var \common\tests\UnitTester | |
16 | + */ | |
17 | + protected $tester; | |
18 | + | |
19 | + | |
20 | + public function _before() | |
21 | + { | |
22 | + $this->tester->haveFixtures([ | |
23 | + 'user' => [ | |
24 | + 'class' => UserFixture::className(), | |
25 | + 'dataFile' => codecept_data_dir() . 'user.php' | |
26 | + ] | |
27 | + ]); | |
28 | + } | |
29 | + | |
30 | + public function testLoginNoUser() | |
31 | + { | |
32 | + $model = new LoginForm([ | |
33 | + 'username' => 'not_existing_username', | |
34 | + 'password' => 'not_existing_password', | |
35 | + ]); | |
36 | + | |
37 | + expect('model should not login user', $model->login())->false(); | |
38 | + expect('user should not be logged in', Yii::$app->user->isGuest)->true(); | |
39 | + } | |
40 | + | |
41 | + public function testLoginWrongPassword() | |
42 | + { | |
43 | + $model = new LoginForm([ | |
44 | + 'username' => 'bayer.hudson', | |
45 | + 'password' => 'wrong_password', | |
46 | + ]); | |
47 | + | |
48 | + expect('model should not login user', $model->login())->false(); | |
49 | + expect('error message should be set', $model->errors)->hasKey('password'); | |
50 | + expect('user should not be logged in', Yii::$app->user->isGuest)->true(); | |
51 | + } | |
52 | + | |
53 | + public function testLoginCorrect() | |
54 | + { | |
55 | + $model = new LoginForm([ | |
56 | + 'username' => 'bayer.hudson', | |
57 | + 'password' => 'password_0', | |
58 | + ]); | |
59 | + | |
60 | + expect('model should login user', $model->login())->true(); | |
61 | + expect('error message should not be set', $model->errors)->hasntKey('password'); | |
62 | + expect('user should be logged in', Yii::$app->user->isGuest)->false(); | |
63 | + } | |
64 | +} | ... | ... |
1 | +<?php | |
2 | +namespace common\widgets; | |
3 | + | |
4 | +use Yii; | |
5 | + | |
6 | +/** | |
7 | + * Alert widget renders a message from session flash. All flash messages are displayed | |
8 | + * in the sequence they were assigned using setFlash. You can set message as following: | |
9 | + * | |
10 | + * ```php | |
11 | + * Yii::$app->session->setFlash('error', 'This is the message'); | |
12 | + * Yii::$app->session->setFlash('success', 'This is the message'); | |
13 | + * Yii::$app->session->setFlash('info', 'This is the message'); | |
14 | + * ``` | |
15 | + * | |
16 | + * Multiple messages could be set as follows: | |
17 | + * | |
18 | + * ```php | |
19 | + * Yii::$app->session->setFlash('error', ['Error 1', 'Error 2']); | |
20 | + * ``` | |
21 | + * | |
22 | + * @author Kartik Visweswaran <kartikv2@gmail.com> | |
23 | + * @author Alexander Makarov <sam@rmcreative.ru> | |
24 | + */ | |
25 | +class Alert extends \yii\bootstrap\Widget | |
26 | +{ | |
27 | + /** | |
28 | + * @var array the alert types configuration for the flash messages. | |
29 | + * This array is setup as $key => $value, where: | |
30 | + * - $key is the name of the session flash variable | |
31 | + * - $value is the bootstrap alert type (i.e. danger, success, info, warning) | |
32 | + */ | |
33 | + public $alertTypes = [ | |
34 | + 'error' => 'alert-danger', | |
35 | + 'danger' => 'alert-danger', | |
36 | + 'success' => 'alert-success', | |
37 | + 'info' => 'alert-info', | |
38 | + 'warning' => 'alert-warning' | |
39 | + ]; | |
40 | + /** | |
41 | + * @var array the options for rendering the close button tag. | |
42 | + */ | |
43 | + public $closeButton = []; | |
44 | + | |
45 | + | |
46 | + public function init() | |
47 | + { | |
48 | + parent::init(); | |
49 | + | |
50 | + $session = Yii::$app->session; | |
51 | + $flashes = $session->getAllFlashes(); | |
52 | + $appendCss = isset($this->options['class']) ? ' ' . $this->options['class'] : ''; | |
53 | + | |
54 | + foreach ($flashes as $type => $data) { | |
55 | + if (isset($this->alertTypes[$type])) { | |
56 | + $data = (array) $data; | |
57 | + foreach ($data as $i => $message) { | |
58 | + /* initialize css class for each alert box */ | |
59 | + $this->options['class'] = $this->alertTypes[$type] . $appendCss; | |
60 | + | |
61 | + /* assign unique id to each alert box */ | |
62 | + $this->options['id'] = $this->getId() . '-' . $type . '-' . $i; | |
63 | + | |
64 | + echo \yii\bootstrap\Alert::widget([ | |
65 | + 'body' => $message, | |
66 | + 'closeButton' => $this->closeButton, | |
67 | + 'options' => $this->options, | |
68 | + ]); | |
69 | + } | |
70 | + | |
71 | + $session->removeFlash($type); | |
72 | + } | |
73 | + } | |
74 | + } | |
75 | +} | ... | ... |
1 | +{ | |
2 | + "_readme": [ | |
3 | + "This file locks the dependencies of your project to a known state", | |
4 | + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", | |
5 | + "This file is @generated automatically" | |
6 | + ], | |
7 | + "hash": "c527bda5256bae6983f74a06a44681c5", | |
8 | + "content-hash": "daadc2e7120bd89e994ac133ca2c3a24", | |
9 | + "packages": [ | |
10 | + { | |
11 | + "name": "bower-asset/bootstrap", | |
12 | + "version": "v3.3.7", | |
13 | + "source": { | |
14 | + "type": "git", | |
15 | + "url": "https://github.com/twbs/bootstrap.git", | |
16 | + "reference": "0b9c4a4007c44201dce9a6cc1a38407005c26c86" | |
17 | + }, | |
18 | + "dist": { | |
19 | + "type": "zip", | |
20 | + "url": "https://api.github.com/repos/twbs/bootstrap/zipball/0b9c4a4007c44201dce9a6cc1a38407005c26c86", | |
21 | + "reference": "0b9c4a4007c44201dce9a6cc1a38407005c26c86", | |
22 | + "shasum": "" | |
23 | + }, | |
24 | + "require": { | |
25 | + "bower-asset/jquery": ">=1.9.1,<=3" | |
26 | + }, | |
27 | + "type": "bower-asset-library", | |
28 | + "extra": { | |
29 | + "bower-asset-main": [ | |
30 | + "less/bootstrap.less", | |
31 | + "dist/js/bootstrap.js" | |
32 | + ], | |
33 | + "bower-asset-ignore": [ | |
34 | + "/.*", | |
35 | + "_config.yml", | |
36 | + "CNAME", | |
37 | + "composer.json", | |
38 | + "CONTRIBUTING.md", | |
39 | + "docs", | |
40 | + "js/tests", | |
41 | + "test-infra" | |
42 | + ] | |
43 | + }, | |
44 | + "license": [ | |
45 | + "MIT" | |
46 | + ], | |
47 | + "description": "The most popular front-end framework for developing responsive, mobile first projects on the web.", | |
48 | + "keywords": [ | |
49 | + "css", | |
50 | + "framework", | |
51 | + "front-end", | |
52 | + "js", | |
53 | + "less", | |
54 | + "mobile-first", | |
55 | + "responsive", | |
56 | + "web" | |
57 | + ] | |
58 | + }, | |
59 | + { | |
60 | + "name": "bower-asset/jquery", | |
61 | + "version": "2.2.4", | |
62 | + "source": { | |
63 | + "type": "git", | |
64 | + "url": "https://github.com/jquery/jquery-dist.git", | |
65 | + "reference": "c0185ab7c75aab88762c5aae780b9d83b80eda72" | |
66 | + }, | |
67 | + "dist": { | |
68 | + "type": "zip", | |
69 | + "url": "https://api.github.com/repos/jquery/jquery-dist/zipball/c0185ab7c75aab88762c5aae780b9d83b80eda72", | |
70 | + "reference": "c0185ab7c75aab88762c5aae780b9d83b80eda72", | |
71 | + "shasum": "" | |
72 | + }, | |
73 | + "type": "bower-asset-library", | |
74 | + "extra": { | |
75 | + "bower-asset-main": "dist/jquery.js", | |
76 | + "bower-asset-ignore": [ | |
77 | + "package.json" | |
78 | + ] | |
79 | + }, | |
80 | + "license": [ | |
81 | + "MIT" | |
82 | + ], | |
83 | + "keywords": [ | |
84 | + "browser", | |
85 | + "javascript", | |
86 | + "jquery", | |
87 | + "library" | |
88 | + ] | |
89 | + }, | |
90 | + { | |
91 | + "name": "bower-asset/jquery.inputmask", | |
92 | + "version": "3.3.4", | |
93 | + "source": { | |
94 | + "type": "git", | |
95 | + "url": "https://github.com/RobinHerbots/Inputmask.git", | |
96 | + "reference": "8a882bc471ba4077c4f8ecbe3d9d61c7558f3ef2" | |
97 | + }, | |
98 | + "dist": { | |
99 | + "type": "zip", | |
100 | + "url": "https://api.github.com/repos/RobinHerbots/Inputmask/zipball/8a882bc471ba4077c4f8ecbe3d9d61c7558f3ef2", | |
101 | + "reference": "8a882bc471ba4077c4f8ecbe3d9d61c7558f3ef2", | |
102 | + "shasum": "" | |
103 | + }, | |
104 | + "require": { | |
105 | + "bower-asset/jquery": ">=1.7" | |
106 | + }, | |
107 | + "type": "bower-asset-library", | |
108 | + "extra": { | |
109 | + "bower-asset-main": [ | |
110 | + "./dist/inputmask/inputmask.dependencyLib", | |
111 | + "./dist/inputmask/inputmask", | |
112 | + "./dist/inputmask/inputmask.extensions", | |
113 | + "./dist/inputmask/inputmask.date.extensions", | |
114 | + "./dist/inputmask/inputmask.numeric.extensions", | |
115 | + "./dist/inputmask/inputmask.phone.extensions", | |
116 | + "./dist/inputmask/inputmask.regex.extensions", | |
117 | + "./dist/inputmask/jquery.inputmask" | |
118 | + ], | |
119 | + "bower-asset-ignore": [ | |
120 | + "**/*", | |
121 | + "!dist/*", | |
122 | + "!dist/inputmask/*", | |
123 | + "!dist/min/*", | |
124 | + "!dist/min/inputmask/*", | |
125 | + "!extra/bindings/*", | |
126 | + "!extra/dependencyLibs/*", | |
127 | + "!extra/phone-codes/*" | |
128 | + ] | |
129 | + }, | |
130 | + "license": [ | |
131 | + "http://opensource.org/licenses/mit-license.php" | |
132 | + ], | |
133 | + "description": "jquery.inputmask is a jquery plugin which create an input mask.", | |
134 | + "keywords": [ | |
135 | + "form", | |
136 | + "input", | |
137 | + "inputmask", | |
138 | + "jquery", | |
139 | + "mask", | |
140 | + "plugins" | |
141 | + ] | |
142 | + }, | |
143 | + { | |
144 | + "name": "bower-asset/punycode", | |
145 | + "version": "v1.3.2", | |
146 | + "source": { | |
147 | + "type": "git", | |
148 | + "url": "https://github.com/bestiejs/punycode.js.git", | |
149 | + "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3" | |
150 | + }, | |
151 | + "dist": { | |
152 | + "type": "zip", | |
153 | + "url": "https://api.github.com/repos/bestiejs/punycode.js/zipball/38c8d3131a82567bfef18da09f7f4db68c84f8a3", | |
154 | + "reference": "38c8d3131a82567bfef18da09f7f4db68c84f8a3", | |
155 | + "shasum": "" | |
156 | + }, | |
157 | + "type": "bower-asset-library", | |
158 | + "extra": { | |
159 | + "bower-asset-main": "punycode.js", | |
160 | + "bower-asset-ignore": [ | |
161 | + "coverage", | |
162 | + "tests", | |
163 | + ".*", | |
164 | + "component.json", | |
165 | + "Gruntfile.js", | |
166 | + "node_modules", | |
167 | + "package.json" | |
168 | + ] | |
169 | + } | |
170 | + }, | |
171 | + { | |
172 | + "name": "bower-asset/yii2-pjax", | |
173 | + "version": "v2.0.6", | |
174 | + "source": { | |
175 | + "type": "git", | |
176 | + "url": "https://github.com/yiisoft/jquery-pjax.git", | |
177 | + "reference": "60728da6ade5879e807a49ce59ef9a72039b8978" | |
178 | + }, | |
179 | + "dist": { | |
180 | + "type": "zip", | |
181 | + "url": "https://api.github.com/repos/yiisoft/jquery-pjax/zipball/60728da6ade5879e807a49ce59ef9a72039b8978", | |
182 | + "reference": "60728da6ade5879e807a49ce59ef9a72039b8978", | |
183 | + "shasum": "" | |
184 | + }, | |
185 | + "require": { | |
186 | + "bower-asset/jquery": ">=1.8" | |
187 | + }, | |
188 | + "type": "bower-asset-library", | |
189 | + "extra": { | |
190 | + "bower-asset-main": "./jquery.pjax.js", | |
191 | + "bower-asset-ignore": [ | |
192 | + ".travis.yml", | |
193 | + "Gemfile", | |
194 | + "Gemfile.lock", | |
195 | + "CONTRIBUTING.md", | |
196 | + "vendor/", | |
197 | + "script/", | |
198 | + "test/" | |
199 | + ] | |
200 | + }, | |
201 | + "license": [ | |
202 | + "MIT" | |
203 | + ] | |
204 | + }, | |
205 | + { | |
206 | + "name": "cebe/markdown", | |
207 | + "version": "1.1.1", | |
208 | + "source": { | |
209 | + "type": "git", | |
210 | + "url": "https://github.com/cebe/markdown.git", | |
211 | + "reference": "c30eb5e01fe021cc5bba2f9ee0eeef96d4931166" | |
212 | + }, | |
213 | + "dist": { | |
214 | + "type": "zip", | |
215 | + "url": "https://api.github.com/repos/cebe/markdown/zipball/c30eb5e01fe021cc5bba2f9ee0eeef96d4931166", | |
216 | + "reference": "c30eb5e01fe021cc5bba2f9ee0eeef96d4931166", | |
217 | + "shasum": "" | |
218 | + }, | |
219 | + "require": { | |
220 | + "lib-pcre": "*", | |
221 | + "php": ">=5.4.0" | |
222 | + }, | |
223 | + "require-dev": { | |
224 | + "cebe/indent": "*", | |
225 | + "facebook/xhprof": "*@dev", | |
226 | + "phpunit/phpunit": "4.1.*" | |
227 | + }, | |
228 | + "bin": [ | |
229 | + "bin/markdown" | |
230 | + ], | |
231 | + "type": "library", | |
232 | + "extra": { | |
233 | + "branch-alias": { | |
234 | + "dev-master": "1.1.x-dev" | |
235 | + } | |
236 | + }, | |
237 | + "autoload": { | |
238 | + "psr-4": { | |
239 | + "cebe\\markdown\\": "" | |
240 | + } | |
241 | + }, | |
242 | + "notification-url": "https://packagist.org/downloads/", | |
243 | + "license": [ | |
244 | + "MIT" | |
245 | + ], | |
246 | + "authors": [ | |
247 | + { | |
248 | + "name": "Carsten Brandt", | |
249 | + "email": "mail@cebe.cc", | |
250 | + "homepage": "http://cebe.cc/", | |
251 | + "role": "Creator" | |
252 | + } | |
253 | + ], | |
254 | + "description": "A super fast, highly extensible markdown parser for PHP", | |
255 | + "homepage": "https://github.com/cebe/markdown#readme", | |
256 | + "keywords": [ | |
257 | + "extensible", | |
258 | + "fast", | |
259 | + "gfm", | |
260 | + "markdown", | |
261 | + "markdown-extra" | |
262 | + ], | |
263 | + "time": "2016-09-14 20:40:20" | |
264 | + }, | |
265 | + { | |
266 | + "name": "ezyang/htmlpurifier", | |
267 | + "version": "v4.8.0", | |
268 | + "source": { | |
269 | + "type": "git", | |
270 | + "url": "https://github.com/ezyang/htmlpurifier.git", | |
271 | + "reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2" | |
272 | + }, | |
273 | + "dist": { | |
274 | + "type": "zip", | |
275 | + "url": "https://api.github.com/repos/ezyang/htmlpurifier/zipball/d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2", | |
276 | + "reference": "d0c392f77d2f2a3dcf7fcb79e2a1e2b8804e75b2", | |
277 | + "shasum": "" | |
278 | + }, | |
279 | + "require": { | |
280 | + "php": ">=5.2" | |
281 | + }, | |
282 | + "type": "library", | |
283 | + "autoload": { | |
284 | + "psr-0": { | |
285 | + "HTMLPurifier": "library/" | |
286 | + }, | |
287 | + "files": [ | |
288 | + "library/HTMLPurifier.composer.php" | |
289 | + ] | |
290 | + }, | |
291 | + "notification-url": "https://packagist.org/downloads/", | |
292 | + "license": [ | |
293 | + "LGPL" | |
294 | + ], | |
295 | + "authors": [ | |
296 | + { | |
297 | + "name": "Edward Z. Yang", | |
298 | + "email": "admin@htmlpurifier.org", | |
299 | + "homepage": "http://ezyang.com" | |
300 | + } | |
301 | + ], | |
302 | + "description": "Standards compliant HTML filter written in PHP", | |
303 | + "homepage": "http://htmlpurifier.org/", | |
304 | + "keywords": [ | |
305 | + "html" | |
306 | + ], | |
307 | + "time": "2016-07-16 12:58:58" | |
308 | + }, | |
309 | + { | |
310 | + "name": "insolita/yii2-migration-generator", | |
311 | + "version": "2.2.9", | |
312 | + "source": { | |
313 | + "type": "git", | |
314 | + "url": "https://github.com/Insolita/yii2-migrik.git", | |
315 | + "reference": "b1d5dfaa8cd7edd1407ef057d62bd4f0efd91d43" | |
316 | + }, | |
317 | + "dist": { | |
318 | + "type": "zip", | |
319 | + "url": "https://api.github.com/repos/Insolita/yii2-migrik/zipball/b1d5dfaa8cd7edd1407ef057d62bd4f0efd91d43", | |
320 | + "reference": "b1d5dfaa8cd7edd1407ef057d62bd4f0efd91d43", | |
321 | + "shasum": "" | |
322 | + }, | |
323 | + "require": { | |
324 | + "yiisoft/yii2": "*" | |
325 | + }, | |
326 | + "require-dev": { | |
327 | + "yiisoft/yii2-gii": "*" | |
328 | + }, | |
329 | + "type": "yii2-extension", | |
330 | + "extra": { | |
331 | + "bootstrap": "insolita\\migrik\\Bootstrap" | |
332 | + }, | |
333 | + "autoload": { | |
334 | + "psr-4": { | |
335 | + "insolita\\migrik\\": "" | |
336 | + } | |
337 | + }, | |
338 | + "notification-url": "https://packagist.org/downloads/", | |
339 | + "license": [ | |
340 | + "MIT" | |
341 | + ], | |
342 | + "authors": [ | |
343 | + { | |
344 | + "name": "insolita", | |
345 | + "email": "donnainsolita@gmail.com" | |
346 | + } | |
347 | + ], | |
348 | + "description": "Set of gii tools for generating files for migration by schema of table , phpdoc or table data", | |
349 | + "keywords": [ | |
350 | + "extension", | |
351 | + "yii2" | |
352 | + ], | |
353 | + "time": "2017-02-03 01:23:24" | |
354 | + }, | |
355 | + { | |
356 | + "name": "swiftmailer/swiftmailer", | |
357 | + "version": "v5.4.6", | |
358 | + "source": { | |
359 | + "type": "git", | |
360 | + "url": "https://github.com/swiftmailer/swiftmailer.git", | |
361 | + "reference": "81fdccfaf8bdc5d5d7a1ef6bb3a61bbb1a6c4a3e" | |
362 | + }, | |
363 | + "dist": { | |
364 | + "type": "zip", | |
365 | + "url": "https://api.github.com/repos/swiftmailer/swiftmailer/zipball/81fdccfaf8bdc5d5d7a1ef6bb3a61bbb1a6c4a3e", | |
366 | + "reference": "81fdccfaf8bdc5d5d7a1ef6bb3a61bbb1a6c4a3e", | |
367 | + "shasum": "" | |
368 | + }, | |
369 | + "require": { | |
370 | + "php": ">=5.3.3" | |
371 | + }, | |
372 | + "require-dev": { | |
373 | + "mockery/mockery": "~0.9.1", | |
374 | + "symfony/phpunit-bridge": "~3.2" | |
375 | + }, | |
376 | + "type": "library", | |
377 | + "extra": { | |
378 | + "branch-alias": { | |
379 | + "dev-master": "5.4-dev" | |
380 | + } | |
381 | + }, | |
382 | + "autoload": { | |
383 | + "files": [ | |
384 | + "lib/swift_required.php" | |
385 | + ] | |
386 | + }, | |
387 | + "notification-url": "https://packagist.org/downloads/", | |
388 | + "license": [ | |
389 | + "MIT" | |
390 | + ], | |
391 | + "authors": [ | |
392 | + { | |
393 | + "name": "Chris Corbyn" | |
394 | + }, | |
395 | + { | |
396 | + "name": "Fabien Potencier", | |
397 | + "email": "fabien@symfony.com" | |
398 | + } | |
399 | + ], | |
400 | + "description": "Swiftmailer, free feature-rich PHP mailer", | |
401 | + "homepage": "http://swiftmailer.org", | |
402 | + "keywords": [ | |
403 | + "email", | |
404 | + "mail", | |
405 | + "mailer" | |
406 | + ], | |
407 | + "time": "2017-02-13 07:52:53" | |
408 | + }, | |
409 | + { | |
410 | + "name": "yiisoft/yii2", | |
411 | + "version": "2.0.11.2", | |
412 | + "source": { | |
413 | + "type": "git", | |
414 | + "url": "https://github.com/yiisoft/yii2-framework.git", | |
415 | + "reference": "ee996adec1dfd7babb67bd0c604f5bd6425fe5ab" | |
416 | + }, | |
417 | + "dist": { | |
418 | + "type": "zip", | |
419 | + "url": "https://api.github.com/repos/yiisoft/yii2-framework/zipball/ee996adec1dfd7babb67bd0c604f5bd6425fe5ab", | |
420 | + "reference": "ee996adec1dfd7babb67bd0c604f5bd6425fe5ab", | |
421 | + "shasum": "" | |
422 | + }, | |
423 | + "require": { | |
424 | + "bower-asset/jquery": "2.2.*@stable | 2.1.*@stable | 1.11.*@stable | 1.12.*@stable", | |
425 | + "bower-asset/jquery.inputmask": "~3.2.2 | ~3.3.3", | |
426 | + "bower-asset/punycode": "1.3.*", | |
427 | + "bower-asset/yii2-pjax": "~2.0.1", | |
428 | + "cebe/markdown": "~1.0.0 | ~1.1.0", | |
429 | + "ext-ctype": "*", | |
430 | + "ext-mbstring": "*", | |
431 | + "ezyang/htmlpurifier": "~4.6", | |
432 | + "lib-pcre": "*", | |
433 | + "php": ">=5.4.0", | |
434 | + "yiisoft/yii2-composer": "~2.0.4" | |
435 | + }, | |
436 | + "bin": [ | |
437 | + "yii" | |
438 | + ], | |
439 | + "type": "library", | |
440 | + "extra": { | |
441 | + "branch-alias": { | |
442 | + "dev-master": "2.0.x-dev" | |
443 | + } | |
444 | + }, | |
445 | + "autoload": { | |
446 | + "psr-4": { | |
447 | + "yii\\": "" | |
448 | + } | |
449 | + }, | |
450 | + "notification-url": "https://packagist.org/downloads/", | |
451 | + "license": [ | |
452 | + "BSD-3-Clause" | |
453 | + ], | |
454 | + "authors": [ | |
455 | + { | |
456 | + "name": "Qiang Xue", | |
457 | + "email": "qiang.xue@gmail.com", | |
458 | + "homepage": "http://www.yiiframework.com/", | |
459 | + "role": "Founder and project lead" | |
460 | + }, | |
461 | + { | |
462 | + "name": "Alexander Makarov", | |
463 | + "email": "sam@rmcreative.ru", | |
464 | + "homepage": "http://rmcreative.ru/", | |
465 | + "role": "Core framework development" | |
466 | + }, | |
467 | + { | |
468 | + "name": "Maurizio Domba", | |
469 | + "homepage": "http://mdomba.info/", | |
470 | + "role": "Core framework development" | |
471 | + }, | |
472 | + { | |
473 | + "name": "Carsten Brandt", | |
474 | + "email": "mail@cebe.cc", | |
475 | + "homepage": "http://cebe.cc/", | |
476 | + "role": "Core framework development" | |
477 | + }, | |
478 | + { | |
479 | + "name": "Timur Ruziev", | |
480 | + "email": "resurtm@gmail.com", | |
481 | + "homepage": "http://resurtm.com/", | |
482 | + "role": "Core framework development" | |
483 | + }, | |
484 | + { | |
485 | + "name": "Paul Klimov", | |
486 | + "email": "klimov.paul@gmail.com", | |
487 | + "role": "Core framework development" | |
488 | + }, | |
489 | + { | |
490 | + "name": "Dmitry Naumenko", | |
491 | + "email": "d.naumenko.a@gmail.com", | |
492 | + "role": "Core framework development" | |
493 | + }, | |
494 | + { | |
495 | + "name": "Boudewijn Vahrmeijer", | |
496 | + "email": "info@dynasource.eu", | |
497 | + "homepage": "http://dynasource.eu", | |
498 | + "role": "Core framework development" | |
499 | + } | |
500 | + ], | |
501 | + "description": "Yii PHP Framework Version 2", | |
502 | + "homepage": "http://www.yiiframework.com/", | |
503 | + "keywords": [ | |
504 | + "framework", | |
505 | + "yii2" | |
506 | + ], | |
507 | + "time": "2017-02-08 09:04:32" | |
508 | + }, | |
509 | + { | |
510 | + "name": "yiisoft/yii2-bootstrap", | |
511 | + "version": "2.0.6", | |
512 | + "source": { | |
513 | + "type": "git", | |
514 | + "url": "https://github.com/yiisoft/yii2-bootstrap.git", | |
515 | + "reference": "3fd2b8c950cce79d60e9702d6bcb24eb3c80f6c5" | |
516 | + }, | |
517 | + "dist": { | |
518 | + "type": "zip", | |
519 | + "url": "https://api.github.com/repos/yiisoft/yii2-bootstrap/zipball/3fd2b8c950cce79d60e9702d6bcb24eb3c80f6c5", | |
520 | + "reference": "3fd2b8c950cce79d60e9702d6bcb24eb3c80f6c5", | |
521 | + "shasum": "" | |
522 | + }, | |
523 | + "require": { | |
524 | + "bower-asset/bootstrap": "3.3.* | 3.2.* | 3.1.*", | |
525 | + "yiisoft/yii2": ">=2.0.6" | |
526 | + }, | |
527 | + "type": "yii2-extension", | |
528 | + "extra": { | |
529 | + "branch-alias": { | |
530 | + "dev-master": "2.0.x-dev" | |
531 | + }, | |
532 | + "asset-installer-paths": { | |
533 | + "npm-asset-library": "vendor/npm", | |
534 | + "bower-asset-library": "vendor/bower" | |
535 | + } | |
536 | + }, | |
537 | + "autoload": { | |
538 | + "psr-4": { | |
539 | + "yii\\bootstrap\\": "" | |
540 | + } | |
541 | + }, | |
542 | + "notification-url": "https://packagist.org/downloads/", | |
543 | + "license": [ | |
544 | + "BSD-3-Clause" | |
545 | + ], | |
546 | + "authors": [ | |
547 | + { | |
548 | + "name": "Qiang Xue", | |
549 | + "email": "qiang.xue@gmail.com" | |
550 | + } | |
551 | + ], | |
552 | + "description": "The Twitter Bootstrap extension for the Yii framework", | |
553 | + "keywords": [ | |
554 | + "bootstrap", | |
555 | + "yii2" | |
556 | + ], | |
557 | + "time": "2016-03-17 03:29:28" | |
558 | + }, | |
559 | + { | |
560 | + "name": "yiisoft/yii2-composer", | |
561 | + "version": "2.0.5", | |
562 | + "source": { | |
563 | + "type": "git", | |
564 | + "url": "https://github.com/yiisoft/yii2-composer.git", | |
565 | + "reference": "3f4923c2bde6caf3f5b88cc22fdd5770f52f8df2" | |
566 | + }, | |
567 | + "dist": { | |
568 | + "type": "zip", | |
569 | + "url": "https://api.github.com/repos/yiisoft/yii2-composer/zipball/3f4923c2bde6caf3f5b88cc22fdd5770f52f8df2", | |
570 | + "reference": "3f4923c2bde6caf3f5b88cc22fdd5770f52f8df2", | |
571 | + "shasum": "" | |
572 | + }, | |
573 | + "require": { | |
574 | + "composer-plugin-api": "^1.0" | |
575 | + }, | |
576 | + "require-dev": { | |
577 | + "composer/composer": "^1.0" | |
578 | + }, | |
579 | + "type": "composer-plugin", | |
580 | + "extra": { | |
581 | + "class": "yii\\composer\\Plugin", | |
582 | + "branch-alias": { | |
583 | + "dev-master": "2.0.x-dev" | |
584 | + } | |
585 | + }, | |
586 | + "autoload": { | |
587 | + "psr-4": { | |
588 | + "yii\\composer\\": "" | |
589 | + } | |
590 | + }, | |
591 | + "notification-url": "https://packagist.org/downloads/", | |
592 | + "license": [ | |
593 | + "BSD-3-Clause" | |
594 | + ], | |
595 | + "authors": [ | |
596 | + { | |
597 | + "name": "Qiang Xue", | |
598 | + "email": "qiang.xue@gmail.com" | |
599 | + } | |
600 | + ], | |
601 | + "description": "The composer plugin for Yii extension installer", | |
602 | + "keywords": [ | |
603 | + "composer", | |
604 | + "extension installer", | |
605 | + "yii2" | |
606 | + ], | |
607 | + "time": "2016-12-20 13:26:02" | |
608 | + }, | |
609 | + { | |
610 | + "name": "yiisoft/yii2-swiftmailer", | |
611 | + "version": "2.0.6", | |
612 | + "source": { | |
613 | + "type": "git", | |
614 | + "url": "https://github.com/yiisoft/yii2-swiftmailer.git", | |
615 | + "reference": "26b900767f1031ff3a4668dfa36c10595875f0a5" | |
616 | + }, | |
617 | + "dist": { | |
618 | + "type": "zip", | |
619 | + "url": "https://api.github.com/repos/yiisoft/yii2-swiftmailer/zipball/26b900767f1031ff3a4668dfa36c10595875f0a5", | |
620 | + "reference": "26b900767f1031ff3a4668dfa36c10595875f0a5", | |
621 | + "shasum": "" | |
622 | + }, | |
623 | + "require": { | |
624 | + "swiftmailer/swiftmailer": "~5.0", | |
625 | + "yiisoft/yii2": "~2.0.4" | |
626 | + }, | |
627 | + "type": "yii2-extension", | |
628 | + "extra": { | |
629 | + "branch-alias": { | |
630 | + "dev-master": "2.0.x-dev" | |
631 | + } | |
632 | + }, | |
633 | + "autoload": { | |
634 | + "psr-4": { | |
635 | + "yii\\swiftmailer\\": "" | |
636 | + } | |
637 | + }, | |
638 | + "notification-url": "https://packagist.org/downloads/", | |
639 | + "license": [ | |
640 | + "BSD-3-Clause" | |
641 | + ], | |
642 | + "authors": [ | |
643 | + { | |
644 | + "name": "Paul Klimov", | |
645 | + "email": "klimov.paul@gmail.com" | |
646 | + } | |
647 | + ], | |
648 | + "description": "The SwiftMailer integration for the Yii framework", | |
649 | + "keywords": [ | |
650 | + "email", | |
651 | + "mail", | |
652 | + "mailer", | |
653 | + "swift", | |
654 | + "swiftmailer", | |
655 | + "yii2" | |
656 | + ], | |
657 | + "time": "2016-09-09 11:48:11" | |
658 | + } | |
659 | + ], | |
660 | + "packages-dev": [ | |
661 | + { | |
662 | + "name": "behat/gherkin", | |
663 | + "version": "v4.4.5", | |
664 | + "source": { | |
665 | + "type": "git", | |
666 | + "url": "https://github.com/Behat/Gherkin.git", | |
667 | + "reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74" | |
668 | + }, | |
669 | + "dist": { | |
670 | + "type": "zip", | |
671 | + "url": "https://api.github.com/repos/Behat/Gherkin/zipball/5c14cff4f955b17d20d088dec1bde61c0539ec74", | |
672 | + "reference": "5c14cff4f955b17d20d088dec1bde61c0539ec74", | |
673 | + "shasum": "" | |
674 | + }, | |
675 | + "require": { | |
676 | + "php": ">=5.3.1" | |
677 | + }, | |
678 | + "require-dev": { | |
679 | + "phpunit/phpunit": "~4.5|~5", | |
680 | + "symfony/phpunit-bridge": "~2.7|~3", | |
681 | + "symfony/yaml": "~2.3|~3" | |
682 | + }, | |
683 | + "suggest": { | |
684 | + "symfony/yaml": "If you want to parse features, represented in YAML files" | |
685 | + }, | |
686 | + "type": "library", | |
687 | + "extra": { | |
688 | + "branch-alias": { | |
689 | + "dev-master": "4.4-dev" | |
690 | + } | |
691 | + }, | |
692 | + "autoload": { | |
693 | + "psr-0": { | |
694 | + "Behat\\Gherkin": "src/" | |
695 | + } | |
696 | + }, | |
697 | + "notification-url": "https://packagist.org/downloads/", | |
698 | + "license": [ | |
699 | + "MIT" | |
700 | + ], | |
701 | + "authors": [ | |
702 | + { | |
703 | + "name": "Konstantin Kudryashov", | |
704 | + "email": "ever.zet@gmail.com", | |
705 | + "homepage": "http://everzet.com" | |
706 | + } | |
707 | + ], | |
708 | + "description": "Gherkin DSL parser for PHP 5.3", | |
709 | + "homepage": "http://behat.org/", | |
710 | + "keywords": [ | |
711 | + "BDD", | |
712 | + "Behat", | |
713 | + "Cucumber", | |
714 | + "DSL", | |
715 | + "gherkin", | |
716 | + "parser" | |
717 | + ], | |
718 | + "time": "2016-10-30 11:50:56" | |
719 | + }, | |
720 | + { | |
721 | + "name": "bower-asset/typeahead.js", | |
722 | + "version": "v0.11.1", | |
723 | + "source": { | |
724 | + "type": "git", | |
725 | + "url": "https://github.com/twitter/typeahead.js.git", | |
726 | + "reference": "588440f66559714280628a4f9799f0c4eb880a4a" | |
727 | + }, | |
728 | + "dist": { | |
729 | + "type": "zip", | |
730 | + "url": "https://api.github.com/repos/twitter/typeahead.js/zipball/588440f66559714280628a4f9799f0c4eb880a4a", | |
731 | + "reference": "588440f66559714280628a4f9799f0c4eb880a4a", | |
732 | + "shasum": "" | |
733 | + }, | |
734 | + "require": { | |
735 | + "bower-asset/jquery": ">=1.7" | |
736 | + }, | |
737 | + "require-dev": { | |
738 | + "bower-asset/jasmine-ajax": "~1.3.1", | |
739 | + "bower-asset/jasmine-jquery": "~1.5.2", | |
740 | + "bower-asset/jquery": "~1.7" | |
741 | + }, | |
742 | + "type": "bower-asset-library", | |
743 | + "extra": { | |
744 | + "bower-asset-main": "dist/typeahead.bundle.js" | |
745 | + } | |
746 | + }, | |
747 | + { | |
748 | + "name": "codeception/base", | |
749 | + "version": "2.2.9", | |
750 | + "source": { | |
751 | + "type": "git", | |
752 | + "url": "https://github.com/Codeception/base.git", | |
753 | + "reference": "8d5f54ce583ceaa9627c2441e20bbd4873de50cc" | |
754 | + }, | |
755 | + "dist": { | |
756 | + "type": "zip", | |
757 | + "url": "https://api.github.com/repos/Codeception/base/zipball/8d5f54ce583ceaa9627c2441e20bbd4873de50cc", | |
758 | + "reference": "8d5f54ce583ceaa9627c2441e20bbd4873de50cc", | |
759 | + "shasum": "" | |
760 | + }, | |
761 | + "require": { | |
762 | + "behat/gherkin": "~4.4.0", | |
763 | + "ext-json": "*", | |
764 | + "ext-mbstring": "*", | |
765 | + "guzzlehttp/psr7": "~1.0", | |
766 | + "php": ">=5.4.0 <8.0", | |
767 | + "phpunit/php-code-coverage": ">=2.2.4 <5.0", | |
768 | + "phpunit/phpunit": ">4.8.20 <6.0", | |
769 | + "sebastian/comparator": "~1.1", | |
770 | + "sebastian/diff": "^1.4", | |
771 | + "symfony/browser-kit": ">=2.7 <4.0", | |
772 | + "symfony/console": ">=2.7 <4.0", | |
773 | + "symfony/css-selector": ">=2.7 <4.0", | |
774 | + "symfony/dom-crawler": ">=2.7.5 <4.0", | |
775 | + "symfony/event-dispatcher": ">=2.7 <4.0", | |
776 | + "symfony/finder": ">=2.7 <4.0", | |
777 | + "symfony/yaml": ">=2.7 <4.0" | |
778 | + }, | |
779 | + "require-dev": { | |
780 | + "codeception/specify": "~0.3", | |
781 | + "facebook/graph-sdk": "~5.3", | |
782 | + "flow/jsonpath": "~0.2", | |
783 | + "league/factory-muffin": "^3.0", | |
784 | + "league/factory-muffin-faker": "^1.0", | |
785 | + "mongodb/mongodb": "^1.0", | |
786 | + "monolog/monolog": "~1.8", | |
787 | + "pda/pheanstalk": "~3.0", | |
788 | + "php-amqplib/php-amqplib": "~2.4", | |
789 | + "predis/predis": "^1.0", | |
790 | + "squizlabs/php_codesniffer": "~2.0", | |
791 | + "vlucas/phpdotenv": "^2.4.0" | |
792 | + }, | |
793 | + "suggest": { | |
794 | + "codeception/specify": "BDD-style code blocks", | |
795 | + "codeception/verify": "BDD-style assertions", | |
796 | + "flow/jsonpath": "For using JSONPath in REST module", | |
797 | + "league/factory-muffin": "For DataFactory module", | |
798 | + "league/factory-muffin-faker": "For Faker support in DataFactory module", | |
799 | + "phpseclib/phpseclib": "for SFTP option in FTP Module", | |
800 | + "symfony/phpunit-bridge": "For phpunit-bridge support" | |
801 | + }, | |
802 | + "bin": [ | |
803 | + "codecept" | |
804 | + ], | |
805 | + "type": "library", | |
806 | + "extra": { | |
807 | + "branch-alias": [] | |
808 | + }, | |
809 | + "autoload": { | |
810 | + "psr-4": { | |
811 | + "Codeception\\": "src\\Codeception", | |
812 | + "Codeception\\Extension\\": "ext" | |
813 | + } | |
814 | + }, | |
815 | + "notification-url": "https://packagist.org/downloads/", | |
816 | + "license": [ | |
817 | + "MIT" | |
818 | + ], | |
819 | + "authors": [ | |
820 | + { | |
821 | + "name": "Michael Bodnarchuk", | |
822 | + "email": "davert@mail.ua", | |
823 | + "homepage": "http://codegyre.com" | |
824 | + } | |
825 | + ], | |
826 | + "description": "BDD-style testing framework", | |
827 | + "homepage": "http://codeception.com/", | |
828 | + "keywords": [ | |
829 | + "BDD", | |
830 | + "TDD", | |
831 | + "acceptance testing", | |
832 | + "functional testing", | |
833 | + "unit testing" | |
834 | + ], | |
835 | + "time": "2017-02-04 02:16:42" | |
836 | + }, | |
837 | + { | |
838 | + "name": "codeception/verify", | |
839 | + "version": "0.3.3", | |
840 | + "source": { | |
841 | + "type": "git", | |
842 | + "url": "https://github.com/Codeception/Verify.git", | |
843 | + "reference": "5d649dda453cd814dadc4bb053060cd2c6bb4b4c" | |
844 | + }, | |
845 | + "dist": { | |
846 | + "type": "zip", | |
847 | + "url": "https://api.github.com/repos/Codeception/Verify/zipball/5d649dda453cd814dadc4bb053060cd2c6bb4b4c", | |
848 | + "reference": "5d649dda453cd814dadc4bb053060cd2c6bb4b4c", | |
849 | + "shasum": "" | |
850 | + }, | |
851 | + "require-dev": { | |
852 | + "phpunit/phpunit": "~4.0" | |
853 | + }, | |
854 | + "type": "library", | |
855 | + "autoload": { | |
856 | + "files": [ | |
857 | + "src/Codeception/function.php" | |
858 | + ] | |
859 | + }, | |
860 | + "notification-url": "https://packagist.org/downloads/", | |
861 | + "license": [ | |
862 | + "MIT" | |
863 | + ], | |
864 | + "authors": [ | |
865 | + { | |
866 | + "name": "Michael Bodnarchuk", | |
867 | + "email": "davert.php@mailican.com" | |
868 | + } | |
869 | + ], | |
870 | + "description": "BDD assertion library for PHPUnit", | |
871 | + "time": "2017-01-09 10:58:51" | |
872 | + }, | |
873 | + { | |
874 | + "name": "doctrine/instantiator", | |
875 | + "version": "1.0.5", | |
876 | + "source": { | |
877 | + "type": "git", | |
878 | + "url": "https://github.com/doctrine/instantiator.git", | |
879 | + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d" | |
880 | + }, | |
881 | + "dist": { | |
882 | + "type": "zip", | |
883 | + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d", | |
884 | + "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d", | |
885 | + "shasum": "" | |
886 | + }, | |
887 | + "require": { | |
888 | + "php": ">=5.3,<8.0-DEV" | |
889 | + }, | |
890 | + "require-dev": { | |
891 | + "athletic/athletic": "~0.1.8", | |
892 | + "ext-pdo": "*", | |
893 | + "ext-phar": "*", | |
894 | + "phpunit/phpunit": "~4.0", | |
895 | + "squizlabs/php_codesniffer": "~2.0" | |
896 | + }, | |
897 | + "type": "library", | |
898 | + "extra": { | |
899 | + "branch-alias": { | |
900 | + "dev-master": "1.0.x-dev" | |
901 | + } | |
902 | + }, | |
903 | + "autoload": { | |
904 | + "psr-4": { | |
905 | + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" | |
906 | + } | |
907 | + }, | |
908 | + "notification-url": "https://packagist.org/downloads/", | |
909 | + "license": [ | |
910 | + "MIT" | |
911 | + ], | |
912 | + "authors": [ | |
913 | + { | |
914 | + "name": "Marco Pivetta", | |
915 | + "email": "ocramius@gmail.com", | |
916 | + "homepage": "http://ocramius.github.com/" | |
917 | + } | |
918 | + ], | |
919 | + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", | |
920 | + "homepage": "https://github.com/doctrine/instantiator", | |
921 | + "keywords": [ | |
922 | + "constructor", | |
923 | + "instantiate" | |
924 | + ], | |
925 | + "time": "2015-06-14 21:17:01" | |
926 | + }, | |
927 | + { | |
928 | + "name": "fzaninotto/faker", | |
929 | + "version": "v1.6.0", | |
930 | + "source": { | |
931 | + "type": "git", | |
932 | + "url": "https://github.com/fzaninotto/Faker.git", | |
933 | + "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123" | |
934 | + }, | |
935 | + "dist": { | |
936 | + "type": "zip", | |
937 | + "url": "https://api.github.com/repos/fzaninotto/Faker/zipball/44f9a286a04b80c76a4e5fb7aad8bb539b920123", | |
938 | + "reference": "44f9a286a04b80c76a4e5fb7aad8bb539b920123", | |
939 | + "shasum": "" | |
940 | + }, | |
941 | + "require": { | |
942 | + "php": "^5.3.3|^7.0" | |
943 | + }, | |
944 | + "require-dev": { | |
945 | + "ext-intl": "*", | |
946 | + "phpunit/phpunit": "~4.0", | |
947 | + "squizlabs/php_codesniffer": "~1.5" | |
948 | + }, | |
949 | + "type": "library", | |
950 | + "extra": { | |
951 | + "branch-alias": [] | |
952 | + }, | |
953 | + "autoload": { | |
954 | + "psr-4": { | |
955 | + "Faker\\": "src/Faker/" | |
956 | + } | |
957 | + }, | |
958 | + "notification-url": "https://packagist.org/downloads/", | |
959 | + "license": [ | |
960 | + "MIT" | |
961 | + ], | |
962 | + "authors": [ | |
963 | + { | |
964 | + "name": "Franรงois Zaninotto" | |
965 | + } | |
966 | + ], | |
967 | + "description": "Faker is a PHP library that generates fake data for you.", | |
968 | + "keywords": [ | |
969 | + "data", | |
970 | + "faker", | |
971 | + "fixtures" | |
972 | + ], | |
973 | + "time": "2016-04-29 12:21:54" | |
974 | + }, | |
975 | + { | |
976 | + "name": "guzzlehttp/psr7", | |
977 | + "version": "1.4.1", | |
978 | + "source": { | |
979 | + "type": "git", | |
980 | + "url": "https://github.com/guzzle/psr7.git", | |
981 | + "reference": "0d6c7ca039329247e4f0f8f8f6506810e8248855" | |
982 | + }, | |
983 | + "dist": { | |
984 | + "type": "zip", | |
985 | + "url": "https://api.github.com/repos/guzzle/psr7/zipball/0d6c7ca039329247e4f0f8f8f6506810e8248855", | |
986 | + "reference": "0d6c7ca039329247e4f0f8f8f6506810e8248855", | |
987 | + "shasum": "" | |
988 | + }, | |
989 | + "require": { | |
990 | + "php": ">=5.4.0", | |
991 | + "psr/http-message": "~1.0" | |
992 | + }, | |
993 | + "provide": { | |
994 | + "psr/http-message-implementation": "1.0" | |
995 | + }, | |
996 | + "require-dev": { | |
997 | + "phpunit/phpunit": "~4.0" | |
998 | + }, | |
999 | + "type": "library", | |
1000 | + "extra": { | |
1001 | + "branch-alias": { | |
1002 | + "dev-master": "1.4-dev" | |
1003 | + } | |
1004 | + }, | |
1005 | + "autoload": { | |
1006 | + "psr-4": { | |
1007 | + "GuzzleHttp\\Psr7\\": "src/" | |
1008 | + }, | |
1009 | + "files": [ | |
1010 | + "src/functions_include.php" | |
1011 | + ] | |
1012 | + }, | |
1013 | + "notification-url": "https://packagist.org/downloads/", | |
1014 | + "license": [ | |
1015 | + "MIT" | |
1016 | + ], | |
1017 | + "authors": [ | |
1018 | + { | |
1019 | + "name": "Michael Dowling", | |
1020 | + "email": "mtdowling@gmail.com", | |
1021 | + "homepage": "https://github.com/mtdowling" | |
1022 | + }, | |
1023 | + { | |
1024 | + "name": "Tobias Schultze", | |
1025 | + "homepage": "https://github.com/Tobion" | |
1026 | + } | |
1027 | + ], | |
1028 | + "description": "PSR-7 message implementation that also provides common utility methods", | |
1029 | + "keywords": [ | |
1030 | + "http", | |
1031 | + "message", | |
1032 | + "request", | |
1033 | + "response", | |
1034 | + "stream", | |
1035 | + "uri", | |
1036 | + "url" | |
1037 | + ], | |
1038 | + "time": "2017-02-27 10:51:17" | |
1039 | + }, | |
1040 | + { | |
1041 | + "name": "myclabs/deep-copy", | |
1042 | + "version": "1.6.0", | |
1043 | + "source": { | |
1044 | + "type": "git", | |
1045 | + "url": "https://github.com/myclabs/DeepCopy.git", | |
1046 | + "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe" | |
1047 | + }, | |
1048 | + "dist": { | |
1049 | + "type": "zip", | |
1050 | + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/5a5a9fc8025a08d8919be87d6884d5a92520cefe", | |
1051 | + "reference": "5a5a9fc8025a08d8919be87d6884d5a92520cefe", | |
1052 | + "shasum": "" | |
1053 | + }, | |
1054 | + "require": { | |
1055 | + "php": ">=5.4.0" | |
1056 | + }, | |
1057 | + "require-dev": { | |
1058 | + "doctrine/collections": "1.*", | |
1059 | + "phpunit/phpunit": "~4.1" | |
1060 | + }, | |
1061 | + "type": "library", | |
1062 | + "autoload": { | |
1063 | + "psr-4": { | |
1064 | + "DeepCopy\\": "src/DeepCopy/" | |
1065 | + } | |
1066 | + }, | |
1067 | + "notification-url": "https://packagist.org/downloads/", | |
1068 | + "license": [ | |
1069 | + "MIT" | |
1070 | + ], | |
1071 | + "description": "Create deep copies (clones) of your objects", | |
1072 | + "homepage": "https://github.com/myclabs/DeepCopy", | |
1073 | + "keywords": [ | |
1074 | + "clone", | |
1075 | + "copy", | |
1076 | + "duplicate", | |
1077 | + "object", | |
1078 | + "object graph" | |
1079 | + ], | |
1080 | + "time": "2017-01-26 22:05:40" | |
1081 | + }, | |
1082 | + { | |
1083 | + "name": "phpdocumentor/reflection-common", | |
1084 | + "version": "1.0", | |
1085 | + "source": { | |
1086 | + "type": "git", | |
1087 | + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", | |
1088 | + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c" | |
1089 | + }, | |
1090 | + "dist": { | |
1091 | + "type": "zip", | |
1092 | + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/144c307535e82c8fdcaacbcfc1d6d8eeb896687c", | |
1093 | + "reference": "144c307535e82c8fdcaacbcfc1d6d8eeb896687c", | |
1094 | + "shasum": "" | |
1095 | + }, | |
1096 | + "require": { | |
1097 | + "php": ">=5.5" | |
1098 | + }, | |
1099 | + "require-dev": { | |
1100 | + "phpunit/phpunit": "^4.6" | |
1101 | + }, | |
1102 | + "type": "library", | |
1103 | + "extra": { | |
1104 | + "branch-alias": { | |
1105 | + "dev-master": "1.0.x-dev" | |
1106 | + } | |
1107 | + }, | |
1108 | + "autoload": { | |
1109 | + "psr-4": { | |
1110 | + "phpDocumentor\\Reflection\\": [ | |
1111 | + "src" | |
1112 | + ] | |
1113 | + } | |
1114 | + }, | |
1115 | + "notification-url": "https://packagist.org/downloads/", | |
1116 | + "license": [ | |
1117 | + "MIT" | |
1118 | + ], | |
1119 | + "authors": [ | |
1120 | + { | |
1121 | + "name": "Jaap van Otterdijk", | |
1122 | + "email": "opensource@ijaap.nl" | |
1123 | + } | |
1124 | + ], | |
1125 | + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", | |
1126 | + "homepage": "http://www.phpdoc.org", | |
1127 | + "keywords": [ | |
1128 | + "FQSEN", | |
1129 | + "phpDocumentor", | |
1130 | + "phpdoc", | |
1131 | + "reflection", | |
1132 | + "static analysis" | |
1133 | + ], | |
1134 | + "time": "2015-12-27 11:43:31" | |
1135 | + }, | |
1136 | + { | |
1137 | + "name": "phpdocumentor/reflection-docblock", | |
1138 | + "version": "3.1.1", | |
1139 | + "source": { | |
1140 | + "type": "git", | |
1141 | + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", | |
1142 | + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e" | |
1143 | + }, | |
1144 | + "dist": { | |
1145 | + "type": "zip", | |
1146 | + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/8331b5efe816ae05461b7ca1e721c01b46bafb3e", | |
1147 | + "reference": "8331b5efe816ae05461b7ca1e721c01b46bafb3e", | |
1148 | + "shasum": "" | |
1149 | + }, | |
1150 | + "require": { | |
1151 | + "php": ">=5.5", | |
1152 | + "phpdocumentor/reflection-common": "^1.0@dev", | |
1153 | + "phpdocumentor/type-resolver": "^0.2.0", | |
1154 | + "webmozart/assert": "^1.0" | |
1155 | + }, | |
1156 | + "require-dev": { | |
1157 | + "mockery/mockery": "^0.9.4", | |
1158 | + "phpunit/phpunit": "^4.4" | |
1159 | + }, | |
1160 | + "type": "library", | |
1161 | + "autoload": { | |
1162 | + "psr-4": { | |
1163 | + "phpDocumentor\\Reflection\\": [ | |
1164 | + "src/" | |
1165 | + ] | |
1166 | + } | |
1167 | + }, | |
1168 | + "notification-url": "https://packagist.org/downloads/", | |
1169 | + "license": [ | |
1170 | + "MIT" | |
1171 | + ], | |
1172 | + "authors": [ | |
1173 | + { | |
1174 | + "name": "Mike van Riel", | |
1175 | + "email": "me@mikevanriel.com" | |
1176 | + } | |
1177 | + ], | |
1178 | + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", | |
1179 | + "time": "2016-09-30 07:12:33" | |
1180 | + }, | |
1181 | + { | |
1182 | + "name": "phpdocumentor/type-resolver", | |
1183 | + "version": "0.2.1", | |
1184 | + "source": { | |
1185 | + "type": "git", | |
1186 | + "url": "https://github.com/phpDocumentor/TypeResolver.git", | |
1187 | + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb" | |
1188 | + }, | |
1189 | + "dist": { | |
1190 | + "type": "zip", | |
1191 | + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", | |
1192 | + "reference": "e224fb2ea2fba6d3ad6fdaef91cd09a172155ccb", | |
1193 | + "shasum": "" | |
1194 | + }, | |
1195 | + "require": { | |
1196 | + "php": ">=5.5", | |
1197 | + "phpdocumentor/reflection-common": "^1.0" | |
1198 | + }, | |
1199 | + "require-dev": { | |
1200 | + "mockery/mockery": "^0.9.4", | |
1201 | + "phpunit/phpunit": "^5.2||^4.8.24" | |
1202 | + }, | |
1203 | + "type": "library", | |
1204 | + "extra": { | |
1205 | + "branch-alias": { | |
1206 | + "dev-master": "1.0.x-dev" | |
1207 | + } | |
1208 | + }, | |
1209 | + "autoload": { | |
1210 | + "psr-4": { | |
1211 | + "phpDocumentor\\Reflection\\": [ | |
1212 | + "src/" | |
1213 | + ] | |
1214 | + } | |
1215 | + }, | |
1216 | + "notification-url": "https://packagist.org/downloads/", | |
1217 | + "license": [ | |
1218 | + "MIT" | |
1219 | + ], | |
1220 | + "authors": [ | |
1221 | + { | |
1222 | + "name": "Mike van Riel", | |
1223 | + "email": "me@mikevanriel.com" | |
1224 | + } | |
1225 | + ], | |
1226 | + "time": "2016-11-25 06:54:22" | |
1227 | + }, | |
1228 | + { | |
1229 | + "name": "phpspec/php-diff", | |
1230 | + "version": "v1.1.0", | |
1231 | + "source": { | |
1232 | + "type": "git", | |
1233 | + "url": "https://github.com/phpspec/php-diff.git", | |
1234 | + "reference": "0464787bfa7cd13576c5a1e318709768798bec6a" | |
1235 | + }, | |
1236 | + "dist": { | |
1237 | + "type": "zip", | |
1238 | + "url": "https://api.github.com/repos/phpspec/php-diff/zipball/0464787bfa7cd13576c5a1e318709768798bec6a", | |
1239 | + "reference": "0464787bfa7cd13576c5a1e318709768798bec6a", | |
1240 | + "shasum": "" | |
1241 | + }, | |
1242 | + "type": "library", | |
1243 | + "extra": { | |
1244 | + "branch-alias": { | |
1245 | + "dev-master": "1.0.x-dev" | |
1246 | + } | |
1247 | + }, | |
1248 | + "autoload": { | |
1249 | + "psr-0": { | |
1250 | + "Diff": "lib/" | |
1251 | + } | |
1252 | + }, | |
1253 | + "notification-url": "https://packagist.org/downloads/", | |
1254 | + "license": [ | |
1255 | + "BSD-3-Clause" | |
1256 | + ], | |
1257 | + "authors": [ | |
1258 | + { | |
1259 | + "name": "Chris Boulton", | |
1260 | + "homepage": "http://github.com/chrisboulton" | |
1261 | + } | |
1262 | + ], | |
1263 | + "description": "A comprehensive library for generating differences between two hashable objects (strings or arrays).", | |
1264 | + "time": "2016-04-07 12:29:16" | |
1265 | + }, | |
1266 | + { | |
1267 | + "name": "phpspec/prophecy", | |
1268 | + "version": "v1.7.0", | |
1269 | + "source": { | |
1270 | + "type": "git", | |
1271 | + "url": "https://github.com/phpspec/prophecy.git", | |
1272 | + "reference": "93d39f1f7f9326d746203c7c056f300f7f126073" | |
1273 | + }, | |
1274 | + "dist": { | |
1275 | + "type": "zip", | |
1276 | + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/93d39f1f7f9326d746203c7c056f300f7f126073", | |
1277 | + "reference": "93d39f1f7f9326d746203c7c056f300f7f126073", | |
1278 | + "shasum": "" | |
1279 | + }, | |
1280 | + "require": { | |
1281 | + "doctrine/instantiator": "^1.0.2", | |
1282 | + "php": "^5.3|^7.0", | |
1283 | + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2", | |
1284 | + "sebastian/comparator": "^1.1|^2.0", | |
1285 | + "sebastian/recursion-context": "^1.0|^2.0|^3.0" | |
1286 | + }, | |
1287 | + "require-dev": { | |
1288 | + "phpspec/phpspec": "^2.5|^3.2", | |
1289 | + "phpunit/phpunit": "^4.8 || ^5.6.5" | |
1290 | + }, | |
1291 | + "type": "library", | |
1292 | + "extra": { | |
1293 | + "branch-alias": { | |
1294 | + "dev-master": "1.6.x-dev" | |
1295 | + } | |
1296 | + }, | |
1297 | + "autoload": { | |
1298 | + "psr-0": { | |
1299 | + "Prophecy\\": "src/" | |
1300 | + } | |
1301 | + }, | |
1302 | + "notification-url": "https://packagist.org/downloads/", | |
1303 | + "license": [ | |
1304 | + "MIT" | |
1305 | + ], | |
1306 | + "authors": [ | |
1307 | + { | |
1308 | + "name": "Konstantin Kudryashov", | |
1309 | + "email": "ever.zet@gmail.com", | |
1310 | + "homepage": "http://everzet.com" | |
1311 | + }, | |
1312 | + { | |
1313 | + "name": "Marcello Duarte", | |
1314 | + "email": "marcello.duarte@gmail.com" | |
1315 | + } | |
1316 | + ], | |
1317 | + "description": "Highly opinionated mocking framework for PHP 5.3+", | |
1318 | + "homepage": "https://github.com/phpspec/prophecy", | |
1319 | + "keywords": [ | |
1320 | + "Double", | |
1321 | + "Dummy", | |
1322 | + "fake", | |
1323 | + "mock", | |
1324 | + "spy", | |
1325 | + "stub" | |
1326 | + ], | |
1327 | + "time": "2017-03-02 20:05:34" | |
1328 | + }, | |
1329 | + { | |
1330 | + "name": "phpunit/php-code-coverage", | |
1331 | + "version": "4.0.7", | |
1332 | + "source": { | |
1333 | + "type": "git", | |
1334 | + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", | |
1335 | + "reference": "09e2277d14ea467e5a984010f501343ef29ffc69" | |
1336 | + }, | |
1337 | + "dist": { | |
1338 | + "type": "zip", | |
1339 | + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/09e2277d14ea467e5a984010f501343ef29ffc69", | |
1340 | + "reference": "09e2277d14ea467e5a984010f501343ef29ffc69", | |
1341 | + "shasum": "" | |
1342 | + }, | |
1343 | + "require": { | |
1344 | + "ext-dom": "*", | |
1345 | + "ext-xmlwriter": "*", | |
1346 | + "php": "^5.6 || ^7.0", | |
1347 | + "phpunit/php-file-iterator": "^1.3", | |
1348 | + "phpunit/php-text-template": "^1.2", | |
1349 | + "phpunit/php-token-stream": "^1.4.2 || ^2.0", | |
1350 | + "sebastian/code-unit-reverse-lookup": "^1.0", | |
1351 | + "sebastian/environment": "^1.3.2 || ^2.0", | |
1352 | + "sebastian/version": "^1.0 || ^2.0" | |
1353 | + }, | |
1354 | + "require-dev": { | |
1355 | + "ext-xdebug": "^2.1.4", | |
1356 | + "phpunit/phpunit": "^5.7" | |
1357 | + }, | |
1358 | + "suggest": { | |
1359 | + "ext-xdebug": "^2.5.1" | |
1360 | + }, | |
1361 | + "type": "library", | |
1362 | + "extra": { | |
1363 | + "branch-alias": { | |
1364 | + "dev-master": "4.0.x-dev" | |
1365 | + } | |
1366 | + }, | |
1367 | + "autoload": { | |
1368 | + "classmap": [ | |
1369 | + "src/" | |
1370 | + ] | |
1371 | + }, | |
1372 | + "notification-url": "https://packagist.org/downloads/", | |
1373 | + "license": [ | |
1374 | + "BSD-3-Clause" | |
1375 | + ], | |
1376 | + "authors": [ | |
1377 | + { | |
1378 | + "name": "Sebastian Bergmann", | |
1379 | + "email": "sb@sebastian-bergmann.de", | |
1380 | + "role": "lead" | |
1381 | + } | |
1382 | + ], | |
1383 | + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", | |
1384 | + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", | |
1385 | + "keywords": [ | |
1386 | + "coverage", | |
1387 | + "testing", | |
1388 | + "xunit" | |
1389 | + ], | |
1390 | + "time": "2017-03-01 09:12:17" | |
1391 | + }, | |
1392 | + { | |
1393 | + "name": "phpunit/php-file-iterator", | |
1394 | + "version": "1.4.2", | |
1395 | + "source": { | |
1396 | + "type": "git", | |
1397 | + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", | |
1398 | + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5" | |
1399 | + }, | |
1400 | + "dist": { | |
1401 | + "type": "zip", | |
1402 | + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/3cc8f69b3028d0f96a9078e6295d86e9bf019be5", | |
1403 | + "reference": "3cc8f69b3028d0f96a9078e6295d86e9bf019be5", | |
1404 | + "shasum": "" | |
1405 | + }, | |
1406 | + "require": { | |
1407 | + "php": ">=5.3.3" | |
1408 | + }, | |
1409 | + "type": "library", | |
1410 | + "extra": { | |
1411 | + "branch-alias": { | |
1412 | + "dev-master": "1.4.x-dev" | |
1413 | + } | |
1414 | + }, | |
1415 | + "autoload": { | |
1416 | + "classmap": [ | |
1417 | + "src/" | |
1418 | + ] | |
1419 | + }, | |
1420 | + "notification-url": "https://packagist.org/downloads/", | |
1421 | + "license": [ | |
1422 | + "BSD-3-Clause" | |
1423 | + ], | |
1424 | + "authors": [ | |
1425 | + { | |
1426 | + "name": "Sebastian Bergmann", | |
1427 | + "email": "sb@sebastian-bergmann.de", | |
1428 | + "role": "lead" | |
1429 | + } | |
1430 | + ], | |
1431 | + "description": "FilterIterator implementation that filters files based on a list of suffixes.", | |
1432 | + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", | |
1433 | + "keywords": [ | |
1434 | + "filesystem", | |
1435 | + "iterator" | |
1436 | + ], | |
1437 | + "time": "2016-10-03 07:40:28" | |
1438 | + }, | |
1439 | + { | |
1440 | + "name": "phpunit/php-text-template", | |
1441 | + "version": "1.2.1", | |
1442 | + "source": { | |
1443 | + "type": "git", | |
1444 | + "url": "https://github.com/sebastianbergmann/php-text-template.git", | |
1445 | + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" | |
1446 | + }, | |
1447 | + "dist": { | |
1448 | + "type": "zip", | |
1449 | + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", | |
1450 | + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", | |
1451 | + "shasum": "" | |
1452 | + }, | |
1453 | + "require": { | |
1454 | + "php": ">=5.3.3" | |
1455 | + }, | |
1456 | + "type": "library", | |
1457 | + "autoload": { | |
1458 | + "classmap": [ | |
1459 | + "src/" | |
1460 | + ] | |
1461 | + }, | |
1462 | + "notification-url": "https://packagist.org/downloads/", | |
1463 | + "license": [ | |
1464 | + "BSD-3-Clause" | |
1465 | + ], | |
1466 | + "authors": [ | |
1467 | + { | |
1468 | + "name": "Sebastian Bergmann", | |
1469 | + "email": "sebastian@phpunit.de", | |
1470 | + "role": "lead" | |
1471 | + } | |
1472 | + ], | |
1473 | + "description": "Simple template engine.", | |
1474 | + "homepage": "https://github.com/sebastianbergmann/php-text-template/", | |
1475 | + "keywords": [ | |
1476 | + "template" | |
1477 | + ], | |
1478 | + "time": "2015-06-21 13:50:34" | |
1479 | + }, | |
1480 | + { | |
1481 | + "name": "phpunit/php-timer", | |
1482 | + "version": "1.0.9", | |
1483 | + "source": { | |
1484 | + "type": "git", | |
1485 | + "url": "https://github.com/sebastianbergmann/php-timer.git", | |
1486 | + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f" | |
1487 | + }, | |
1488 | + "dist": { | |
1489 | + "type": "zip", | |
1490 | + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", | |
1491 | + "reference": "3dcf38ca72b158baf0bc245e9184d3fdffa9c46f", | |
1492 | + "shasum": "" | |
1493 | + }, | |
1494 | + "require": { | |
1495 | + "php": "^5.3.3 || ^7.0" | |
1496 | + }, | |
1497 | + "require-dev": { | |
1498 | + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" | |
1499 | + }, | |
1500 | + "type": "library", | |
1501 | + "extra": { | |
1502 | + "branch-alias": { | |
1503 | + "dev-master": "1.0-dev" | |
1504 | + } | |
1505 | + }, | |
1506 | + "autoload": { | |
1507 | + "classmap": [ | |
1508 | + "src/" | |
1509 | + ] | |
1510 | + }, | |
1511 | + "notification-url": "https://packagist.org/downloads/", | |
1512 | + "license": [ | |
1513 | + "BSD-3-Clause" | |
1514 | + ], | |
1515 | + "authors": [ | |
1516 | + { | |
1517 | + "name": "Sebastian Bergmann", | |
1518 | + "email": "sb@sebastian-bergmann.de", | |
1519 | + "role": "lead" | |
1520 | + } | |
1521 | + ], | |
1522 | + "description": "Utility class for timing", | |
1523 | + "homepage": "https://github.com/sebastianbergmann/php-timer/", | |
1524 | + "keywords": [ | |
1525 | + "timer" | |
1526 | + ], | |
1527 | + "time": "2017-02-26 11:10:40" | |
1528 | + }, | |
1529 | + { | |
1530 | + "name": "phpunit/php-token-stream", | |
1531 | + "version": "1.4.11", | |
1532 | + "source": { | |
1533 | + "type": "git", | |
1534 | + "url": "https://github.com/sebastianbergmann/php-token-stream.git", | |
1535 | + "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7" | |
1536 | + }, | |
1537 | + "dist": { | |
1538 | + "type": "zip", | |
1539 | + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/e03f8f67534427a787e21a385a67ec3ca6978ea7", | |
1540 | + "reference": "e03f8f67534427a787e21a385a67ec3ca6978ea7", | |
1541 | + "shasum": "" | |
1542 | + }, | |
1543 | + "require": { | |
1544 | + "ext-tokenizer": "*", | |
1545 | + "php": ">=5.3.3" | |
1546 | + }, | |
1547 | + "require-dev": { | |
1548 | + "phpunit/phpunit": "~4.2" | |
1549 | + }, | |
1550 | + "type": "library", | |
1551 | + "extra": { | |
1552 | + "branch-alias": { | |
1553 | + "dev-master": "1.4-dev" | |
1554 | + } | |
1555 | + }, | |
1556 | + "autoload": { | |
1557 | + "classmap": [ | |
1558 | + "src/" | |
1559 | + ] | |
1560 | + }, | |
1561 | + "notification-url": "https://packagist.org/downloads/", | |
1562 | + "license": [ | |
1563 | + "BSD-3-Clause" | |
1564 | + ], | |
1565 | + "authors": [ | |
1566 | + { | |
1567 | + "name": "Sebastian Bergmann", | |
1568 | + "email": "sebastian@phpunit.de" | |
1569 | + } | |
1570 | + ], | |
1571 | + "description": "Wrapper around PHP's tokenizer extension.", | |
1572 | + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", | |
1573 | + "keywords": [ | |
1574 | + "tokenizer" | |
1575 | + ], | |
1576 | + "time": "2017-02-27 10:12:30" | |
1577 | + }, | |
1578 | + { | |
1579 | + "name": "phpunit/phpunit", | |
1580 | + "version": "5.7.15", | |
1581 | + "source": { | |
1582 | + "type": "git", | |
1583 | + "url": "https://github.com/sebastianbergmann/phpunit.git", | |
1584 | + "reference": "b99112aecc01f62acf3d81a3f59646700a1849e5" | |
1585 | + }, | |
1586 | + "dist": { | |
1587 | + "type": "zip", | |
1588 | + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/b99112aecc01f62acf3d81a3f59646700a1849e5", | |
1589 | + "reference": "b99112aecc01f62acf3d81a3f59646700a1849e5", | |
1590 | + "shasum": "" | |
1591 | + }, | |
1592 | + "require": { | |
1593 | + "ext-dom": "*", | |
1594 | + "ext-json": "*", | |
1595 | + "ext-libxml": "*", | |
1596 | + "ext-mbstring": "*", | |
1597 | + "ext-xml": "*", | |
1598 | + "myclabs/deep-copy": "~1.3", | |
1599 | + "php": "^5.6 || ^7.0", | |
1600 | + "phpspec/prophecy": "^1.6.2", | |
1601 | + "phpunit/php-code-coverage": "^4.0.4", | |
1602 | + "phpunit/php-file-iterator": "~1.4", | |
1603 | + "phpunit/php-text-template": "~1.2", | |
1604 | + "phpunit/php-timer": "^1.0.6", | |
1605 | + "phpunit/phpunit-mock-objects": "^3.2", | |
1606 | + "sebastian/comparator": "^1.2.4", | |
1607 | + "sebastian/diff": "~1.2", | |
1608 | + "sebastian/environment": "^1.3.4 || ^2.0", | |
1609 | + "sebastian/exporter": "~2.0", | |
1610 | + "sebastian/global-state": "^1.1", | |
1611 | + "sebastian/object-enumerator": "~2.0", | |
1612 | + "sebastian/resource-operations": "~1.0", | |
1613 | + "sebastian/version": "~1.0.3|~2.0", | |
1614 | + "symfony/yaml": "~2.1|~3.0" | |
1615 | + }, | |
1616 | + "conflict": { | |
1617 | + "phpdocumentor/reflection-docblock": "3.0.2" | |
1618 | + }, | |
1619 | + "require-dev": { | |
1620 | + "ext-pdo": "*" | |
1621 | + }, | |
1622 | + "suggest": { | |
1623 | + "ext-xdebug": "*", | |
1624 | + "phpunit/php-invoker": "~1.1" | |
1625 | + }, | |
1626 | + "bin": [ | |
1627 | + "phpunit" | |
1628 | + ], | |
1629 | + "type": "library", | |
1630 | + "extra": { | |
1631 | + "branch-alias": { | |
1632 | + "dev-master": "5.7.x-dev" | |
1633 | + } | |
1634 | + }, | |
1635 | + "autoload": { | |
1636 | + "classmap": [ | |
1637 | + "src/" | |
1638 | + ] | |
1639 | + }, | |
1640 | + "notification-url": "https://packagist.org/downloads/", | |
1641 | + "license": [ | |
1642 | + "BSD-3-Clause" | |
1643 | + ], | |
1644 | + "authors": [ | |
1645 | + { | |
1646 | + "name": "Sebastian Bergmann", | |
1647 | + "email": "sebastian@phpunit.de", | |
1648 | + "role": "lead" | |
1649 | + } | |
1650 | + ], | |
1651 | + "description": "The PHP Unit Testing framework.", | |
1652 | + "homepage": "https://phpunit.de/", | |
1653 | + "keywords": [ | |
1654 | + "phpunit", | |
1655 | + "testing", | |
1656 | + "xunit" | |
1657 | + ], | |
1658 | + "time": "2017-03-02 15:22:43" | |
1659 | + }, | |
1660 | + { | |
1661 | + "name": "phpunit/phpunit-mock-objects", | |
1662 | + "version": "3.4.3", | |
1663 | + "source": { | |
1664 | + "type": "git", | |
1665 | + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", | |
1666 | + "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24" | |
1667 | + }, | |
1668 | + "dist": { | |
1669 | + "type": "zip", | |
1670 | + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", | |
1671 | + "reference": "3ab72b65b39b491e0c011e2e09bb2206c2aa8e24", | |
1672 | + "shasum": "" | |
1673 | + }, | |
1674 | + "require": { | |
1675 | + "doctrine/instantiator": "^1.0.2", | |
1676 | + "php": "^5.6 || ^7.0", | |
1677 | + "phpunit/php-text-template": "^1.2", | |
1678 | + "sebastian/exporter": "^1.2 || ^2.0" | |
1679 | + }, | |
1680 | + "conflict": { | |
1681 | + "phpunit/phpunit": "<5.4.0" | |
1682 | + }, | |
1683 | + "require-dev": { | |
1684 | + "phpunit/phpunit": "^5.4" | |
1685 | + }, | |
1686 | + "suggest": { | |
1687 | + "ext-soap": "*" | |
1688 | + }, | |
1689 | + "type": "library", | |
1690 | + "extra": { | |
1691 | + "branch-alias": { | |
1692 | + "dev-master": "3.2.x-dev" | |
1693 | + } | |
1694 | + }, | |
1695 | + "autoload": { | |
1696 | + "classmap": [ | |
1697 | + "src/" | |
1698 | + ] | |
1699 | + }, | |
1700 | + "notification-url": "https://packagist.org/downloads/", | |
1701 | + "license": [ | |
1702 | + "BSD-3-Clause" | |
1703 | + ], | |
1704 | + "authors": [ | |
1705 | + { | |
1706 | + "name": "Sebastian Bergmann", | |
1707 | + "email": "sb@sebastian-bergmann.de", | |
1708 | + "role": "lead" | |
1709 | + } | |
1710 | + ], | |
1711 | + "description": "Mock Object library for PHPUnit", | |
1712 | + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", | |
1713 | + "keywords": [ | |
1714 | + "mock", | |
1715 | + "xunit" | |
1716 | + ], | |
1717 | + "time": "2016-12-08 20:27:08" | |
1718 | + }, | |
1719 | + { | |
1720 | + "name": "psr/http-message", | |
1721 | + "version": "1.0.1", | |
1722 | + "source": { | |
1723 | + "type": "git", | |
1724 | + "url": "https://github.com/php-fig/http-message.git", | |
1725 | + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" | |
1726 | + }, | |
1727 | + "dist": { | |
1728 | + "type": "zip", | |
1729 | + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", | |
1730 | + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", | |
1731 | + "shasum": "" | |
1732 | + }, | |
1733 | + "require": { | |
1734 | + "php": ">=5.3.0" | |
1735 | + }, | |
1736 | + "type": "library", | |
1737 | + "extra": { | |
1738 | + "branch-alias": { | |
1739 | + "dev-master": "1.0.x-dev" | |
1740 | + } | |
1741 | + }, | |
1742 | + "autoload": { | |
1743 | + "psr-4": { | |
1744 | + "Psr\\Http\\Message\\": "src/" | |
1745 | + } | |
1746 | + }, | |
1747 | + "notification-url": "https://packagist.org/downloads/", | |
1748 | + "license": [ | |
1749 | + "MIT" | |
1750 | + ], | |
1751 | + "authors": [ | |
1752 | + { | |
1753 | + "name": "PHP-FIG", | |
1754 | + "homepage": "http://www.php-fig.org/" | |
1755 | + } | |
1756 | + ], | |
1757 | + "description": "Common interface for HTTP messages", | |
1758 | + "homepage": "https://github.com/php-fig/http-message", | |
1759 | + "keywords": [ | |
1760 | + "http", | |
1761 | + "http-message", | |
1762 | + "psr", | |
1763 | + "psr-7", | |
1764 | + "request", | |
1765 | + "response" | |
1766 | + ], | |
1767 | + "time": "2016-08-06 14:39:51" | |
1768 | + }, | |
1769 | + { | |
1770 | + "name": "psr/log", | |
1771 | + "version": "1.0.2", | |
1772 | + "source": { | |
1773 | + "type": "git", | |
1774 | + "url": "https://github.com/php-fig/log.git", | |
1775 | + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d" | |
1776 | + }, | |
1777 | + "dist": { | |
1778 | + "type": "zip", | |
1779 | + "url": "https://api.github.com/repos/php-fig/log/zipball/4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", | |
1780 | + "reference": "4ebe3a8bf773a19edfe0a84b6585ba3d401b724d", | |
1781 | + "shasum": "" | |
1782 | + }, | |
1783 | + "require": { | |
1784 | + "php": ">=5.3.0" | |
1785 | + }, | |
1786 | + "type": "library", | |
1787 | + "extra": { | |
1788 | + "branch-alias": { | |
1789 | + "dev-master": "1.0.x-dev" | |
1790 | + } | |
1791 | + }, | |
1792 | + "autoload": { | |
1793 | + "psr-4": { | |
1794 | + "Psr\\Log\\": "Psr/Log/" | |
1795 | + } | |
1796 | + }, | |
1797 | + "notification-url": "https://packagist.org/downloads/", | |
1798 | + "license": [ | |
1799 | + "MIT" | |
1800 | + ], | |
1801 | + "authors": [ | |
1802 | + { | |
1803 | + "name": "PHP-FIG", | |
1804 | + "homepage": "http://www.php-fig.org/" | |
1805 | + } | |
1806 | + ], | |
1807 | + "description": "Common interface for logging libraries", | |
1808 | + "homepage": "https://github.com/php-fig/log", | |
1809 | + "keywords": [ | |
1810 | + "log", | |
1811 | + "psr", | |
1812 | + "psr-3" | |
1813 | + ], | |
1814 | + "time": "2016-10-10 12:19:37" | |
1815 | + }, | |
1816 | + { | |
1817 | + "name": "sebastian/code-unit-reverse-lookup", | |
1818 | + "version": "1.0.1", | |
1819 | + "source": { | |
1820 | + "type": "git", | |
1821 | + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", | |
1822 | + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" | |
1823 | + }, | |
1824 | + "dist": { | |
1825 | + "type": "zip", | |
1826 | + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", | |
1827 | + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", | |
1828 | + "shasum": "" | |
1829 | + }, | |
1830 | + "require": { | |
1831 | + "php": "^5.6 || ^7.0" | |
1832 | + }, | |
1833 | + "require-dev": { | |
1834 | + "phpunit/phpunit": "^5.7 || ^6.0" | |
1835 | + }, | |
1836 | + "type": "library", | |
1837 | + "extra": { | |
1838 | + "branch-alias": { | |
1839 | + "dev-master": "1.0.x-dev" | |
1840 | + } | |
1841 | + }, | |
1842 | + "autoload": { | |
1843 | + "classmap": [ | |
1844 | + "src/" | |
1845 | + ] | |
1846 | + }, | |
1847 | + "notification-url": "https://packagist.org/downloads/", | |
1848 | + "license": [ | |
1849 | + "BSD-3-Clause" | |
1850 | + ], | |
1851 | + "authors": [ | |
1852 | + { | |
1853 | + "name": "Sebastian Bergmann", | |
1854 | + "email": "sebastian@phpunit.de" | |
1855 | + } | |
1856 | + ], | |
1857 | + "description": "Looks up which function or method a line of code belongs to", | |
1858 | + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", | |
1859 | + "time": "2017-03-04 06:30:41" | |
1860 | + }, | |
1861 | + { | |
1862 | + "name": "sebastian/comparator", | |
1863 | + "version": "1.2.4", | |
1864 | + "source": { | |
1865 | + "type": "git", | |
1866 | + "url": "https://github.com/sebastianbergmann/comparator.git", | |
1867 | + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be" | |
1868 | + }, | |
1869 | + "dist": { | |
1870 | + "type": "zip", | |
1871 | + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", | |
1872 | + "reference": "2b7424b55f5047b47ac6e5ccb20b2aea4011d9be", | |
1873 | + "shasum": "" | |
1874 | + }, | |
1875 | + "require": { | |
1876 | + "php": ">=5.3.3", | |
1877 | + "sebastian/diff": "~1.2", | |
1878 | + "sebastian/exporter": "~1.2 || ~2.0" | |
1879 | + }, | |
1880 | + "require-dev": { | |
1881 | + "phpunit/phpunit": "~4.4" | |
1882 | + }, | |
1883 | + "type": "library", | |
1884 | + "extra": { | |
1885 | + "branch-alias": { | |
1886 | + "dev-master": "1.2.x-dev" | |
1887 | + } | |
1888 | + }, | |
1889 | + "autoload": { | |
1890 | + "classmap": [ | |
1891 | + "src/" | |
1892 | + ] | |
1893 | + }, | |
1894 | + "notification-url": "https://packagist.org/downloads/", | |
1895 | + "license": [ | |
1896 | + "BSD-3-Clause" | |
1897 | + ], | |
1898 | + "authors": [ | |
1899 | + { | |
1900 | + "name": "Jeff Welch", | |
1901 | + "email": "whatthejeff@gmail.com" | |
1902 | + }, | |
1903 | + { | |
1904 | + "name": "Volker Dusch", | |
1905 | + "email": "github@wallbash.com" | |
1906 | + }, | |
1907 | + { | |
1908 | + "name": "Bernhard Schussek", | |
1909 | + "email": "bschussek@2bepublished.at" | |
1910 | + }, | |
1911 | + { | |
1912 | + "name": "Sebastian Bergmann", | |
1913 | + "email": "sebastian@phpunit.de" | |
1914 | + } | |
1915 | + ], | |
1916 | + "description": "Provides the functionality to compare PHP values for equality", | |
1917 | + "homepage": "http://www.github.com/sebastianbergmann/comparator", | |
1918 | + "keywords": [ | |
1919 | + "comparator", | |
1920 | + "compare", | |
1921 | + "equality" | |
1922 | + ], | |
1923 | + "time": "2017-01-29 09:50:25" | |
1924 | + }, | |
1925 | + { | |
1926 | + "name": "sebastian/diff", | |
1927 | + "version": "1.4.1", | |
1928 | + "source": { | |
1929 | + "type": "git", | |
1930 | + "url": "https://github.com/sebastianbergmann/diff.git", | |
1931 | + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e" | |
1932 | + }, | |
1933 | + "dist": { | |
1934 | + "type": "zip", | |
1935 | + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/13edfd8706462032c2f52b4b862974dd46b71c9e", | |
1936 | + "reference": "13edfd8706462032c2f52b4b862974dd46b71c9e", | |
1937 | + "shasum": "" | |
1938 | + }, | |
1939 | + "require": { | |
1940 | + "php": ">=5.3.3" | |
1941 | + }, | |
1942 | + "require-dev": { | |
1943 | + "phpunit/phpunit": "~4.8" | |
1944 | + }, | |
1945 | + "type": "library", | |
1946 | + "extra": { | |
1947 | + "branch-alias": { | |
1948 | + "dev-master": "1.4-dev" | |
1949 | + } | |
1950 | + }, | |
1951 | + "autoload": { | |
1952 | + "classmap": [ | |
1953 | + "src/" | |
1954 | + ] | |
1955 | + }, | |
1956 | + "notification-url": "https://packagist.org/downloads/", | |
1957 | + "license": [ | |
1958 | + "BSD-3-Clause" | |
1959 | + ], | |
1960 | + "authors": [ | |
1961 | + { | |
1962 | + "name": "Kore Nordmann", | |
1963 | + "email": "mail@kore-nordmann.de" | |
1964 | + }, | |
1965 | + { | |
1966 | + "name": "Sebastian Bergmann", | |
1967 | + "email": "sebastian@phpunit.de" | |
1968 | + } | |
1969 | + ], | |
1970 | + "description": "Diff implementation", | |
1971 | + "homepage": "https://github.com/sebastianbergmann/diff", | |
1972 | + "keywords": [ | |
1973 | + "diff" | |
1974 | + ], | |
1975 | + "time": "2015-12-08 07:14:41" | |
1976 | + }, | |
1977 | + { | |
1978 | + "name": "sebastian/environment", | |
1979 | + "version": "2.0.0", | |
1980 | + "source": { | |
1981 | + "type": "git", | |
1982 | + "url": "https://github.com/sebastianbergmann/environment.git", | |
1983 | + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac" | |
1984 | + }, | |
1985 | + "dist": { | |
1986 | + "type": "zip", | |
1987 | + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/5795ffe5dc5b02460c3e34222fee8cbe245d8fac", | |
1988 | + "reference": "5795ffe5dc5b02460c3e34222fee8cbe245d8fac", | |
1989 | + "shasum": "" | |
1990 | + }, | |
1991 | + "require": { | |
1992 | + "php": "^5.6 || ^7.0" | |
1993 | + }, | |
1994 | + "require-dev": { | |
1995 | + "phpunit/phpunit": "^5.0" | |
1996 | + }, | |
1997 | + "type": "library", | |
1998 | + "extra": { | |
1999 | + "branch-alias": { | |
2000 | + "dev-master": "2.0.x-dev" | |
2001 | + } | |
2002 | + }, | |
2003 | + "autoload": { | |
2004 | + "classmap": [ | |
2005 | + "src/" | |
2006 | + ] | |
2007 | + }, | |
2008 | + "notification-url": "https://packagist.org/downloads/", | |
2009 | + "license": [ | |
2010 | + "BSD-3-Clause" | |
2011 | + ], | |
2012 | + "authors": [ | |
2013 | + { | |
2014 | + "name": "Sebastian Bergmann", | |
2015 | + "email": "sebastian@phpunit.de" | |
2016 | + } | |
2017 | + ], | |
2018 | + "description": "Provides functionality to handle HHVM/PHP environments", | |
2019 | + "homepage": "http://www.github.com/sebastianbergmann/environment", | |
2020 | + "keywords": [ | |
2021 | + "Xdebug", | |
2022 | + "environment", | |
2023 | + "hhvm" | |
2024 | + ], | |
2025 | + "time": "2016-11-26 07:53:53" | |
2026 | + }, | |
2027 | + { | |
2028 | + "name": "sebastian/exporter", | |
2029 | + "version": "2.0.0", | |
2030 | + "source": { | |
2031 | + "type": "git", | |
2032 | + "url": "https://github.com/sebastianbergmann/exporter.git", | |
2033 | + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4" | |
2034 | + }, | |
2035 | + "dist": { | |
2036 | + "type": "zip", | |
2037 | + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", | |
2038 | + "reference": "ce474bdd1a34744d7ac5d6aad3a46d48d9bac4c4", | |
2039 | + "shasum": "" | |
2040 | + }, | |
2041 | + "require": { | |
2042 | + "php": ">=5.3.3", | |
2043 | + "sebastian/recursion-context": "~2.0" | |
2044 | + }, | |
2045 | + "require-dev": { | |
2046 | + "ext-mbstring": "*", | |
2047 | + "phpunit/phpunit": "~4.4" | |
2048 | + }, | |
2049 | + "type": "library", | |
2050 | + "extra": { | |
2051 | + "branch-alias": { | |
2052 | + "dev-master": "2.0.x-dev" | |
2053 | + } | |
2054 | + }, | |
2055 | + "autoload": { | |
2056 | + "classmap": [ | |
2057 | + "src/" | |
2058 | + ] | |
2059 | + }, | |
2060 | + "notification-url": "https://packagist.org/downloads/", | |
2061 | + "license": [ | |
2062 | + "BSD-3-Clause" | |
2063 | + ], | |
2064 | + "authors": [ | |
2065 | + { | |
2066 | + "name": "Jeff Welch", | |
2067 | + "email": "whatthejeff@gmail.com" | |
2068 | + }, | |
2069 | + { | |
2070 | + "name": "Volker Dusch", | |
2071 | + "email": "github@wallbash.com" | |
2072 | + }, | |
2073 | + { | |
2074 | + "name": "Bernhard Schussek", | |
2075 | + "email": "bschussek@2bepublished.at" | |
2076 | + }, | |
2077 | + { | |
2078 | + "name": "Sebastian Bergmann", | |
2079 | + "email": "sebastian@phpunit.de" | |
2080 | + }, | |
2081 | + { | |
2082 | + "name": "Adam Harvey", | |
2083 | + "email": "aharvey@php.net" | |
2084 | + } | |
2085 | + ], | |
2086 | + "description": "Provides the functionality to export PHP variables for visualization", | |
2087 | + "homepage": "http://www.github.com/sebastianbergmann/exporter", | |
2088 | + "keywords": [ | |
2089 | + "export", | |
2090 | + "exporter" | |
2091 | + ], | |
2092 | + "time": "2016-11-19 08:54:04" | |
2093 | + }, | |
2094 | + { | |
2095 | + "name": "sebastian/global-state", | |
2096 | + "version": "1.1.1", | |
2097 | + "source": { | |
2098 | + "type": "git", | |
2099 | + "url": "https://github.com/sebastianbergmann/global-state.git", | |
2100 | + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4" | |
2101 | + }, | |
2102 | + "dist": { | |
2103 | + "type": "zip", | |
2104 | + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/bc37d50fea7d017d3d340f230811c9f1d7280af4", | |
2105 | + "reference": "bc37d50fea7d017d3d340f230811c9f1d7280af4", | |
2106 | + "shasum": "" | |
2107 | + }, | |
2108 | + "require": { | |
2109 | + "php": ">=5.3.3" | |
2110 | + }, | |
2111 | + "require-dev": { | |
2112 | + "phpunit/phpunit": "~4.2" | |
2113 | + }, | |
2114 | + "suggest": { | |
2115 | + "ext-uopz": "*" | |
2116 | + }, | |
2117 | + "type": "library", | |
2118 | + "extra": { | |
2119 | + "branch-alias": { | |
2120 | + "dev-master": "1.0-dev" | |
2121 | + } | |
2122 | + }, | |
2123 | + "autoload": { | |
2124 | + "classmap": [ | |
2125 | + "src/" | |
2126 | + ] | |
2127 | + }, | |
2128 | + "notification-url": "https://packagist.org/downloads/", | |
2129 | + "license": [ | |
2130 | + "BSD-3-Clause" | |
2131 | + ], | |
2132 | + "authors": [ | |
2133 | + { | |
2134 | + "name": "Sebastian Bergmann", | |
2135 | + "email": "sebastian@phpunit.de" | |
2136 | + } | |
2137 | + ], | |
2138 | + "description": "Snapshotting of global state", | |
2139 | + "homepage": "http://www.github.com/sebastianbergmann/global-state", | |
2140 | + "keywords": [ | |
2141 | + "global state" | |
2142 | + ], | |
2143 | + "time": "2015-10-12 03:26:01" | |
2144 | + }, | |
2145 | + { | |
2146 | + "name": "sebastian/object-enumerator", | |
2147 | + "version": "2.0.1", | |
2148 | + "source": { | |
2149 | + "type": "git", | |
2150 | + "url": "https://github.com/sebastianbergmann/object-enumerator.git", | |
2151 | + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7" | |
2152 | + }, | |
2153 | + "dist": { | |
2154 | + "type": "zip", | |
2155 | + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/1311872ac850040a79c3c058bea3e22d0f09cbb7", | |
2156 | + "reference": "1311872ac850040a79c3c058bea3e22d0f09cbb7", | |
2157 | + "shasum": "" | |
2158 | + }, | |
2159 | + "require": { | |
2160 | + "php": ">=5.6", | |
2161 | + "sebastian/recursion-context": "~2.0" | |
2162 | + }, | |
2163 | + "require-dev": { | |
2164 | + "phpunit/phpunit": "~5" | |
2165 | + }, | |
2166 | + "type": "library", | |
2167 | + "extra": { | |
2168 | + "branch-alias": { | |
2169 | + "dev-master": "2.0.x-dev" | |
2170 | + } | |
2171 | + }, | |
2172 | + "autoload": { | |
2173 | + "classmap": [ | |
2174 | + "src/" | |
2175 | + ] | |
2176 | + }, | |
2177 | + "notification-url": "https://packagist.org/downloads/", | |
2178 | + "license": [ | |
2179 | + "BSD-3-Clause" | |
2180 | + ], | |
2181 | + "authors": [ | |
2182 | + { | |
2183 | + "name": "Sebastian Bergmann", | |
2184 | + "email": "sebastian@phpunit.de" | |
2185 | + } | |
2186 | + ], | |
2187 | + "description": "Traverses array structures and object graphs to enumerate all referenced objects", | |
2188 | + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", | |
2189 | + "time": "2017-02-18 15:18:39" | |
2190 | + }, | |
2191 | + { | |
2192 | + "name": "sebastian/recursion-context", | |
2193 | + "version": "2.0.0", | |
2194 | + "source": { | |
2195 | + "type": "git", | |
2196 | + "url": "https://github.com/sebastianbergmann/recursion-context.git", | |
2197 | + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a" | |
2198 | + }, | |
2199 | + "dist": { | |
2200 | + "type": "zip", | |
2201 | + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/2c3ba150cbec723aa057506e73a8d33bdb286c9a", | |
2202 | + "reference": "2c3ba150cbec723aa057506e73a8d33bdb286c9a", | |
2203 | + "shasum": "" | |
2204 | + }, | |
2205 | + "require": { | |
2206 | + "php": ">=5.3.3" | |
2207 | + }, | |
2208 | + "require-dev": { | |
2209 | + "phpunit/phpunit": "~4.4" | |
2210 | + }, | |
2211 | + "type": "library", | |
2212 | + "extra": { | |
2213 | + "branch-alias": { | |
2214 | + "dev-master": "2.0.x-dev" | |
2215 | + } | |
2216 | + }, | |
2217 | + "autoload": { | |
2218 | + "classmap": [ | |
2219 | + "src/" | |
2220 | + ] | |
2221 | + }, | |
2222 | + "notification-url": "https://packagist.org/downloads/", | |
2223 | + "license": [ | |
2224 | + "BSD-3-Clause" | |
2225 | + ], | |
2226 | + "authors": [ | |
2227 | + { | |
2228 | + "name": "Jeff Welch", | |
2229 | + "email": "whatthejeff@gmail.com" | |
2230 | + }, | |
2231 | + { | |
2232 | + "name": "Sebastian Bergmann", | |
2233 | + "email": "sebastian@phpunit.de" | |
2234 | + }, | |
2235 | + { | |
2236 | + "name": "Adam Harvey", | |
2237 | + "email": "aharvey@php.net" | |
2238 | + } | |
2239 | + ], | |
2240 | + "description": "Provides functionality to recursively process PHP variables", | |
2241 | + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", | |
2242 | + "time": "2016-11-19 07:33:16" | |
2243 | + }, | |
2244 | + { | |
2245 | + "name": "sebastian/resource-operations", | |
2246 | + "version": "1.0.0", | |
2247 | + "source": { | |
2248 | + "type": "git", | |
2249 | + "url": "https://github.com/sebastianbergmann/resource-operations.git", | |
2250 | + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" | |
2251 | + }, | |
2252 | + "dist": { | |
2253 | + "type": "zip", | |
2254 | + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", | |
2255 | + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", | |
2256 | + "shasum": "" | |
2257 | + }, | |
2258 | + "require": { | |
2259 | + "php": ">=5.6.0" | |
2260 | + }, | |
2261 | + "type": "library", | |
2262 | + "extra": { | |
2263 | + "branch-alias": { | |
2264 | + "dev-master": "1.0.x-dev" | |
2265 | + } | |
2266 | + }, | |
2267 | + "autoload": { | |
2268 | + "classmap": [ | |
2269 | + "src/" | |
2270 | + ] | |
2271 | + }, | |
2272 | + "notification-url": "https://packagist.org/downloads/", | |
2273 | + "license": [ | |
2274 | + "BSD-3-Clause" | |
2275 | + ], | |
2276 | + "authors": [ | |
2277 | + { | |
2278 | + "name": "Sebastian Bergmann", | |
2279 | + "email": "sebastian@phpunit.de" | |
2280 | + } | |
2281 | + ], | |
2282 | + "description": "Provides a list of PHP built-in functions that operate on resources", | |
2283 | + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", | |
2284 | + "time": "2015-07-28 20:34:47" | |
2285 | + }, | |
2286 | + { | |
2287 | + "name": "sebastian/version", | |
2288 | + "version": "2.0.1", | |
2289 | + "source": { | |
2290 | + "type": "git", | |
2291 | + "url": "https://github.com/sebastianbergmann/version.git", | |
2292 | + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" | |
2293 | + }, | |
2294 | + "dist": { | |
2295 | + "type": "zip", | |
2296 | + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", | |
2297 | + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", | |
2298 | + "shasum": "" | |
2299 | + }, | |
2300 | + "require": { | |
2301 | + "php": ">=5.6" | |
2302 | + }, | |
2303 | + "type": "library", | |
2304 | + "extra": { | |
2305 | + "branch-alias": { | |
2306 | + "dev-master": "2.0.x-dev" | |
2307 | + } | |
2308 | + }, | |
2309 | + "autoload": { | |
2310 | + "classmap": [ | |
2311 | + "src/" | |
2312 | + ] | |
2313 | + }, | |
2314 | + "notification-url": "https://packagist.org/downloads/", | |
2315 | + "license": [ | |
2316 | + "BSD-3-Clause" | |
2317 | + ], | |
2318 | + "authors": [ | |
2319 | + { | |
2320 | + "name": "Sebastian Bergmann", | |
2321 | + "email": "sebastian@phpunit.de", | |
2322 | + "role": "lead" | |
2323 | + } | |
2324 | + ], | |
2325 | + "description": "Library that helps with managing the version number of Git-hosted PHP projects", | |
2326 | + "homepage": "https://github.com/sebastianbergmann/version", | |
2327 | + "time": "2016-10-03 07:35:21" | |
2328 | + }, | |
2329 | + { | |
2330 | + "name": "symfony/browser-kit", | |
2331 | + "version": "v3.2.4", | |
2332 | + "source": { | |
2333 | + "type": "git", | |
2334 | + "url": "https://github.com/symfony/browser-kit.git", | |
2335 | + "reference": "394a2475a3a89089353fde5714a7f402fbb83880" | |
2336 | + }, | |
2337 | + "dist": { | |
2338 | + "type": "zip", | |
2339 | + "url": "https://api.github.com/repos/symfony/browser-kit/zipball/394a2475a3a89089353fde5714a7f402fbb83880", | |
2340 | + "reference": "394a2475a3a89089353fde5714a7f402fbb83880", | |
2341 | + "shasum": "" | |
2342 | + }, | |
2343 | + "require": { | |
2344 | + "php": ">=5.5.9", | |
2345 | + "symfony/dom-crawler": "~2.8|~3.0" | |
2346 | + }, | |
2347 | + "require-dev": { | |
2348 | + "symfony/css-selector": "~2.8|~3.0", | |
2349 | + "symfony/process": "~2.8|~3.0" | |
2350 | + }, | |
2351 | + "suggest": { | |
2352 | + "symfony/process": "" | |
2353 | + }, | |
2354 | + "type": "library", | |
2355 | + "extra": { | |
2356 | + "branch-alias": { | |
2357 | + "dev-master": "3.2-dev" | |
2358 | + } | |
2359 | + }, | |
2360 | + "autoload": { | |
2361 | + "psr-4": { | |
2362 | + "Symfony\\Component\\BrowserKit\\": "" | |
2363 | + }, | |
2364 | + "exclude-from-classmap": [ | |
2365 | + "/Tests/" | |
2366 | + ] | |
2367 | + }, | |
2368 | + "notification-url": "https://packagist.org/downloads/", | |
2369 | + "license": [ | |
2370 | + "MIT" | |
2371 | + ], | |
2372 | + "authors": [ | |
2373 | + { | |
2374 | + "name": "Fabien Potencier", | |
2375 | + "email": "fabien@symfony.com" | |
2376 | + }, | |
2377 | + { | |
2378 | + "name": "Symfony Community", | |
2379 | + "homepage": "https://symfony.com/contributors" | |
2380 | + } | |
2381 | + ], | |
2382 | + "description": "Symfony BrowserKit Component", | |
2383 | + "homepage": "https://symfony.com", | |
2384 | + "time": "2017-01-31 21:49:23" | |
2385 | + }, | |
2386 | + { | |
2387 | + "name": "symfony/console", | |
2388 | + "version": "v3.2.4", | |
2389 | + "source": { | |
2390 | + "type": "git", | |
2391 | + "url": "https://github.com/symfony/console.git", | |
2392 | + "reference": "0e5e6899f82230fcb1153bcaf0e106ffaa44b870" | |
2393 | + }, | |
2394 | + "dist": { | |
2395 | + "type": "zip", | |
2396 | + "url": "https://api.github.com/repos/symfony/console/zipball/0e5e6899f82230fcb1153bcaf0e106ffaa44b870", | |
2397 | + "reference": "0e5e6899f82230fcb1153bcaf0e106ffaa44b870", | |
2398 | + "shasum": "" | |
2399 | + }, | |
2400 | + "require": { | |
2401 | + "php": ">=5.5.9", | |
2402 | + "symfony/debug": "~2.8|~3.0", | |
2403 | + "symfony/polyfill-mbstring": "~1.0" | |
2404 | + }, | |
2405 | + "require-dev": { | |
2406 | + "psr/log": "~1.0", | |
2407 | + "symfony/event-dispatcher": "~2.8|~3.0", | |
2408 | + "symfony/filesystem": "~2.8|~3.0", | |
2409 | + "symfony/process": "~2.8|~3.0" | |
2410 | + }, | |
2411 | + "suggest": { | |
2412 | + "psr/log": "For using the console logger", | |
2413 | + "symfony/event-dispatcher": "", | |
2414 | + "symfony/filesystem": "", | |
2415 | + "symfony/process": "" | |
2416 | + }, | |
2417 | + "type": "library", | |
2418 | + "extra": { | |
2419 | + "branch-alias": { | |
2420 | + "dev-master": "3.2-dev" | |
2421 | + } | |
2422 | + }, | |
2423 | + "autoload": { | |
2424 | + "psr-4": { | |
2425 | + "Symfony\\Component\\Console\\": "" | |
2426 | + }, | |
2427 | + "exclude-from-classmap": [ | |
2428 | + "/Tests/" | |
2429 | + ] | |
2430 | + }, | |
2431 | + "notification-url": "https://packagist.org/downloads/", | |
2432 | + "license": [ | |
2433 | + "MIT" | |
2434 | + ], | |
2435 | + "authors": [ | |
2436 | + { | |
2437 | + "name": "Fabien Potencier", | |
2438 | + "email": "fabien@symfony.com" | |
2439 | + }, | |
2440 | + { | |
2441 | + "name": "Symfony Community", | |
2442 | + "homepage": "https://symfony.com/contributors" | |
2443 | + } | |
2444 | + ], | |
2445 | + "description": "Symfony Console Component", | |
2446 | + "homepage": "https://symfony.com", | |
2447 | + "time": "2017-02-16 14:07:22" | |
2448 | + }, | |
2449 | + { | |
2450 | + "name": "symfony/css-selector", | |
2451 | + "version": "v3.2.4", | |
2452 | + "source": { | |
2453 | + "type": "git", | |
2454 | + "url": "https://github.com/symfony/css-selector.git", | |
2455 | + "reference": "f0e628f04fc055c934b3211cfabdb1c59eefbfaa" | |
2456 | + }, | |
2457 | + "dist": { | |
2458 | + "type": "zip", | |
2459 | + "url": "https://api.github.com/repos/symfony/css-selector/zipball/f0e628f04fc055c934b3211cfabdb1c59eefbfaa", | |
2460 | + "reference": "f0e628f04fc055c934b3211cfabdb1c59eefbfaa", | |
2461 | + "shasum": "" | |
2462 | + }, | |
2463 | + "require": { | |
2464 | + "php": ">=5.5.9" | |
2465 | + }, | |
2466 | + "type": "library", | |
2467 | + "extra": { | |
2468 | + "branch-alias": { | |
2469 | + "dev-master": "3.2-dev" | |
2470 | + } | |
2471 | + }, | |
2472 | + "autoload": { | |
2473 | + "psr-4": { | |
2474 | + "Symfony\\Component\\CssSelector\\": "" | |
2475 | + }, | |
2476 | + "exclude-from-classmap": [ | |
2477 | + "/Tests/" | |
2478 | + ] | |
2479 | + }, | |
2480 | + "notification-url": "https://packagist.org/downloads/", | |
2481 | + "license": [ | |
2482 | + "MIT" | |
2483 | + ], | |
2484 | + "authors": [ | |
2485 | + { | |
2486 | + "name": "Jean-Franรงois Simon", | |
2487 | + "email": "jeanfrancois.simon@sensiolabs.com" | |
2488 | + }, | |
2489 | + { | |
2490 | + "name": "Fabien Potencier", | |
2491 | + "email": "fabien@symfony.com" | |
2492 | + }, | |
2493 | + { | |
2494 | + "name": "Symfony Community", | |
2495 | + "homepage": "https://symfony.com/contributors" | |
2496 | + } | |
2497 | + ], | |
2498 | + "description": "Symfony CssSelector Component", | |
2499 | + "homepage": "https://symfony.com", | |
2500 | + "time": "2017-01-02 20:32:22" | |
2501 | + }, | |
2502 | + { | |
2503 | + "name": "symfony/debug", | |
2504 | + "version": "v3.2.4", | |
2505 | + "source": { | |
2506 | + "type": "git", | |
2507 | + "url": "https://github.com/symfony/debug.git", | |
2508 | + "reference": "9b98854cb45bc59d100b7d4cc4cf9e05f21026b9" | |
2509 | + }, | |
2510 | + "dist": { | |
2511 | + "type": "zip", | |
2512 | + "url": "https://api.github.com/repos/symfony/debug/zipball/9b98854cb45bc59d100b7d4cc4cf9e05f21026b9", | |
2513 | + "reference": "9b98854cb45bc59d100b7d4cc4cf9e05f21026b9", | |
2514 | + "shasum": "" | |
2515 | + }, | |
2516 | + "require": { | |
2517 | + "php": ">=5.5.9", | |
2518 | + "psr/log": "~1.0" | |
2519 | + }, | |
2520 | + "conflict": { | |
2521 | + "symfony/http-kernel": ">=2.3,<2.3.24|~2.4.0|>=2.5,<2.5.9|>=2.6,<2.6.2" | |
2522 | + }, | |
2523 | + "require-dev": { | |
2524 | + "symfony/class-loader": "~2.8|~3.0", | |
2525 | + "symfony/http-kernel": "~2.8|~3.0" | |
2526 | + }, | |
2527 | + "type": "library", | |
2528 | + "extra": { | |
2529 | + "branch-alias": { | |
2530 | + "dev-master": "3.2-dev" | |
2531 | + } | |
2532 | + }, | |
2533 | + "autoload": { | |
2534 | + "psr-4": { | |
2535 | + "Symfony\\Component\\Debug\\": "" | |
2536 | + }, | |
2537 | + "exclude-from-classmap": [ | |
2538 | + "/Tests/" | |
2539 | + ] | |
2540 | + }, | |
2541 | + "notification-url": "https://packagist.org/downloads/", | |
2542 | + "license": [ | |
2543 | + "MIT" | |
2544 | + ], | |
2545 | + "authors": [ | |
2546 | + { | |
2547 | + "name": "Fabien Potencier", | |
2548 | + "email": "fabien@symfony.com" | |
2549 | + }, | |
2550 | + { | |
2551 | + "name": "Symfony Community", | |
2552 | + "homepage": "https://symfony.com/contributors" | |
2553 | + } | |
2554 | + ], | |
2555 | + "description": "Symfony Debug Component", | |
2556 | + "homepage": "https://symfony.com", | |
2557 | + "time": "2017-02-16 16:34:18" | |
2558 | + }, | |
2559 | + { | |
2560 | + "name": "symfony/dom-crawler", | |
2561 | + "version": "v3.2.4", | |
2562 | + "source": { | |
2563 | + "type": "git", | |
2564 | + "url": "https://github.com/symfony/dom-crawler.git", | |
2565 | + "reference": "b814b41373fc4e535aff8c765abe39545216f391" | |
2566 | + }, | |
2567 | + "dist": { | |
2568 | + "type": "zip", | |
2569 | + "url": "https://api.github.com/repos/symfony/dom-crawler/zipball/b814b41373fc4e535aff8c765abe39545216f391", | |
2570 | + "reference": "b814b41373fc4e535aff8c765abe39545216f391", | |
2571 | + "shasum": "" | |
2572 | + }, | |
2573 | + "require": { | |
2574 | + "php": ">=5.5.9", | |
2575 | + "symfony/polyfill-mbstring": "~1.0" | |
2576 | + }, | |
2577 | + "require-dev": { | |
2578 | + "symfony/css-selector": "~2.8|~3.0" | |
2579 | + }, | |
2580 | + "suggest": { | |
2581 | + "symfony/css-selector": "" | |
2582 | + }, | |
2583 | + "type": "library", | |
2584 | + "extra": { | |
2585 | + "branch-alias": { | |
2586 | + "dev-master": "3.2-dev" | |
2587 | + } | |
2588 | + }, | |
2589 | + "autoload": { | |
2590 | + "psr-4": { | |
2591 | + "Symfony\\Component\\DomCrawler\\": "" | |
2592 | + }, | |
2593 | + "exclude-from-classmap": [ | |
2594 | + "/Tests/" | |
2595 | + ] | |
2596 | + }, | |
2597 | + "notification-url": "https://packagist.org/downloads/", | |
2598 | + "license": [ | |
2599 | + "MIT" | |
2600 | + ], | |
2601 | + "authors": [ | |
2602 | + { | |
2603 | + "name": "Fabien Potencier", | |
2604 | + "email": "fabien@symfony.com" | |
2605 | + }, | |
2606 | + { | |
2607 | + "name": "Symfony Community", | |
2608 | + "homepage": "https://symfony.com/contributors" | |
2609 | + } | |
2610 | + ], | |
2611 | + "description": "Symfony DomCrawler Component", | |
2612 | + "homepage": "https://symfony.com", | |
2613 | + "time": "2017-01-21 17:14:11" | |
2614 | + }, | |
2615 | + { | |
2616 | + "name": "symfony/event-dispatcher", | |
2617 | + "version": "v3.2.4", | |
2618 | + "source": { | |
2619 | + "type": "git", | |
2620 | + "url": "https://github.com/symfony/event-dispatcher.git", | |
2621 | + "reference": "9137eb3a3328e413212826d63eeeb0217836e2b6" | |
2622 | + }, | |
2623 | + "dist": { | |
2624 | + "type": "zip", | |
2625 | + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/9137eb3a3328e413212826d63eeeb0217836e2b6", | |
2626 | + "reference": "9137eb3a3328e413212826d63eeeb0217836e2b6", | |
2627 | + "shasum": "" | |
2628 | + }, | |
2629 | + "require": { | |
2630 | + "php": ">=5.5.9" | |
2631 | + }, | |
2632 | + "require-dev": { | |
2633 | + "psr/log": "~1.0", | |
2634 | + "symfony/config": "~2.8|~3.0", | |
2635 | + "symfony/dependency-injection": "~2.8|~3.0", | |
2636 | + "symfony/expression-language": "~2.8|~3.0", | |
2637 | + "symfony/stopwatch": "~2.8|~3.0" | |
2638 | + }, | |
2639 | + "suggest": { | |
2640 | + "symfony/dependency-injection": "", | |
2641 | + "symfony/http-kernel": "" | |
2642 | + }, | |
2643 | + "type": "library", | |
2644 | + "extra": { | |
2645 | + "branch-alias": { | |
2646 | + "dev-master": "3.2-dev" | |
2647 | + } | |
2648 | + }, | |
2649 | + "autoload": { | |
2650 | + "psr-4": { | |
2651 | + "Symfony\\Component\\EventDispatcher\\": "" | |
2652 | + }, | |
2653 | + "exclude-from-classmap": [ | |
2654 | + "/Tests/" | |
2655 | + ] | |
2656 | + }, | |
2657 | + "notification-url": "https://packagist.org/downloads/", | |
2658 | + "license": [ | |
2659 | + "MIT" | |
2660 | + ], | |
2661 | + "authors": [ | |
2662 | + { | |
2663 | + "name": "Fabien Potencier", | |
2664 | + "email": "fabien@symfony.com" | |
2665 | + }, | |
2666 | + { | |
2667 | + "name": "Symfony Community", | |
2668 | + "homepage": "https://symfony.com/contributors" | |
2669 | + } | |
2670 | + ], | |
2671 | + "description": "Symfony EventDispatcher Component", | |
2672 | + "homepage": "https://symfony.com", | |
2673 | + "time": "2017-01-02 20:32:22" | |
2674 | + }, | |
2675 | + { | |
2676 | + "name": "symfony/finder", | |
2677 | + "version": "v3.2.4", | |
2678 | + "source": { | |
2679 | + "type": "git", | |
2680 | + "url": "https://github.com/symfony/finder.git", | |
2681 | + "reference": "8c71141cae8e2957946b403cc71a67213c0380d6" | |
2682 | + }, | |
2683 | + "dist": { | |
2684 | + "type": "zip", | |
2685 | + "url": "https://api.github.com/repos/symfony/finder/zipball/8c71141cae8e2957946b403cc71a67213c0380d6", | |
2686 | + "reference": "8c71141cae8e2957946b403cc71a67213c0380d6", | |
2687 | + "shasum": "" | |
2688 | + }, | |
2689 | + "require": { | |
2690 | + "php": ">=5.5.9" | |
2691 | + }, | |
2692 | + "type": "library", | |
2693 | + "extra": { | |
2694 | + "branch-alias": { | |
2695 | + "dev-master": "3.2-dev" | |
2696 | + } | |
2697 | + }, | |
2698 | + "autoload": { | |
2699 | + "psr-4": { | |
2700 | + "Symfony\\Component\\Finder\\": "" | |
2701 | + }, | |
2702 | + "exclude-from-classmap": [ | |
2703 | + "/Tests/" | |
2704 | + ] | |
2705 | + }, | |
2706 | + "notification-url": "https://packagist.org/downloads/", | |
2707 | + "license": [ | |
2708 | + "MIT" | |
2709 | + ], | |
2710 | + "authors": [ | |
2711 | + { | |
2712 | + "name": "Fabien Potencier", | |
2713 | + "email": "fabien@symfony.com" | |
2714 | + }, | |
2715 | + { | |
2716 | + "name": "Symfony Community", | |
2717 | + "homepage": "https://symfony.com/contributors" | |
2718 | + } | |
2719 | + ], | |
2720 | + "description": "Symfony Finder Component", | |
2721 | + "homepage": "https://symfony.com", | |
2722 | + "time": "2017-01-02 20:32:22" | |
2723 | + }, | |
2724 | + { | |
2725 | + "name": "symfony/polyfill-mbstring", | |
2726 | + "version": "v1.3.0", | |
2727 | + "source": { | |
2728 | + "type": "git", | |
2729 | + "url": "https://github.com/symfony/polyfill-mbstring.git", | |
2730 | + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4" | |
2731 | + }, | |
2732 | + "dist": { | |
2733 | + "type": "zip", | |
2734 | + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/e79d363049d1c2128f133a2667e4f4190904f7f4", | |
2735 | + "reference": "e79d363049d1c2128f133a2667e4f4190904f7f4", | |
2736 | + "shasum": "" | |
2737 | + }, | |
2738 | + "require": { | |
2739 | + "php": ">=5.3.3" | |
2740 | + }, | |
2741 | + "suggest": { | |
2742 | + "ext-mbstring": "For best performance" | |
2743 | + }, | |
2744 | + "type": "library", | |
2745 | + "extra": { | |
2746 | + "branch-alias": { | |
2747 | + "dev-master": "1.3-dev" | |
2748 | + } | |
2749 | + }, | |
2750 | + "autoload": { | |
2751 | + "psr-4": { | |
2752 | + "Symfony\\Polyfill\\Mbstring\\": "" | |
2753 | + }, | |
2754 | + "files": [ | |
2755 | + "bootstrap.php" | |
2756 | + ] | |
2757 | + }, | |
2758 | + "notification-url": "https://packagist.org/downloads/", | |
2759 | + "license": [ | |
2760 | + "MIT" | |
2761 | + ], | |
2762 | + "authors": [ | |
2763 | + { | |
2764 | + "name": "Nicolas Grekas", | |
2765 | + "email": "p@tchwork.com" | |
2766 | + }, | |
2767 | + { | |
2768 | + "name": "Symfony Community", | |
2769 | + "homepage": "https://symfony.com/contributors" | |
2770 | + } | |
2771 | + ], | |
2772 | + "description": "Symfony polyfill for the Mbstring extension", | |
2773 | + "homepage": "https://symfony.com", | |
2774 | + "keywords": [ | |
2775 | + "compatibility", | |
2776 | + "mbstring", | |
2777 | + "polyfill", | |
2778 | + "portable", | |
2779 | + "shim" | |
2780 | + ], | |
2781 | + "time": "2016-11-14 01:06:16" | |
2782 | + }, | |
2783 | + { | |
2784 | + "name": "symfony/yaml", | |
2785 | + "version": "v3.2.4", | |
2786 | + "source": { | |
2787 | + "type": "git", | |
2788 | + "url": "https://github.com/symfony/yaml.git", | |
2789 | + "reference": "9724c684646fcb5387d579b4bfaa63ee0b0c64c8" | |
2790 | + }, | |
2791 | + "dist": { | |
2792 | + "type": "zip", | |
2793 | + "url": "https://api.github.com/repos/symfony/yaml/zipball/9724c684646fcb5387d579b4bfaa63ee0b0c64c8", | |
2794 | + "reference": "9724c684646fcb5387d579b4bfaa63ee0b0c64c8", | |
2795 | + "shasum": "" | |
2796 | + }, | |
2797 | + "require": { | |
2798 | + "php": ">=5.5.9" | |
2799 | + }, | |
2800 | + "require-dev": { | |
2801 | + "symfony/console": "~2.8|~3.0" | |
2802 | + }, | |
2803 | + "suggest": { | |
2804 | + "symfony/console": "For validating YAML files using the lint command" | |
2805 | + }, | |
2806 | + "type": "library", | |
2807 | + "extra": { | |
2808 | + "branch-alias": { | |
2809 | + "dev-master": "3.2-dev" | |
2810 | + } | |
2811 | + }, | |
2812 | + "autoload": { | |
2813 | + "psr-4": { | |
2814 | + "Symfony\\Component\\Yaml\\": "" | |
2815 | + }, | |
2816 | + "exclude-from-classmap": [ | |
2817 | + "/Tests/" | |
2818 | + ] | |
2819 | + }, | |
2820 | + "notification-url": "https://packagist.org/downloads/", | |
2821 | + "license": [ | |
2822 | + "MIT" | |
2823 | + ], | |
2824 | + "authors": [ | |
2825 | + { | |
2826 | + "name": "Fabien Potencier", | |
2827 | + "email": "fabien@symfony.com" | |
2828 | + }, | |
2829 | + { | |
2830 | + "name": "Symfony Community", | |
2831 | + "homepage": "https://symfony.com/contributors" | |
2832 | + } | |
2833 | + ], | |
2834 | + "description": "Symfony Yaml Component", | |
2835 | + "homepage": "https://symfony.com", | |
2836 | + "time": "2017-02-16 22:46:52" | |
2837 | + }, | |
2838 | + { | |
2839 | + "name": "webmozart/assert", | |
2840 | + "version": "1.2.0", | |
2841 | + "source": { | |
2842 | + "type": "git", | |
2843 | + "url": "https://github.com/webmozart/assert.git", | |
2844 | + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f" | |
2845 | + }, | |
2846 | + "dist": { | |
2847 | + "type": "zip", | |
2848 | + "url": "https://api.github.com/repos/webmozart/assert/zipball/2db61e59ff05fe5126d152bd0655c9ea113e550f", | |
2849 | + "reference": "2db61e59ff05fe5126d152bd0655c9ea113e550f", | |
2850 | + "shasum": "" | |
2851 | + }, | |
2852 | + "require": { | |
2853 | + "php": "^5.3.3 || ^7.0" | |
2854 | + }, | |
2855 | + "require-dev": { | |
2856 | + "phpunit/phpunit": "^4.6", | |
2857 | + "sebastian/version": "^1.0.1" | |
2858 | + }, | |
2859 | + "type": "library", | |
2860 | + "extra": { | |
2861 | + "branch-alias": { | |
2862 | + "dev-master": "1.3-dev" | |
2863 | + } | |
2864 | + }, | |
2865 | + "autoload": { | |
2866 | + "psr-4": { | |
2867 | + "Webmozart\\Assert\\": "src/" | |
2868 | + } | |
2869 | + }, | |
2870 | + "notification-url": "https://packagist.org/downloads/", | |
2871 | + "license": [ | |
2872 | + "MIT" | |
2873 | + ], | |
2874 | + "authors": [ | |
2875 | + { | |
2876 | + "name": "Bernhard Schussek", | |
2877 | + "email": "bschussek@gmail.com" | |
2878 | + } | |
2879 | + ], | |
2880 | + "description": "Assertions to validate method input/output with nice error messages.", | |
2881 | + "keywords": [ | |
2882 | + "assert", | |
2883 | + "check", | |
2884 | + "validate" | |
2885 | + ], | |
2886 | + "time": "2016-11-23 20:04:58" | |
2887 | + }, | |
2888 | + { | |
2889 | + "name": "yiisoft/yii2-debug", | |
2890 | + "version": "2.0.9", | |
2891 | + "source": { | |
2892 | + "type": "git", | |
2893 | + "url": "https://github.com/yiisoft/yii2-debug.git", | |
2894 | + "reference": "647be6c9d48dc2f3c2e2f33b9eba0a4ca78abde9" | |
2895 | + }, | |
2896 | + "dist": { | |
2897 | + "type": "zip", | |
2898 | + "url": "https://api.github.com/repos/yiisoft/yii2-debug/zipball/647be6c9d48dc2f3c2e2f33b9eba0a4ca78abde9", | |
2899 | + "reference": "647be6c9d48dc2f3c2e2f33b9eba0a4ca78abde9", | |
2900 | + "shasum": "" | |
2901 | + }, | |
2902 | + "require": { | |
2903 | + "yiisoft/yii2": "~2.0.11", | |
2904 | + "yiisoft/yii2-bootstrap": "~2.0.0" | |
2905 | + }, | |
2906 | + "type": "yii2-extension", | |
2907 | + "extra": { | |
2908 | + "branch-alias": { | |
2909 | + "dev-master": "2.0.x-dev" | |
2910 | + } | |
2911 | + }, | |
2912 | + "autoload": { | |
2913 | + "psr-4": { | |
2914 | + "yii\\debug\\": "" | |
2915 | + } | |
2916 | + }, | |
2917 | + "notification-url": "https://packagist.org/downloads/", | |
2918 | + "license": [ | |
2919 | + "BSD-3-Clause" | |
2920 | + ], | |
2921 | + "authors": [ | |
2922 | + { | |
2923 | + "name": "Qiang Xue", | |
2924 | + "email": "qiang.xue@gmail.com" | |
2925 | + } | |
2926 | + ], | |
2927 | + "description": "The debugger extension for the Yii framework", | |
2928 | + "keywords": [ | |
2929 | + "debug", | |
2930 | + "debugger", | |
2931 | + "yii2" | |
2932 | + ], | |
2933 | + "time": "2017-02-21 10:30:50" | |
2934 | + }, | |
2935 | + { | |
2936 | + "name": "yiisoft/yii2-faker", | |
2937 | + "version": "2.0.3", | |
2938 | + "source": { | |
2939 | + "type": "git", | |
2940 | + "url": "https://github.com/yiisoft/yii2-faker.git", | |
2941 | + "reference": "b88ca69ee226a3610b2c26c026c3203d7ac50f6c" | |
2942 | + }, | |
2943 | + "dist": { | |
2944 | + "type": "zip", | |
2945 | + "url": "https://api.github.com/repos/yiisoft/yii2-faker/zipball/b88ca69ee226a3610b2c26c026c3203d7ac50f6c", | |
2946 | + "reference": "b88ca69ee226a3610b2c26c026c3203d7ac50f6c", | |
2947 | + "shasum": "" | |
2948 | + }, | |
2949 | + "require": { | |
2950 | + "fzaninotto/faker": "*", | |
2951 | + "yiisoft/yii2": "*" | |
2952 | + }, | |
2953 | + "type": "yii2-extension", | |
2954 | + "extra": { | |
2955 | + "branch-alias": { | |
2956 | + "dev-master": "2.0.x-dev" | |
2957 | + } | |
2958 | + }, | |
2959 | + "autoload": { | |
2960 | + "psr-4": { | |
2961 | + "yii\\faker\\": "" | |
2962 | + } | |
2963 | + }, | |
2964 | + "notification-url": "https://packagist.org/downloads/", | |
2965 | + "license": [ | |
2966 | + "BSD-3-Clause" | |
2967 | + ], | |
2968 | + "authors": [ | |
2969 | + { | |
2970 | + "name": "Mark Jebri", | |
2971 | + "email": "mark.github@yandex.ru" | |
2972 | + } | |
2973 | + ], | |
2974 | + "description": "Fixture generator. The Faker integration for the Yii framework.", | |
2975 | + "keywords": [ | |
2976 | + "Fixture", | |
2977 | + "faker", | |
2978 | + "yii2" | |
2979 | + ], | |
2980 | + "time": "2015-03-01 06:22:44" | |
2981 | + }, | |
2982 | + { | |
2983 | + "name": "yiisoft/yii2-gii", | |
2984 | + "version": "2.0.5", | |
2985 | + "source": { | |
2986 | + "type": "git", | |
2987 | + "url": "https://github.com/yiisoft/yii2-gii.git", | |
2988 | + "reference": "1bd6df6804ca077ec022587905a0d43eb286f507" | |
2989 | + }, | |
2990 | + "dist": { | |
2991 | + "type": "zip", | |
2992 | + "url": "https://api.github.com/repos/yiisoft/yii2-gii/zipball/1bd6df6804ca077ec022587905a0d43eb286f507", | |
2993 | + "reference": "1bd6df6804ca077ec022587905a0d43eb286f507", | |
2994 | + "shasum": "" | |
2995 | + }, | |
2996 | + "require": { | |
2997 | + "bower-asset/typeahead.js": "0.10.* | ~0.11.0", | |
2998 | + "phpspec/php-diff": ">=1.0.2", | |
2999 | + "yiisoft/yii2": ">=2.0.4", | |
3000 | + "yiisoft/yii2-bootstrap": "~2.0" | |
3001 | + }, | |
3002 | + "type": "yii2-extension", | |
3003 | + "extra": { | |
3004 | + "branch-alias": { | |
3005 | + "dev-master": "2.0.x-dev" | |
3006 | + }, | |
3007 | + "asset-installer-paths": { | |
3008 | + "npm-asset-library": "vendor/npm", | |
3009 | + "bower-asset-library": "vendor/bower" | |
3010 | + } | |
3011 | + }, | |
3012 | + "autoload": { | |
3013 | + "psr-4": { | |
3014 | + "yii\\gii\\": "" | |
3015 | + } | |
3016 | + }, | |
3017 | + "notification-url": "https://packagist.org/downloads/", | |
3018 | + "license": [ | |
3019 | + "BSD-3-Clause" | |
3020 | + ], | |
3021 | + "authors": [ | |
3022 | + { | |
3023 | + "name": "Qiang Xue", | |
3024 | + "email": "qiang.xue@gmail.com" | |
3025 | + } | |
3026 | + ], | |
3027 | + "description": "The Gii extension for the Yii framework", | |
3028 | + "keywords": [ | |
3029 | + "code generator", | |
3030 | + "gii", | |
3031 | + "yii2" | |
3032 | + ], | |
3033 | + "time": "2016-03-18 14:09:46" | |
3034 | + } | |
3035 | + ], | |
3036 | + "aliases": [], | |
3037 | + "minimum-stability": "stable", | |
3038 | + "stability-flags": [], | |
3039 | + "prefer-stable": false, | |
3040 | + "prefer-lowest": false, | |
3041 | + "platform": { | |
3042 | + "php": ">=5.4.0" | |
3043 | + }, | |
3044 | + "platform-dev": [] | |
3045 | +} | ... | ... |
1 | +<?php | ... | ... |
1 | +<?php | |
2 | +$params = array_merge( | |
3 | + require(__DIR__ . '/../../common/config/params.php'), | |
4 | + require(__DIR__ . '/../../common/config/params-local.php'), | |
5 | + require(__DIR__ . '/params.php'), | |
6 | + require(__DIR__ . '/params-local.php') | |
7 | +); | |
8 | + | |
9 | +return [ | |
10 | + 'id' => 'app-console', | |
11 | + 'basePath' => dirname(__DIR__), | |
12 | + 'bootstrap' => ['log'], | |
13 | + 'controllerNamespace' => 'console\controllers', | |
14 | + 'controllerMap' => [ | |
15 | + 'fixture' => [ | |
16 | + 'class' => 'yii\console\controllers\FixtureController', | |
17 | + 'namespace' => 'common\fixtures', | |
18 | + ], | |
19 | + ], | |
20 | + 'components' => [ | |
21 | + 'log' => [ | |
22 | + 'targets' => [ | |
23 | + [ | |
24 | + 'class' => 'yii\log\FileTarget', | |
25 | + 'levels' => ['error', 'warning'], | |
26 | + ], | |
27 | + ], | |
28 | + ], | |
29 | + ], | |
30 | + 'params' => $params, | |
31 | +]; | ... | ... |
1 | +<?php | |
2 | + | |
3 | +use yii\db\Migration; | |
4 | + | |
5 | +class m130524_201442_init extends Migration | |
6 | +{ | |
7 | + public function up() | |
8 | + { | |
9 | + $tableOptions = null; | |
10 | + if ($this->db->driverName === 'mysql') { | |
11 | + // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci | |
12 | + $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB'; | |
13 | + } | |
14 | + | |
15 | + $this->createTable('{{%user}}', [ | |
16 | + 'id' => $this->primaryKey(), | |
17 | + 'username' => $this->string()->notNull()->unique(), | |
18 | + 'auth_key' => $this->string(32)->notNull(), | |
19 | + 'password_hash' => $this->string()->notNull(), | |
20 | + 'password_reset_token' => $this->string()->unique(), | |
21 | + 'email' => $this->string()->notNull()->unique(), | |
22 | + | |
23 | + 'status' => $this->smallInteger()->notNull()->defaultValue(10), | |
24 | + 'created_at' => $this->integer()->notNull(), | |
25 | + 'updated_at' => $this->integer()->notNull(), | |
26 | + ], $tableOptions); | |
27 | + } | |
28 | + | |
29 | + public function down() | |
30 | + { | |
31 | + $this->dropTable('{{%user}}'); | |
32 | + } | |
33 | +} | ... | ... |
1 | +* | ... | ... |
1 | +<?php | |
2 | + | |
3 | +$config = [ | |
4 | + 'components' => [ | |
5 | + 'request' => [ | |
6 | + // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation | |
7 | + 'cookieValidationKey' => '', | |
8 | + ], | |
9 | + ], | |
10 | +]; | |
11 | + | |
12 | +if (!YII_ENV_TEST) { | |
13 | + // configuration adjustments for 'dev' environment | |
14 | + $config['bootstrap'][] = 'debug'; | |
15 | + $config['modules']['debug'] = [ | |
16 | + 'class' => 'yii\debug\Module', | |
17 | + ]; | |
18 | + | |
19 | + $config['bootstrap'][] = 'gii'; | |
20 | + $config['modules']['gii'] = [ | |
21 | + 'class' => 'yii\gii\Module', | |
22 | + ]; | |
23 | +} | |
24 | + | |
25 | +return $config; | ... | ... |
1 | +<?php | |
2 | + | |
3 | +// NOTE: Make sure this file is not accessible when deployed to production | |
4 | +if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) { | |
5 | + die('You are not allowed to access this file.'); | |
6 | +} | |
7 | + | |
8 | +defined('YII_DEBUG') or define('YII_DEBUG', true); | |
9 | +defined('YII_ENV') or define('YII_ENV', 'test'); | |
10 | + | |
11 | +require(__DIR__ . '/../../vendor/autoload.php'); | |
12 | +require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'); | |
13 | +require(__DIR__ . '/../../common/config/bootstrap.php'); | |
14 | +require(__DIR__ . '/../config/bootstrap.php'); | |
15 | + | |
16 | +$config = require(__DIR__ . '/../config/test-local.php'); | |
17 | + | |
18 | +(new yii\web\Application($config))->run(); | ... | ... |
1 | +<?php | |
2 | +defined('YII_DEBUG') or define('YII_DEBUG', true); | |
3 | +defined('YII_ENV') or define('YII_ENV', 'dev'); | |
4 | + | |
5 | +require(__DIR__ . '/../../vendor/autoload.php'); | |
6 | +require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'); | |
7 | +require(__DIR__ . '/../../common/config/bootstrap.php'); | |
8 | +require(__DIR__ . '/../config/bootstrap.php'); | |
9 | + | |
10 | +$config = yii\helpers\ArrayHelper::merge( | |
11 | + require(__DIR__ . '/../../common/config/main.php'), | |
12 | + require(__DIR__ . '/../../common/config/main-local.php'), | |
13 | + require(__DIR__ . '/../config/main.php'), | |
14 | + require(__DIR__ . '/../config/main-local.php') | |
15 | +); | |
16 | + | |
17 | +(new yii\web\Application($config))->run(); | ... | ... |
1 | +<?php | |
2 | +return [ | |
3 | + 'components' => [ | |
4 | + 'db' => [ | |
5 | + 'class' => 'yii\db\Connection', | |
6 | + 'dsn' => 'mysql:host=localhost;dbname=yii2advanced', | |
7 | + 'username' => 'root', | |
8 | + 'password' => '', | |
9 | + 'charset' => 'utf8', | |
10 | + ], | |
11 | + 'mailer' => [ | |
12 | + 'class' => 'yii\swiftmailer\Mailer', | |
13 | + 'viewPath' => '@common/mail', | |
14 | + // send all mails to a file by default. You have to set | |
15 | + // 'useFileTransport' to false and configure a transport | |
16 | + // for the mailer to send real emails. | |
17 | + 'useFileTransport' => true, | |
18 | + ], | |
19 | + ], | |
20 | +]; | ... | ... |
1 | +<?php | |
2 | +return yii\helpers\ArrayHelper::merge( | |
3 | + require(__DIR__ . '/main.php'), | |
4 | + require(__DIR__ . '/main-local.php'), | |
5 | + require(__DIR__ . '/test.php'), | |
6 | + [ | |
7 | + 'components' => [ | |
8 | + 'db' => [ | |
9 | + 'dsn' => 'mysql:host=localhost;dbname=yii2advanced_test', | |
10 | + ] | |
11 | + ], | |
12 | + ] | |
13 | +); | ... | ... |
1 | +<?php | |
2 | + | |
3 | +$config = [ | |
4 | + 'components' => [ | |
5 | + 'request' => [ | |
6 | + // !!! insert a secret key in the following (if it is empty) - this is required by cookie validation | |
7 | + 'cookieValidationKey' => '', | |
8 | + ], | |
9 | + ], | |
10 | +]; | |
11 | + | |
12 | +if (!YII_ENV_TEST) { | |
13 | + // configuration adjustments for 'dev' environment | |
14 | + $config['bootstrap'][] = 'debug'; | |
15 | + $config['modules']['debug'] = [ | |
16 | + 'class' => 'yii\debug\Module', | |
17 | + ]; | |
18 | + | |
19 | + $config['bootstrap'][] = 'gii'; | |
20 | + $config['modules']['gii'] = [ | |
21 | + 'class' => 'yii\gii\Module', | |
22 | + ]; | |
23 | +} | |
24 | + | |
25 | +return $config; | ... | ... |
environments/dev/frontend/config/params-local.php
0 โ 100644
1 | +<?php | |
2 | + | |
3 | +// NOTE: Make sure this file is not accessible when deployed to production | |
4 | +if (!in_array(@$_SERVER['REMOTE_ADDR'], ['127.0.0.1', '::1'])) { | |
5 | + die('You are not allowed to access this file.'); | |
6 | +} | |
7 | + | |
8 | +defined('YII_DEBUG') or define('YII_DEBUG', true); | |
9 | +defined('YII_ENV') or define('YII_ENV', 'test'); | |
10 | + | |
11 | +require(__DIR__ . '/../../vendor/autoload.php'); | |
12 | +require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'); | |
13 | +require(__DIR__ . '/../../common/config/bootstrap.php'); | |
14 | +require(__DIR__ . '/../config/bootstrap.php'); | |
15 | + | |
16 | +$config = require(__DIR__ . '/../config/test-local.php'); | |
17 | + | |
18 | +(new yii\web\Application($config))->run(); | ... | ... |
1 | +<?php | |
2 | +defined('YII_DEBUG') or define('YII_DEBUG', true); | |
3 | +defined('YII_ENV') or define('YII_ENV', 'dev'); | |
4 | + | |
5 | +require(__DIR__ . '/../../vendor/autoload.php'); | |
6 | +require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'); | |
7 | +require(__DIR__ . '/../../common/config/bootstrap.php'); | |
8 | +require(__DIR__ . '/../config/bootstrap.php'); | |
9 | + | |
10 | +$config = yii\helpers\ArrayHelper::merge( | |
11 | + require(__DIR__ . '/../../common/config/main.php'), | |
12 | + require(__DIR__ . '/../../common/config/main-local.php'), | |
13 | + require(__DIR__ . '/../config/main.php'), | |
14 | + require(__DIR__ . '/../config/main-local.php') | |
15 | +); | |
16 | + | |
17 | +(new yii\web\Application($config))->run(); | ... | ... |
1 | +#!/usr/bin/env php | |
2 | +<?php | |
3 | +/** | |
4 | + * Yii console bootstrap file. | |
5 | + * | |
6 | + * @link http://www.yiiframework.com/ | |
7 | + * @copyright Copyright (c) 2008 Yii Software LLC | |
8 | + * @license http://www.yiiframework.com/license/ | |
9 | + */ | |
10 | + | |
11 | +defined('YII_DEBUG') or define('YII_DEBUG', true); | |
12 | +defined('YII_ENV') or define('YII_ENV', 'dev'); | |
13 | + | |
14 | +require(__DIR__ . '/vendor/autoload.php'); | |
15 | +require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php'); | |
16 | +require(__DIR__ . '/common/config/bootstrap.php'); | |
17 | +require(__DIR__ . '/console/config/bootstrap.php'); | |
18 | + | |
19 | +$config = yii\helpers\ArrayHelper::merge( | |
20 | + require(__DIR__ . '/common/config/main.php'), | |
21 | + require(__DIR__ . '/common/config/main-local.php'), | |
22 | + require(__DIR__ . '/console/config/main.php'), | |
23 | + require(__DIR__ . '/console/config/main-local.php') | |
24 | +); | |
25 | + | |
26 | +$application = new yii\console\Application($config); | |
27 | +$exitCode = $application->run(); | |
28 | +exit($exitCode); | ... | ... |
1 | +#!/usr/bin/env php | |
2 | +<?php | |
3 | +/** | |
4 | + * Yii console bootstrap file. | |
5 | + * | |
6 | + * @link http://www.yiiframework.com/ | |
7 | + * @copyright Copyright (c) 2008 Yii Software LLC | |
8 | + * @license http://www.yiiframework.com/license/ | |
9 | + */ | |
10 | + | |
11 | +defined('YII_DEBUG') or define('YII_DEBUG', true); | |
12 | +defined('YII_ENV') or define('YII_ENV', 'test'); | |
13 | + | |
14 | +require(__DIR__ . '/vendor/autoload.php'); | |
15 | +require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php'); | |
16 | +require(__DIR__ . '/common/config/bootstrap.php'); | |
17 | +require(__DIR__ . '/console/config/bootstrap.php'); | |
18 | + | |
19 | +$config = yii\helpers\ArrayHelper::merge( | |
20 | + require(__DIR__ . '/common/config/test-local.php'), | |
21 | + require(__DIR__ . '/console/config/main.php'), | |
22 | + require(__DIR__ . '/console/config/main-local.php') | |
23 | +); | |
24 | + | |
25 | +$application = new yii\console\Application($config); | |
26 | +$exitCode = $application->run(); | |
27 | +exit($exitCode); | ... | ... |
1 | +@echo off | |
2 | + | |
3 | +rem ------------------------------------------------------------- | |
4 | +rem Yii command line bootstrap script for Windows. | |
5 | +rem | |
6 | +rem @author Qiang Xue <qiang.xue@gmail.com> | |
7 | +rem @link http://www.yiiframework.com/ | |
8 | +rem @copyright Copyright (c) 2008 Yii Software LLC | |
9 | +rem @license http://www.yiiframework.com/license/ | |
10 | +rem ------------------------------------------------------------- | |
11 | + | |
12 | +@setlocal | |
13 | + | |
14 | +set YII_PATH=%~dp0 | |
15 | + | |
16 | +if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe | |
17 | + | |
18 | +"%PHP_COMMAND%" "%YII_PATH%yii_test" %* | |
19 | + | |
20 | +@endlocal | ... | ... |
1 | +<?php | |
2 | +/** | |
3 | + * The manifest of files that are local to specific environment. | |
4 | + * This file returns a list of environments that the application | |
5 | + * may be installed under. The returned data must be in the following | |
6 | + * format: | |
7 | + * | |
8 | + * ```php | |
9 | + * return [ | |
10 | + * 'environment name' => [ | |
11 | + * 'path' => 'directory storing the local files', | |
12 | + * 'skipFiles' => [ | |
13 | + * // list of files that should only copied once and skipped if they already exist | |
14 | + * ], | |
15 | + * 'setWritable' => [ | |
16 | + * // list of directories that should be set writable | |
17 | + * ], | |
18 | + * 'setExecutable' => [ | |
19 | + * // list of files that should be set executable | |
20 | + * ], | |
21 | + * 'setCookieValidationKey' => [ | |
22 | + * // list of config files that need to be inserted with automatically generated cookie validation keys | |
23 | + * ], | |
24 | + * 'createSymlink' => [ | |
25 | + * // list of symlinks to be created. Keys are symlinks, and values are the targets. | |
26 | + * ], | |
27 | + * ], | |
28 | + * ]; | |
29 | + * ``` | |
30 | + */ | |
31 | +return [ | |
32 | + 'Development' => [ | |
33 | + 'path' => 'dev', | |
34 | + 'setWritable' => [ | |
35 | + 'backend/runtime', | |
36 | + 'backend/web/assets', | |
37 | + 'frontend/runtime', | |
38 | + 'frontend/web/assets', | |
39 | + ], | |
40 | + 'setExecutable' => [ | |
41 | + 'yii', | |
42 | + 'yii_test', | |
43 | + ], | |
44 | + 'setCookieValidationKey' => [ | |
45 | + 'backend/config/main-local.php', | |
46 | + 'frontend/config/main-local.php', | |
47 | + ], | |
48 | + ], | |
49 | + 'Production' => [ | |
50 | + 'path' => 'prod', | |
51 | + 'setWritable' => [ | |
52 | + 'backend/runtime', | |
53 | + 'backend/web/assets', | |
54 | + 'frontend/runtime', | |
55 | + 'frontend/web/assets', | |
56 | + ], | |
57 | + 'setExecutable' => [ | |
58 | + 'yii', | |
59 | + ], | |
60 | + 'setCookieValidationKey' => [ | |
61 | + 'backend/config/main-local.php', | |
62 | + 'frontend/config/main-local.php', | |
63 | + ], | |
64 | + ], | |
65 | +]; | ... | ... |
environments/prod/backend/config/params-local.php
0 โ 100644
1 | +<?php | |
2 | +defined('YII_DEBUG') or define('YII_DEBUG', false); | |
3 | +defined('YII_ENV') or define('YII_ENV', 'prod'); | |
4 | + | |
5 | +require(__DIR__ . '/../../vendor/autoload.php'); | |
6 | +require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'); | |
7 | +require(__DIR__ . '/../../common/config/bootstrap.php'); | |
8 | +require(__DIR__ . '/../config/bootstrap.php'); | |
9 | + | |
10 | +$config = yii\helpers\ArrayHelper::merge( | |
11 | + require(__DIR__ . '/../../common/config/main.php'), | |
12 | + require(__DIR__ . '/../../common/config/main-local.php'), | |
13 | + require(__DIR__ . '/../config/main.php'), | |
14 | + require(__DIR__ . '/../config/main-local.php') | |
15 | +); | |
16 | + | |
17 | +(new yii\web\Application($config))->run(); | ... | ... |
1 | +<?php | |
2 | +return [ | |
3 | + 'components' => [ | |
4 | + 'db' => [ | |
5 | + 'class' => 'yii\db\Connection', | |
6 | + 'dsn' => 'mysql:host=localhost;dbname=yii2advanced', | |
7 | + 'username' => 'root', | |
8 | + 'password' => '', | |
9 | + 'charset' => 'utf8', | |
10 | + ], | |
11 | + 'mailer' => [ | |
12 | + 'class' => 'yii\swiftmailer\Mailer', | |
13 | + 'viewPath' => '@common/mail', | |
14 | + ], | |
15 | + ], | |
16 | +]; | ... | ... |
environments/prod/console/config/params-local.php
0 โ 100644
environments/prod/frontend/config/params-local.php
0 โ 100644
1 | +<?php | |
2 | +defined('YII_DEBUG') or define('YII_DEBUG', false); | |
3 | +defined('YII_ENV') or define('YII_ENV', 'prod'); | |
4 | + | |
5 | +require(__DIR__ . '/../../vendor/autoload.php'); | |
6 | +require(__DIR__ . '/../../vendor/yiisoft/yii2/Yii.php'); | |
7 | +require(__DIR__ . '/../../common/config/bootstrap.php'); | |
8 | +require(__DIR__ . '/../config/bootstrap.php'); | |
9 | + | |
10 | +$config = yii\helpers\ArrayHelper::merge( | |
11 | + require(__DIR__ . '/../../common/config/main.php'), | |
12 | + require(__DIR__ . '/../../common/config/main-local.php'), | |
13 | + require(__DIR__ . '/../config/main.php'), | |
14 | + require(__DIR__ . '/../config/main-local.php') | |
15 | +); | |
16 | + | |
17 | +(new yii\web\Application($config))->run(); | ... | ... |
1 | +#!/usr/bin/env php | |
2 | +<?php | |
3 | +/** | |
4 | + * Yii console bootstrap file. | |
5 | + * | |
6 | + * @link http://www.yiiframework.com/ | |
7 | + * @copyright Copyright (c) 2008 Yii Software LLC | |
8 | + * @license http://www.yiiframework.com/license/ | |
9 | + */ | |
10 | + | |
11 | +defined('YII_DEBUG') or define('YII_DEBUG', false); | |
12 | +defined('YII_ENV') or define('YII_ENV', 'prod'); | |
13 | + | |
14 | +require(__DIR__ . '/vendor/autoload.php'); | |
15 | +require(__DIR__ . '/vendor/yiisoft/yii2/Yii.php'); | |
16 | +require(__DIR__ . '/common/config/bootstrap.php'); | |
17 | +require(__DIR__ . '/console/config/bootstrap.php'); | |
18 | + | |
19 | +$config = yii\helpers\ArrayHelper::merge( | |
20 | + require(__DIR__ . '/common/config/main.php'), | |
21 | + require(__DIR__ . '/common/config/main-local.php'), | |
22 | + require(__DIR__ . '/console/config/main.php'), | |
23 | + require(__DIR__ . '/console/config/main-local.php') | |
24 | +); | |
25 | + | |
26 | +$application = new yii\console\Application($config); | |
27 | +$exitCode = $application->run(); | |
28 | +exit($exitCode); | ... | ... |
1 | +<?php | |
2 | + | |
3 | +namespace frontend\assets; | |
4 | + | |
5 | +use yii\web\AssetBundle; | |
6 | + | |
7 | +/** | |
8 | + * Main frontend application asset bundle. | |
9 | + */ | |
10 | +class AppAsset extends AssetBundle | |
11 | +{ | |
12 | + public $basePath = '@webroot'; | |
13 | + public $baseUrl = '@web'; | |
14 | + public $css = [ | |
15 | + 'css/site.css', | |
16 | + ]; | |
17 | + public $js = [ | |
18 | + ]; | |
19 | + public $depends = [ | |
20 | + 'yii\web\YiiAsset', | |
21 | + 'yii\bootstrap\BootstrapAsset', | |
22 | + ]; | |
23 | +} | ... | ... |
1 | +namespace: frontend\tests | |
2 | +actor: Tester | |
3 | +paths: | |
4 | + tests: tests | |
5 | + log: tests/_output | |
6 | + data: tests/_data | |
7 | + helpers: tests/_support | |
8 | +settings: | |
9 | + bootstrap: _bootstrap.php | |
10 | + colors: true | |
11 | + memory_limit: 1024M | |
12 | +modules: | |
13 | + config: | |
14 | + Yii2: | |
15 | + configFile: 'config/test-local.php' | ... | ... |
1 | +<?php | ... | ... |
1 | +<?php | |
2 | +$params = array_merge( | |
3 | + require(__DIR__ . '/../../common/config/params.php'), | |
4 | + require(__DIR__ . '/../../common/config/params-local.php'), | |
5 | + require(__DIR__ . '/params.php'), | |
6 | + require(__DIR__ . '/params-local.php') | |
7 | +); | |
8 | + | |
9 | +return [ | |
10 | + 'id' => 'app-frontend', | |
11 | + 'basePath' => dirname(__DIR__), | |
12 | + 'bootstrap' => ['log'], | |
13 | + 'controllerNamespace' => 'frontend\controllers', | |
14 | + 'components' => [ | |
15 | + 'request' => [ | |
16 | + 'csrfParam' => '_csrf-frontend', | |
17 | + ], | |
18 | + 'user' => [ | |
19 | + 'identityClass' => 'common\models\User', | |
20 | + 'enableAutoLogin' => true, | |
21 | + 'identityCookie' => ['name' => '_identity-frontend', 'httpOnly' => true], | |
22 | + ], | |
23 | + 'session' => [ | |
24 | + // this is the name of the session cookie used for login on the frontend | |
25 | + 'name' => 'advanced-frontend', | |
26 | + ], | |
27 | + 'log' => [ | |
28 | + 'traceLevel' => YII_DEBUG ? 3 : 0, | |
29 | + 'targets' => [ | |
30 | + [ | |
31 | + 'class' => 'yii\log\FileTarget', | |
32 | + 'levels' => ['error', 'warning'], | |
33 | + ], | |
34 | + ], | |
35 | + ], | |
36 | + 'errorHandler' => [ | |
37 | + 'errorAction' => 'site/error', | |
38 | + ], | |
39 | + /* | |
40 | + 'urlManager' => [ | |
41 | + 'enablePrettyUrl' => true, | |
42 | + 'showScriptName' => false, | |
43 | + 'rules' => [ | |
44 | + ], | |
45 | + ], | |
46 | + */ | |
47 | + ], | |
48 | + 'params' => $params, | |
49 | +]; | ... | ... |
1 | +<?php | |
2 | +namespace frontend\controllers; | |
3 | + | |
4 | +use Yii; | |
5 | +use yii\base\InvalidParamException; | |
6 | +use yii\web\BadRequestHttpException; | |
7 | +use yii\web\Controller; | |
8 | +use yii\filters\VerbFilter; | |
9 | +use yii\filters\AccessControl; | |
10 | +use common\models\LoginForm; | |
11 | +use frontend\models\PasswordResetRequestForm; | |
12 | +use frontend\models\ResetPasswordForm; | |
13 | +use frontend\models\SignupForm; | |
14 | +use frontend\models\ContactForm; | |
15 | + | |
16 | +/** | |
17 | + * Site controller | |
18 | + */ | |
19 | +class SiteController extends Controller | |
20 | +{ | |
21 | + /** | |
22 | + * @inheritdoc | |
23 | + */ | |
24 | + public function behaviors() | |
25 | + { | |
26 | + return [ | |
27 | + 'access' => [ | |
28 | + 'class' => AccessControl::className(), | |
29 | + 'only' => ['logout', 'signup'], | |
30 | + 'rules' => [ | |
31 | + [ | |
32 | + 'actions' => ['signup'], | |
33 | + 'allow' => true, | |
34 | + 'roles' => ['?'], | |
35 | + ], | |
36 | + [ | |
37 | + 'actions' => ['logout'], | |
38 | + 'allow' => true, | |
39 | + 'roles' => ['@'], | |
40 | + ], | |
41 | + ], | |
42 | + ], | |
43 | + 'verbs' => [ | |
44 | + 'class' => VerbFilter::className(), | |
45 | + 'actions' => [ | |
46 | + 'logout' => ['post'], | |
47 | + ], | |
48 | + ], | |
49 | + ]; | |
50 | + } | |
51 | + | |
52 | + /** | |
53 | + * @inheritdoc | |
54 | + */ | |
55 | + public function actions() | |
56 | + { | |
57 | + return [ | |
58 | + 'error' => [ | |
59 | + 'class' => 'yii\web\ErrorAction', | |
60 | + ], | |
61 | + 'captcha' => [ | |
62 | + 'class' => 'yii\captcha\CaptchaAction', | |
63 | + 'fixedVerifyCode' => YII_ENV_TEST ? 'testme' : null, | |
64 | + ], | |
65 | + ]; | |
66 | + } | |
67 | + | |
68 | + /** | |
69 | + * Displays homepage. | |
70 | + * | |
71 | + * @return mixed | |
72 | + */ | |
73 | + public function actionIndex() | |
74 | + { | |
75 | + return $this->render('index'); | |
76 | + } | |
77 | + | |
78 | + /** | |
79 | + * Logs in a user. | |
80 | + * | |
81 | + * @return mixed | |
82 | + */ | |
83 | + public function actionLogin() | |
84 | + { | |
85 | + if (!Yii::$app->user->isGuest) { | |
86 | + return $this->goHome(); | |
87 | + } | |
88 | + | |
89 | + $model = new LoginForm(); | |
90 | + if ($model->load(Yii::$app->request->post()) && $model->login()) { | |
91 | + return $this->goBack(); | |
92 | + } else { | |
93 | + return $this->render('login', [ | |
94 | + 'model' => $model, | |
95 | + ]); | |
96 | + } | |
97 | + } | |
98 | + | |
99 | + /** | |
100 | + * Logs out the current user. | |
101 | + * | |
102 | + * @return mixed | |
103 | + */ | |
104 | + public function actionLogout() | |
105 | + { | |
106 | + Yii::$app->user->logout(); | |
107 | + | |
108 | + return $this->goHome(); | |
109 | + } | |
110 | + | |
111 | + /** | |
112 | + * Displays contact page. | |
113 | + * | |
114 | + * @return mixed | |
115 | + */ | |
116 | + public function actionContact() | |
117 | + { | |
118 | + $model = new ContactForm(); | |
119 | + if ($model->load(Yii::$app->request->post()) && $model->validate()) { | |
120 | + if ($model->sendEmail(Yii::$app->params['adminEmail'])) { | |
121 | + Yii::$app->session->setFlash('success', 'Thank you for contacting us. We will respond to you as soon as possible.'); | |
122 | + } else { | |
123 | + Yii::$app->session->setFlash('error', 'There was an error sending your message.'); | |
124 | + } | |
125 | + | |
126 | + return $this->refresh(); | |
127 | + } else { | |
128 | + return $this->render('contact', [ | |
129 | + 'model' => $model, | |
130 | + ]); | |
131 | + } | |
132 | + } | |
133 | + | |
134 | + /** | |
135 | + * Displays about page. | |
136 | + * | |
137 | + * @return mixed | |
138 | + */ | |
139 | + public function actionAbout() | |
140 | + { | |
141 | + return $this->render('about'); | |
142 | + } | |
143 | + | |
144 | + /** | |
145 | + * Signs user up. | |
146 | + * | |
147 | + * @return mixed | |
148 | + */ | |
149 | + public function actionSignup() | |
150 | + { | |
151 | + $model = new SignupForm(); | |
152 | + if ($model->load(Yii::$app->request->post())) { | |
153 | + if ($user = $model->signup()) { | |
154 | + if (Yii::$app->getUser()->login($user)) { | |
155 | + return $this->goHome(); | |
156 | + } | |
157 | + } | |
158 | + } | |
159 | + | |
160 | + return $this->render('signup', [ | |
161 | + 'model' => $model, | |
162 | + ]); | |
163 | + } | |
164 | + | |
165 | + /** | |
166 | + * Requests password reset. | |
167 | + * | |
168 | + * @return mixed | |
169 | + */ | |
170 | + public function actionRequestPasswordReset() | |
171 | + { | |
172 | + $model = new PasswordResetRequestForm(); | |
173 | + if ($model->load(Yii::$app->request->post()) && $model->validate()) { | |
174 | + if ($model->sendEmail()) { | |
175 | + Yii::$app->session->setFlash('success', 'Check your email for further instructions.'); | |
176 | + | |
177 | + return $this->goHome(); | |
178 | + } else { | |
179 | + Yii::$app->session->setFlash('error', 'Sorry, we are unable to reset password for the provided email address.'); | |
180 | + } | |
181 | + } | |
182 | + | |
183 | + return $this->render('requestPasswordResetToken', [ | |
184 | + 'model' => $model, | |
185 | + ]); | |
186 | + } | |
187 | + | |
188 | + /** | |
189 | + * Resets password. | |
190 | + * | |
191 | + * @param string $token | |
192 | + * @return mixed | |
193 | + * @throws BadRequestHttpException | |
194 | + */ | |
195 | + public function actionResetPassword($token) | |
196 | + { | |
197 | + try { | |
198 | + $model = new ResetPasswordForm($token); | |
199 | + } catch (InvalidParamException $e) { | |
200 | + throw new BadRequestHttpException($e->getMessage()); | |
201 | + } | |
202 | + | |
203 | + if ($model->load(Yii::$app->request->post()) && $model->validate() && $model->resetPassword()) { | |
204 | + Yii::$app->session->setFlash('success', 'New password saved.'); | |
205 | + | |
206 | + return $this->goHome(); | |
207 | + } | |
208 | + | |
209 | + return $this->render('resetPassword', [ | |
210 | + 'model' => $model, | |
211 | + ]); | |
212 | + } | |
213 | +} | ... | ... |
1 | +<?php | |
2 | + | |
3 | +namespace frontend\models; | |
4 | + | |
5 | +use Yii; | |
6 | +use yii\base\Model; | |
7 | + | |
8 | +/** | |
9 | + * ContactForm is the model behind the contact form. | |
10 | + */ | |
11 | +class ContactForm extends Model | |
12 | +{ | |
13 | + public $name; | |
14 | + public $email; | |
15 | + public $subject; | |
16 | + public $body; | |
17 | + public $verifyCode; | |
18 | + | |
19 | + | |
20 | + /** | |
21 | + * @inheritdoc | |
22 | + */ | |
23 | + public function rules() | |
24 | + { | |
25 | + return [ | |
26 | + // name, email, subject and body are required | |
27 | + [['name', 'email', 'subject', 'body'], 'required'], | |
28 | + // email has to be a valid email address | |
29 | + ['email', 'email'], | |
30 | + // verifyCode needs to be entered correctly | |
31 | + ['verifyCode', 'captcha'], | |
32 | + ]; | |
33 | + } | |
34 | + | |
35 | + /** | |
36 | + * @inheritdoc | |
37 | + */ | |
38 | + public function attributeLabels() | |
39 | + { | |
40 | + return [ | |
41 | + 'verifyCode' => 'Verification Code', | |
42 | + ]; | |
43 | + } | |
44 | + | |
45 | + /** | |
46 | + * Sends an email to the specified email address using the information collected by this model. | |
47 | + * | |
48 | + * @param string $email the target email address | |
49 | + * @return bool whether the email was sent | |
50 | + */ | |
51 | + public function sendEmail($email) | |
52 | + { | |
53 | + return Yii::$app->mailer->compose() | |
54 | + ->setTo($email) | |
55 | + ->setFrom([$this->email => $this->name]) | |
56 | + ->setSubject($this->subject) | |
57 | + ->setTextBody($this->body) | |
58 | + ->send(); | |
59 | + } | |
60 | +} | ... | ... |
1 | +<?php | |
2 | +namespace frontend\models; | |
3 | + | |
4 | +use Yii; | |
5 | +use yii\base\Model; | |
6 | +use common\models\User; | |
7 | + | |
8 | +/** | |
9 | + * Password reset request form | |
10 | + */ | |
11 | +class PasswordResetRequestForm extends Model | |
12 | +{ | |
13 | + public $email; | |
14 | + | |
15 | + | |
16 | + /** | |
17 | + * @inheritdoc | |
18 | + */ | |
19 | + public function rules() | |
20 | + { | |
21 | + return [ | |
22 | + ['email', 'trim'], | |
23 | + ['email', 'required'], | |
24 | + ['email', 'email'], | |
25 | + ['email', 'exist', | |
26 | + 'targetClass' => '\common\models\User', | |
27 | + 'filter' => ['status' => User::STATUS_ACTIVE], | |
28 | + 'message' => 'There is no user with this email address.' | |
29 | + ], | |
30 | + ]; | |
31 | + } | |
32 | + | |
33 | + /** | |
34 | + * Sends an email with a link, for resetting the password. | |
35 | + * | |
36 | + * @return bool whether the email was send | |
37 | + */ | |
38 | + public function sendEmail() | |
39 | + { | |
40 | + /* @var $user User */ | |
41 | + $user = User::findOne([ | |
42 | + 'status' => User::STATUS_ACTIVE, | |
43 | + 'email' => $this->email, | |
44 | + ]); | |
45 | + | |
46 | + if (!$user) { | |
47 | + return false; | |
48 | + } | |
49 | + | |
50 | + if (!User::isPasswordResetTokenValid($user->password_reset_token)) { | |
51 | + $user->generatePasswordResetToken(); | |
52 | + if (!$user->save()) { | |
53 | + return false; | |
54 | + } | |
55 | + } | |
56 | + | |
57 | + return Yii::$app | |
58 | + ->mailer | |
59 | + ->compose( | |
60 | + ['html' => 'passwordResetToken-html', 'text' => 'passwordResetToken-text'], | |
61 | + ['user' => $user] | |
62 | + ) | |
63 | + ->setFrom([Yii::$app->params['supportEmail'] => Yii::$app->name . ' robot']) | |
64 | + ->setTo($this->email) | |
65 | + ->setSubject('Password reset for ' . Yii::$app->name) | |
66 | + ->send(); | |
67 | + } | |
68 | +} | ... | ... |
1 | +<?php | |
2 | +namespace frontend\models; | |
3 | + | |
4 | +use yii\base\Model; | |
5 | +use yii\base\InvalidParamException; | |
6 | +use common\models\User; | |
7 | + | |
8 | +/** | |
9 | + * Password reset form | |
10 | + */ | |
11 | +class ResetPasswordForm extends Model | |
12 | +{ | |
13 | + public $password; | |
14 | + | |
15 | + /** | |
16 | + * @var \common\models\User | |
17 | + */ | |
18 | + private $_user; | |
19 | + | |
20 | + | |
21 | + /** | |
22 | + * Creates a form model given a token. | |
23 | + * | |
24 | + * @param string $token | |
25 | + * @param array $config name-value pairs that will be used to initialize the object properties | |
26 | + * @throws \yii\base\InvalidParamException if token is empty or not valid | |
27 | + */ | |
28 | + public function __construct($token, $config = []) | |
29 | + { | |
30 | + if (empty($token) || !is_string($token)) { | |
31 | + throw new InvalidParamException('Password reset token cannot be blank.'); | |
32 | + } | |
33 | + $this->_user = User::findByPasswordResetToken($token); | |
34 | + if (!$this->_user) { | |
35 | + throw new InvalidParamException('Wrong password reset token.'); | |
36 | + } | |
37 | + parent::__construct($config); | |
38 | + } | |
39 | + | |
40 | + /** | |
41 | + * @inheritdoc | |
42 | + */ | |
43 | + public function rules() | |
44 | + { | |
45 | + return [ | |
46 | + ['password', 'required'], | |
47 | + ['password', 'string', 'min' => 6], | |
48 | + ]; | |
49 | + } | |
50 | + | |
51 | + /** | |
52 | + * Resets password. | |
53 | + * | |
54 | + * @return bool if password was reset. | |
55 | + */ | |
56 | + public function resetPassword() | |
57 | + { | |
58 | + $user = $this->_user; | |
59 | + $user->setPassword($this->password); | |
60 | + $user->removePasswordResetToken(); | |
61 | + | |
62 | + return $user->save(false); | |
63 | + } | |
64 | +} | ... | ... |
1 | +<?php | |
2 | +namespace frontend\models; | |
3 | + | |
4 | +use yii\base\Model; | |
5 | +use common\models\User; | |
6 | + | |
7 | +/** | |
8 | + * Signup form | |
9 | + */ | |
10 | +class SignupForm extends Model | |
11 | +{ | |
12 | + public $username; | |
13 | + public $email; | |
14 | + public $password; | |
15 | + | |
16 | + | |
17 | + /** | |
18 | + * @inheritdoc | |
19 | + */ | |
20 | + public function rules() | |
21 | + { | |
22 | + return [ | |
23 | + ['username', 'trim'], | |
24 | + ['username', 'required'], | |
25 | + ['username', 'unique', 'targetClass' => '\common\models\User', 'message' => 'This username has already been taken.'], | |
26 | + ['username', 'string', 'min' => 2, 'max' => 255], | |
27 | + | |
28 | + ['email', 'trim'], | |
29 | + ['email', 'required'], | |
30 | + ['email', 'email'], | |
31 | + ['email', 'string', 'max' => 255], | |
32 | + ['email', 'unique', 'targetClass' => '\common\models\User', 'message' => 'This email address has already been taken.'], | |
33 | + | |
34 | + ['password', 'required'], | |
35 | + ['password', 'string', 'min' => 6], | |
36 | + ]; | |
37 | + } | |
38 | + | |
39 | + /** | |
40 | + * Signs user up. | |
41 | + * | |
42 | + * @return User|null the saved model or null if saving fails | |
43 | + */ | |
44 | + public function signup() | |
45 | + { | |
46 | + if (!$this->validate()) { | |
47 | + return null; | |
48 | + } | |
49 | + | |
50 | + $user = new User(); | |
51 | + $user->username = $this->username; | |
52 | + $user->email = $this->email; | |
53 | + $user->setPassword($this->password); | |
54 | + $user->generateAuthKey(); | |
55 | + | |
56 | + return $user->save() ? $user : null; | |
57 | + } | |
58 | +} | ... | ... |
1 | +<?php | |
2 | +defined('YII_DEBUG') or define('YII_DEBUG', true); | |
3 | +defined('YII_ENV') or define('YII_ENV', 'test'); | |
4 | +defined('YII_APP_BASE_PATH') or define('YII_APP_BASE_PATH', __DIR__.'/../../'); | |
5 | + | |
6 | +require_once(YII_APP_BASE_PATH . '/vendor/autoload.php'); | |
7 | +require_once(YII_APP_BASE_PATH . '/vendor/yiisoft/yii2/Yii.php'); | |
8 | +require_once(YII_APP_BASE_PATH . '/common/config/bootstrap.php'); | |
9 | +require_once(__DIR__ . '/../config/bootstrap.php'); | ... | ... |
1 | +<?php | |
2 | +return [ | |
3 | + [ | |
4 | + 'username' => 'erau', | |
5 | + 'auth_key' => 'tUu1qHcde0diwUol3xeI-18MuHkkprQI', | |
6 | + // password_0 | |
7 | + 'password_hash' => '$2y$13$nJ1WDlBaGcbCdbNC5.5l4.sgy.OMEKCqtDQOdQ2OWpgiKRWYyzzne', | |
8 | + 'password_reset_token' => 'RkD_Jw0_8HEedzLk7MM-ZKEFfYR7VbMr_1392559490', | |
9 | + 'created_at' => '1392559490', | |
10 | + 'updated_at' => '1392559490', | |
11 | + 'email' => 'sfriesen@jenkins.info', | |
12 | + ], | |
13 | +]; | ... | ... |
1 | +<?php | |
2 | + | |
3 | +return [ | |
4 | + [ | |
5 | + 'username' => 'okirlin', | |
6 | + 'auth_key' => 'iwTNae9t34OmnK6l4vT4IeaTk-YWI2Rv', | |
7 | + 'password_hash' => '$2y$13$CXT0Rkle1EMJ/c1l5bylL.EylfmQ39O5JlHJVFpNn618OUS1HwaIi', | |
8 | + 'password_reset_token' => 't5GU9NwpuGYSfb7FEZMAxqtuz2PkEvv_' . time(), | |
9 | + 'created_at' => '1391885313', | |
10 | + 'updated_at' => '1391885313', | |
11 | + 'email' => 'brady.renner@rutherford.com', | |
12 | + ], | |
13 | + [ | |
14 | + 'username' => 'troy.becker', | |
15 | + 'auth_key' => 'EdKfXrx88weFMV0vIxuTMWKgfK2tS3Lp', | |
16 | + 'password_hash' => '$2y$13$g5nv41Px7VBqhS3hVsVN2.MKfgT3jFdkXEsMC4rQJLfaMa7VaJqL2', | |
17 | + 'password_reset_token' => '4BSNyiZNAuxjs5Mty990c47sVrgllIi_' . time(), | |
18 | + 'created_at' => '1391885313', | |
19 | + 'updated_at' => '1391885313', | |
20 | + 'email' => 'nicolas.dianna@hotmail.com', | |
21 | + 'status' => '0', | |
22 | + ], | |
23 | +]; | ... | ... |
1 | +_generated | ... | ... |
1 | +<?php | |
2 | +namespace frontend\tests; | |
3 | + | |
4 | +/** | |
5 | + * Inherited Methods | |
6 | + * @method void wantToTest($text) | |
7 | + * @method void wantTo($text) | |
8 | + * @method void execute($callable) | |
9 | + * @method void expectTo($prediction) | |
10 | + * @method void expect($prediction) | |
11 | + * @method void amGoingTo($argumentation) | |
12 | + * @method void am($role) | |
13 | + * @method void lookForwardTo($achieveValue) | |
14 | + * @method void comment($description) | |
15 | + * @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL) | |
16 | + * | |
17 | + * @SuppressWarnings(PHPMD) | |
18 | + */ | |
19 | +class FunctionalTester extends \Codeception\Actor | |
20 | +{ | |
21 | + use _generated\FunctionalTesterActions; | |
22 | + | |
23 | + | |
24 | + public function seeValidationError($message) | |
25 | + { | |
26 | + $this->see($message, '.help-block'); | |
27 | + } | |
28 | + | |
29 | + public function dontSeeValidationError($message) | |
30 | + { | |
31 | + $this->dontSee($message, '.help-block'); | |
32 | + } | |
33 | +} | ... | ... |
1 | +<?php | |
2 | +namespace frontend\tests; | |
3 | + | |
4 | +/** | |
5 | + * Inherited Methods | |
6 | + * @method void wantToTest($text) | |
7 | + * @method void wantTo($text) | |
8 | + * @method void execute($callable) | |
9 | + * @method void expectTo($prediction) | |
10 | + * @method void expect($prediction) | |
11 | + * @method void amGoingTo($argumentation) | |
12 | + * @method void am($role) | |
13 | + * @method void lookForwardTo($achieveValue) | |
14 | + * @method void comment($description) | |
15 | + * @method \Codeception\Lib\Friend haveFriend($name, $actorClass = NULL) | |
16 | + * | |
17 | + * @SuppressWarnings(PHPMD) | |
18 | + */ | |
19 | +class UnitTester extends \Codeception\Actor | |
20 | +{ | |
21 | + use _generated\UnitTesterActions; | |
22 | + /** | |
23 | + * Define custom actions here | |
24 | + */ | |
25 | +} | ... | ... |
1 | +<?php | |
2 | +namespace frontend\tests\acceptance; | |
3 | + | |
4 | +use Yii; | |
5 | +use frontend\tests\AcceptanceTester; | |
6 | +use yii\helpers\Url; | |
7 | + | |
8 | +class HomeCest | |
9 | +{ | |
10 | + public function checkHome(AcceptanceTester $I) | |
11 | + { | |
12 | + $I->amOnPage(Url::toRoute('/site/index')); | |
13 | + $I->see('My Company'); | |
14 | + | |
15 | + $I->seeLink('About'); | |
16 | + $I->click('About'); | |
17 | + $I->wait(2); // wait for page to be opened | |
18 | + | |
19 | + $I->see('This is the About page.'); | |
20 | + } | |
21 | +} | ... | ... |
1 | +<?php | |
2 | +/** | |
3 | + * Here you can initialize variables via \Codeception\Util\Fixtures class | |
4 | + * to store data in global array and use it in Cepts. | |
5 | + * | |
6 | + * ```php | |
7 | + * // Here _bootstrap.php | |
8 | + * \Codeception\Util\Fixtures::add('user1', ['name' => 'davert']); | |
9 | + * ``` | |
10 | + * | |
11 | + * In Cept | |
12 | + * | |
13 | + * ```php | |
14 | + * \Codeception\Util\Fixtures::get('user1'); | |
15 | + * ``` | |
16 | + */ | |
0 | 17 | \ No newline at end of file | ... | ... |
1 | +<?php | |
2 | +namespace frontend\tests\functional; | |
3 | + | |
4 | +use frontend\tests\FunctionalTester; | |
5 | + | |
6 | +/* @var $scenario \Codeception\Scenario */ | |
7 | + | |
8 | +class ContactCest | |
9 | +{ | |
10 | + public function _before(FunctionalTester $I) | |
11 | + { | |
12 | + $I->amOnPage(['site/contact']); | |
13 | + } | |
14 | + | |
15 | + public function checkContact(FunctionalTester $I) | |
16 | + { | |
17 | + $I->see('Contact', 'h1'); | |
18 | + } | |
19 | + | |
20 | + public function checkContactSubmitNoData(FunctionalTester $I) | |
21 | + { | |
22 | + $I->submitForm('#contact-form', []); | |
23 | + $I->see('Contact', 'h1'); | |
24 | + $I->seeValidationError('Name cannot be blank'); | |
25 | + $I->seeValidationError('Email cannot be blank'); | |
26 | + $I->seeValidationError('Subject cannot be blank'); | |
27 | + $I->seeValidationError('Body cannot be blank'); | |
28 | + $I->seeValidationError('The verification code is incorrect'); | |
29 | + } | |
30 | + | |
31 | + public function checkContactSubmitNotCorrectEmail(FunctionalTester $I) | |
32 | + { | |
33 | + $I->submitForm('#contact-form', [ | |
34 | + 'ContactForm[name]' => 'tester', | |
35 | + 'ContactForm[email]' => 'tester.email', | |
36 | + 'ContactForm[subject]' => 'test subject', | |
37 | + 'ContactForm[body]' => 'test content', | |
38 | + 'ContactForm[verifyCode]' => 'testme', | |
39 | + ]); | |
40 | + $I->seeValidationError('Email is not a valid email address.'); | |
41 | + $I->dontSeeValidationError('Name cannot be blank'); | |
42 | + $I->dontSeeValidationError('Subject cannot be blank'); | |
43 | + $I->dontSeeValidationError('Body cannot be blank'); | |
44 | + $I->dontSeeValidationError('The verification code is incorrect'); | |
45 | + } | |
46 | + | |
47 | + public function checkContactSubmitCorrectData(FunctionalTester $I) | |
48 | + { | |
49 | + $I->submitForm('#contact-form', [ | |
50 | + 'ContactForm[name]' => 'tester', | |
51 | + 'ContactForm[email]' => 'tester@example.com', | |
52 | + 'ContactForm[subject]' => 'test subject', | |
53 | + 'ContactForm[body]' => 'test content', | |
54 | + 'ContactForm[verifyCode]' => 'testme', | |
55 | + ]); | |
56 | + $I->seeEmailIsSent(); | |
57 | + $I->see('Thank you for contacting us. We will respond to you as soon as possible.'); | |
58 | + } | |
59 | +} | ... | ... |
1 | +<?php | |
2 | + | |
3 | +namespace frontend\tests\functional; | |
4 | + | |
5 | +use frontend\tests\FunctionalTester; | |
6 | + | |
7 | +class HomeCest | |
8 | +{ | |
9 | + public function checkOpen(FunctionalTester $I) | |
10 | + { | |
11 | + $I->amOnPage(\Yii::$app->homeUrl); | |
12 | + $I->see('My Company'); | |
13 | + $I->seeLink('About'); | |
14 | + $I->click('About'); | |
15 | + $I->see('This is the About page.'); | |
16 | + } | |
17 | +} | |
0 | 18 | \ No newline at end of file | ... | ... |
1 | +<?php | |
2 | + | |
3 | +namespace frontend\tests\functional; | |
4 | + | |
5 | +use frontend\tests\FunctionalTester; | |
6 | +use common\fixtures\User as UserFixture; | |
7 | + | |
8 | +class LoginCest | |
9 | +{ | |
10 | + function _before(FunctionalTester $I) | |
11 | + { | |
12 | + $I->haveFixtures([ | |
13 | + 'user' => [ | |
14 | + 'class' => UserFixture::className(), | |
15 | + 'dataFile' => codecept_data_dir() . 'login_data.php' | |
16 | + ] | |
17 | + ]); | |
18 | + $I->amOnRoute('site/login'); | |
19 | + } | |
20 | + | |
21 | + protected function formParams($login, $password) | |
22 | + { | |
23 | + return [ | |
24 | + 'LoginForm[username]' => $login, | |
25 | + 'LoginForm[password]' => $password, | |
26 | + ]; | |
27 | + } | |
28 | + | |
29 | + public function checkEmpty(FunctionalTester $I) | |
30 | + { | |
31 | + $I->submitForm('#login-form', $this->formParams('', '')); | |
32 | + $I->seeValidationError('Username cannot be blank.'); | |
33 | + $I->seeValidationError('Password cannot be blank.'); | |
34 | + } | |
35 | + | |
36 | + public function checkWrongPassword(FunctionalTester $I) | |
37 | + { | |
38 | + $I->submitForm('#login-form', $this->formParams('admin', 'wrong')); | |
39 | + $I->seeValidationError('Incorrect username or password.'); | |
40 | + } | |
41 | + | |
42 | + public function checkValidLogin(FunctionalTester $I) | |
43 | + { | |
44 | + $I->submitForm('#login-form', $this->formParams('erau', 'password_0')); | |
45 | + $I->see('Logout (erau)', 'form button[type=submit]'); | |
46 | + $I->dontSeeLink('Login'); | |
47 | + $I->dontSeeLink('Signup'); | |
48 | + } | |
49 | +} | ... | ... |
1 | +<?php | |
2 | + | |
3 | +namespace frontend\tests\functional; | |
4 | + | |
5 | +use frontend\tests\FunctionalTester; | |
6 | + | |
7 | +class SignupCest | |
8 | +{ | |
9 | + protected $formId = '#form-signup'; | |
10 | + | |
11 | + | |
12 | + public function _before(FunctionalTester $I) | |
13 | + { | |
14 | + $I->amOnRoute('site/signup'); | |
15 | + } | |
16 | + | |
17 | + public function signupWithEmptyFields(FunctionalTester $I) | |
18 | + { | |
19 | + $I->see('Signup', 'h1'); | |
20 | + $I->see('Please fill out the following fields to signup:'); | |
21 | + $I->submitForm($this->formId, []); | |
22 | + $I->seeValidationError('Username cannot be blank.'); | |
23 | + $I->seeValidationError('Email cannot be blank.'); | |
24 | + $I->seeValidationError('Password cannot be blank.'); | |
25 | + | |
26 | + } | |
27 | + | |
28 | + public function signupWithWrongEmail(FunctionalTester $I) | |
29 | + { | |
30 | + $I->submitForm( | |
31 | + $this->formId, [ | |
32 | + 'SignupForm[username]' => 'tester', | |
33 | + 'SignupForm[email]' => 'ttttt', | |
34 | + 'SignupForm[password]' => 'tester_password', | |
35 | + ] | |
36 | + ); | |
37 | + $I->dontSee('Username cannot be blank.', '.help-block'); | |
38 | + $I->dontSee('Password cannot be blank.', '.help-block'); | |
39 | + $I->see('Email is not a valid email address.', '.help-block'); | |
40 | + } | |
41 | + | |
42 | + public function signupSuccessfully(FunctionalTester $I) | |
43 | + { | |
44 | + $I->submitForm($this->formId, [ | |
45 | + 'SignupForm[username]' => 'tester', | |
46 | + 'SignupForm[email]' => 'tester.email@example.com', | |
47 | + 'SignupForm[password]' => 'tester_password', | |
48 | + ]); | |
49 | + | |
50 | + $I->seeRecord('common\models\User', [ | |
51 | + 'username' => 'tester', | |
52 | + 'email' => 'tester.email@example.com', | |
53 | + ]); | |
54 | + | |
55 | + $I->see('Logout (tester)', 'form button[type=submit]'); | |
56 | + } | |
57 | +} | ... | ... |
1 | +<?php | |
2 | +/** | |
3 | + * Here you can initialize variables via \Codeception\Util\Fixtures class | |
4 | + * to store data in global array and use it in Cests. | |
5 | + * | |
6 | + * ```php | |
7 | + * // Here _bootstrap.php | |
8 | + * \Codeception\Util\Fixtures::add('user1', ['name' => 'davert']); | |
9 | + * ``` | |
10 | + * | |
11 | + * In Cests | |
12 | + * | |
13 | + * ```php | |
14 | + * \Codeception\Util\Fixtures::get('user1'); | |
15 | + * ``` | |
16 | + */ | |
0 | 17 | \ No newline at end of file | ... | ... |
1 | +<?php | |
2 | +/** | |
3 | + * Here you can initialize variables via \Codeception\Util\Fixtures class | |
4 | + * to store data in global array and use it in Tests. | |
5 | + * | |
6 | + * ```php | |
7 | + * // Here _bootstrap.php | |
8 | + * \Codeception\Util\Fixtures::add('user1', ['name' => 'davert']); | |
9 | + * ``` | |
10 | + * | |
11 | + * In Tests | |
12 | + * | |
13 | + * ```php | |
14 | + * \Codeception\Util\Fixtures::get('user1'); | |
15 | + * ``` | |
16 | + */ | ... | ... |
1 | +<?php | |
2 | +namespace frontend\tests\unit\models; | |
3 | + | |
4 | +use Yii; | |
5 | +use frontend\models\ContactForm; | |
6 | + | |
7 | +class ContactFormTest extends \Codeception\Test\Unit | |
8 | +{ | |
9 | + public function testSendEmail() | |
10 | + { | |
11 | + $model = new ContactForm(); | |
12 | + | |
13 | + $model->attributes = [ | |
14 | + 'name' => 'Tester', | |
15 | + 'email' => 'tester@example.com', | |
16 | + 'subject' => 'very important letter subject', | |
17 | + 'body' => 'body of current message', | |
18 | + ]; | |
19 | + | |
20 | + expect_that($model->sendEmail('admin@example.com')); | |
21 | + | |
22 | + // using Yii2 module actions to check email was sent | |
23 | + $this->tester->seeEmailIsSent(); | |
24 | + | |
25 | + $emailMessage = $this->tester->grabLastSentEmail(); | |
26 | + expect('valid email is sent', $emailMessage)->isInstanceOf('yii\mail\MessageInterface'); | |
27 | + expect($emailMessage->getTo())->hasKey('admin@example.com'); | |
28 | + expect($emailMessage->getFrom())->hasKey('tester@example.com'); | |
29 | + expect($emailMessage->getSubject())->equals('very important letter subject'); | |
30 | + expect($emailMessage->toString())->contains('body of current message'); | |
31 | + } | |
32 | +} | ... | ... |
frontend/tests/unit/models/PasswordResetRequestFormTest.php
0 โ 100644
1 | +<?php | |
2 | + | |
3 | +namespace frontend\tests\unit\models; | |
4 | + | |
5 | +use Yii; | |
6 | +use frontend\models\PasswordResetRequestForm; | |
7 | +use common\fixtures\User as UserFixture; | |
8 | +use common\models\User; | |
9 | + | |
10 | +class PasswordResetRequestFormTest extends \Codeception\Test\Unit | |
11 | +{ | |
12 | + /** | |
13 | + * @var \frontend\tests\UnitTester | |
14 | + */ | |
15 | + protected $tester; | |
16 | + | |
17 | + | |
18 | + public function _before() | |
19 | + { | |
20 | + $this->tester->haveFixtures([ | |
21 | + 'user' => [ | |
22 | + 'class' => UserFixture::className(), | |
23 | + 'dataFile' => codecept_data_dir() . 'user.php' | |
24 | + ] | |
25 | + ]); | |
26 | + } | |
27 | + | |
28 | + public function testSendMessageWithWrongEmailAddress() | |
29 | + { | |
30 | + $model = new PasswordResetRequestForm(); | |
31 | + $model->email = 'not-existing-email@example.com'; | |
32 | + expect_not($model->sendEmail()); | |
33 | + } | |
34 | + | |
35 | + public function testNotSendEmailsToInactiveUser() | |
36 | + { | |
37 | + $user = $this->tester->grabFixture('user', 1); | |
38 | + $model = new PasswordResetRequestForm(); | |
39 | + $model->email = $user['email']; | |
40 | + expect_not($model->sendEmail()); | |
41 | + } | |
42 | + | |
43 | + public function testSendEmailSuccessfully() | |
44 | + { | |
45 | + $userFixture = $this->tester->grabFixture('user', 0); | |
46 | + | |
47 | + $model = new PasswordResetRequestForm(); | |
48 | + $model->email = $userFixture['email']; | |
49 | + $user = User::findOne(['password_reset_token' => $userFixture['password_reset_token']]); | |
50 | + | |
51 | + expect_that($model->sendEmail()); | |
52 | + expect_that($user->password_reset_token); | |
53 | + | |
54 | + $emailMessage = $this->tester->grabLastSentEmail(); | |
55 | + expect('valid email is sent', $emailMessage)->isInstanceOf('yii\mail\MessageInterface'); | |
56 | + expect($emailMessage->getTo())->hasKey($model->email); | |
57 | + expect($emailMessage->getFrom())->hasKey(Yii::$app->params['supportEmail']); | |
58 | + } | |
59 | +} | ... | ... |
frontend/tests/unit/models/ResetPasswordFormTest.php
0 โ 100644
1 | +<?php | |
2 | + | |
3 | +namespace frontend\tests\unit\models; | |
4 | + | |
5 | +use common\fixtures\User as UserFixture; | |
6 | +use frontend\models\ResetPasswordForm; | |
7 | + | |
8 | +class ResetPasswordFormTest extends \Codeception\Test\Unit | |
9 | +{ | |
10 | + /** | |
11 | + * @var \frontend\tests\UnitTester | |
12 | + */ | |
13 | + protected $tester; | |
14 | + | |
15 | + | |
16 | + public function _before() | |
17 | + { | |
18 | + $this->tester->haveFixtures([ | |
19 | + 'user' => [ | |
20 | + 'class' => UserFixture::className(), | |
21 | + 'dataFile' => codecept_data_dir() . 'user.php' | |
22 | + ], | |
23 | + ]); | |
24 | + } | |
25 | + | |
26 | + public function testResetWrongToken() | |
27 | + { | |
28 | + $this->tester->expectException('yii\base\InvalidParamException', function() { | |
29 | + new ResetPasswordForm(''); | |
30 | + }); | |
31 | + | |
32 | + $this->tester->expectException('yii\base\InvalidParamException', function() { | |
33 | + new ResetPasswordForm('notexistingtoken_1391882543'); | |
34 | + }); | |
35 | + } | |
36 | + | |
37 | + public function testResetCorrectToken() | |
38 | + { | |
39 | + $user = $this->tester->grabFixture('user', 0); | |
40 | + $form = new ResetPasswordForm($user['password_reset_token']); | |
41 | + expect_that($form->resetPassword()); | |
42 | + } | |
43 | + | |
44 | +} | ... | ... |
1 | +<?php | |
2 | +namespace frontend\tests\unit\models; | |
3 | + | |
4 | +use common\fixtures\User as UserFixture; | |
5 | +use frontend\models\SignupForm; | |
6 | + | |
7 | +class SignupFormTest extends \Codeception\Test\Unit | |
8 | +{ | |
9 | + /** | |
10 | + * @var \frontend\tests\UnitTester | |
11 | + */ | |
12 | + protected $tester; | |
13 | + | |
14 | + | |
15 | + public function _before() | |
16 | + { | |
17 | + $this->tester->haveFixtures([ | |
18 | + 'user' => [ | |
19 | + 'class' => UserFixture::className(), | |
20 | + 'dataFile' => codecept_data_dir() . 'user.php' | |
21 | + ] | |
22 | + ]); | |
23 | + } | |
24 | + | |
25 | + public function testCorrectSignup() | |
26 | + { | |
27 | + $model = new SignupForm([ | |
28 | + 'username' => 'some_username', | |
29 | + 'email' => 'some_email@example.com', | |
30 | + 'password' => 'some_password', | |
31 | + ]); | |
32 | + | |
33 | + $user = $model->signup(); | |
34 | + | |
35 | + expect($user)->isInstanceOf('common\models\User'); | |
36 | + | |
37 | + expect($user->username)->equals('some_username'); | |
38 | + expect($user->email)->equals('some_email@example.com'); | |
39 | + expect($user->validatePassword('some_password'))->true(); | |
40 | + } | |
41 | + | |
42 | + public function testNotCorrectSignup() | |
43 | + { | |
44 | + $model = new SignupForm([ | |
45 | + 'username' => 'troy.becker', | |
46 | + 'email' => 'nicolas.dianna@hotmail.com', | |
47 | + 'password' => 'some_password', | |
48 | + ]); | |
49 | + | |
50 | + expect_not($model->signup()); | |
51 | + expect_that($model->getErrors('username')); | |
52 | + expect_that($model->getErrors('email')); | |
53 | + | |
54 | + expect($model->getFirstError('username')) | |
55 | + ->equals('This username has already been taken.'); | |
56 | + expect($model->getFirstError('email')) | |
57 | + ->equals('This email address has already been taken.'); | |
58 | + } | |
59 | +} | ... | ... |
1 | +<?php | |
2 | + | |
3 | +/* @var $this \yii\web\View */ | |
4 | +/* @var $content string */ | |
5 | + | |
6 | +use yii\helpers\Html; | |
7 | +use yii\bootstrap\Nav; | |
8 | +use yii\bootstrap\NavBar; | |
9 | +use yii\widgets\Breadcrumbs; | |
10 | +use frontend\assets\AppAsset; | |
11 | +use common\widgets\Alert; | |
12 | + | |
13 | +AppAsset::register($this); | |
14 | +?> | |
15 | +<?php $this->beginPage() ?> | |
16 | +<!DOCTYPE html> | |
17 | +<html lang="<?= Yii::$app->language ?>"> | |
18 | +<head> | |
19 | + <meta charset="<?= Yii::$app->charset ?>"> | |
20 | + <meta name="viewport" content="width=device-width, initial-scale=1"> | |
21 | + <?= Html::csrfMetaTags() ?> | |
22 | + <title><?= Html::encode($this->title) ?></title> | |
23 | + <?php $this->head() ?> | |
24 | +</head> | |
25 | +<body> | |
26 | +<?php $this->beginBody() ?> | |
27 | + | |
28 | +<div class="wrap"> | |
29 | + <?php | |
30 | + NavBar::begin([ | |
31 | + 'brandLabel' => 'My Company', | |
32 | + 'brandUrl' => Yii::$app->homeUrl, | |
33 | + 'options' => [ | |
34 | + 'class' => 'navbar-inverse navbar-fixed-top', | |
35 | + ], | |
36 | + ]); | |
37 | + $menuItems = [ | |
38 | + ['label' => 'Home', 'url' => ['/site/index']], | |
39 | + ['label' => 'About', 'url' => ['/site/about']], | |
40 | + ['label' => 'Contact', 'url' => ['/site/contact']], | |
41 | + ]; | |
42 | + if (Yii::$app->user->isGuest) { | |
43 | + $menuItems[] = ['label' => 'Signup', 'url' => ['/site/signup']]; | |
44 | + $menuItems[] = ['label' => 'Login', 'url' => ['/site/login']]; | |
45 | + } else { | |
46 | + $menuItems[] = '<li>' | |
47 | + . Html::beginForm(['/site/logout'], 'post') | |
48 | + . Html::submitButton( | |
49 | + 'Logout (' . Yii::$app->user->identity->username . ')', | |
50 | + ['class' => 'btn btn-link logout'] | |
51 | + ) | |
52 | + . Html::endForm() | |
53 | + . '</li>'; | |
54 | + } | |
55 | + echo Nav::widget([ | |
56 | + 'options' => ['class' => 'navbar-nav navbar-right'], | |
57 | + 'items' => $menuItems, | |
58 | + ]); | |
59 | + NavBar::end(); | |
60 | + ?> | |
61 | + | |
62 | + <div class="container"> | |
63 | + <?= Breadcrumbs::widget([ | |
64 | + 'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], | |
65 | + ]) ?> | |
66 | + <?= Alert::widget() ?> | |
67 | + <?= $content ?> | |
68 | + </div> | |
69 | +</div> | |
70 | + | |
71 | +<footer class="footer"> | |
72 | + <div class="container"> | |
73 | + <p class="pull-left">© My Company <?= date('Y') ?></p> | |
74 | + | |
75 | + <p class="pull-right"><?= Yii::powered() ?></p> | |
76 | + </div> | |
77 | +</footer> | |
78 | + | |
79 | +<?php $this->endBody() ?> | |
80 | +</body> | |
81 | +</html> | |
82 | +<?php $this->endPage() ?> | ... | ... |
1 | +<?php | |
2 | + | |
3 | +/* @var $this yii\web\View */ | |
4 | + | |
5 | +use yii\helpers\Html; | |
6 | + | |
7 | +$this->title = 'About'; | |
8 | +$this->params['breadcrumbs'][] = $this->title; | |
9 | +?> | |
10 | +<div class="site-about"> | |
11 | + <h1><?= Html::encode($this->title) ?></h1> | |
12 | + | |
13 | + <p>This is the About page. You may modify the following file to customize its content:</p> | |
14 | + | |
15 | + <code><?= __FILE__ ?></code> | |
16 | +</div> | ... | ... |
1 | +<?php | |
2 | + | |
3 | +/* @var $this yii\web\View */ | |
4 | +/* @var $form yii\bootstrap\ActiveForm */ | |
5 | +/* @var $model \frontend\models\ContactForm */ | |
6 | + | |
7 | +use yii\helpers\Html; | |
8 | +use yii\bootstrap\ActiveForm; | |
9 | +use yii\captcha\Captcha; | |
10 | + | |
11 | +$this->title = 'Contact'; | |
12 | +$this->params['breadcrumbs'][] = $this->title; | |
13 | +?> | |
14 | +<div class="site-contact"> | |
15 | + <h1><?= Html::encode($this->title) ?></h1> | |
16 | + | |
17 | + <p> | |
18 | + If you have business inquiries or other questions, please fill out the following form to contact us. Thank you. | |
19 | + </p> | |
20 | + | |
21 | + <div class="row"> | |
22 | + <div class="col-lg-5"> | |
23 | + <?php $form = ActiveForm::begin(['id' => 'contact-form']); ?> | |
24 | + | |
25 | + <?= $form->field($model, 'name')->textInput(['autofocus' => true]) ?> | |
26 | + | |
27 | + <?= $form->field($model, 'email') ?> | |
28 | + | |
29 | + <?= $form->field($model, 'subject') ?> | |
30 | + | |
31 | + <?= $form->field($model, 'body')->textarea(['rows' => 6]) ?> | |
32 | + | |
33 | + <?= $form->field($model, 'verifyCode')->widget(Captcha::className(), [ | |
34 | + 'template' => '<div class="row"><div class="col-lg-3">{image}</div><div class="col-lg-6">{input}</div></div>', | |
35 | + ]) ?> | |
36 | + | |
37 | + <div class="form-group"> | |
38 | + <?= Html::submitButton('Submit', ['class' => 'btn btn-primary', 'name' => 'contact-button']) ?> | |
39 | + </div> | |
40 | + | |
41 | + <?php ActiveForm::end(); ?> | |
42 | + </div> | |
43 | + </div> | |
44 | + | |
45 | +</div> | ... | ... |
1 | +<?php | |
2 | + | |
3 | +/* @var $this yii\web\View */ | |
4 | +/* @var $name string */ | |
5 | +/* @var $message string */ | |
6 | +/* @var $exception Exception */ | |
7 | + | |
8 | +use yii\helpers\Html; | |
9 | + | |
10 | +$this->title = $name; | |
11 | +?> | |
12 | +<div class="site-error"> | |
13 | + | |
14 | + <h1><?= Html::encode($this->title) ?></h1> | |
15 | + | |
16 | + <div class="alert alert-danger"> | |
17 | + <?= nl2br(Html::encode($message)) ?> | |
18 | + </div> | |
19 | + | |
20 | + <p> | |
21 | + The above error occurred while the Web server was processing your request. | |
22 | + </p> | |
23 | + <p> | |
24 | + Please contact us if you think this is a server error. Thank you. | |
25 | + </p> | |
26 | + | |
27 | +</div> | ... | ... |
1 | +<?php | |
2 | + | |
3 | +/* @var $this yii\web\View */ | |
4 | + | |
5 | +$this->title = 'My Yii Application'; | |
6 | +?> | |
7 | +<div class="site-index"> | |
8 | + | |
9 | + <div class="jumbotron"> | |
10 | + <h1>Congratulations!</h1> | |
11 | + | |
12 | + <p class="lead">You have successfully created your Yii-powered application.</p> | |
13 | + | |
14 | + <p><a class="btn btn-lg btn-success" href="http://www.yiiframework.com">Get started with Yii</a></p> | |
15 | + </div> | |
16 | + | |
17 | + <div class="body-content"> | |
18 | + | |
19 | + <div class="row"> | |
20 | + <div class="col-lg-4"> | |
21 | + <h2>Heading</h2> | |
22 | + | |
23 | + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et | |
24 | + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip | |
25 | + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu | |
26 | + fugiat nulla pariatur.</p> | |
27 | + | |
28 | + <p><a class="btn btn-default" href="http://www.yiiframework.com/doc/">Yii Documentation »</a></p> | |
29 | + </div> | |
30 | + <div class="col-lg-4"> | |
31 | + <h2>Heading</h2> | |
32 | + | |
33 | + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et | |
34 | + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip | |
35 | + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu | |
36 | + fugiat nulla pariatur.</p> | |
37 | + | |
38 | + <p><a class="btn btn-default" href="http://www.yiiframework.com/forum/">Yii Forum »</a></p> | |
39 | + </div> | |
40 | + <div class="col-lg-4"> | |
41 | + <h2>Heading</h2> | |
42 | + | |
43 | + <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et | |
44 | + dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip | |
45 | + ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu | |
46 | + fugiat nulla pariatur.</p> | |
47 | + | |
48 | + <p><a class="btn btn-default" href="http://www.yiiframework.com/extensions/">Yii Extensions »</a></p> | |
49 | + </div> | |
50 | + </div> | |
51 | + | |
52 | + </div> | |
53 | +</div> | ... | ... |
1 | +<?php | |
2 | + | |
3 | +/* @var $this yii\web\View */ | |
4 | +/* @var $form yii\bootstrap\ActiveForm */ | |
5 | +/* @var $model \common\models\LoginForm */ | |
6 | + | |
7 | +use yii\helpers\Html; | |
8 | +use yii\bootstrap\ActiveForm; | |
9 | + | |
10 | +$this->title = 'Login'; | |
11 | +$this->params['breadcrumbs'][] = $this->title; | |
12 | +?> | |
13 | +<div class="site-login"> | |
14 | + <h1><?= Html::encode($this->title) ?></h1> | |
15 | + | |
16 | + <p>Please fill out the following fields to login:</p> | |
17 | + | |
18 | + <div class="row"> | |
19 | + <div class="col-lg-5"> | |
20 | + <?php $form = ActiveForm::begin(['id' => 'login-form']); ?> | |
21 | + | |
22 | + <?= $form->field($model, 'username')->textInput(['autofocus' => true]) ?> | |
23 | + | |
24 | + <?= $form->field($model, 'password')->passwordInput() ?> | |
25 | + | |
26 | + <?= $form->field($model, 'rememberMe')->checkbox() ?> | |
27 | + | |
28 | + <div style="color:#999;margin:1em 0"> | |
29 | + If you forgot your password you can <?= Html::a('reset it', ['site/request-password-reset']) ?>. | |
30 | + </div> | |
31 | + | |
32 | + <div class="form-group"> | |
33 | + <?= Html::submitButton('Login', ['class' => 'btn btn-primary', 'name' => 'login-button']) ?> | |
34 | + </div> | |
35 | + | |
36 | + <?php ActiveForm::end(); ?> | |
37 | + </div> | |
38 | + </div> | |
39 | +</div> | ... | ... |
frontend/views/site/requestPasswordResetToken.php
0 โ 100644
1 | +<?php | |
2 | + | |
3 | +/* @var $this yii\web\View */ | |
4 | +/* @var $form yii\bootstrap\ActiveForm */ | |
5 | +/* @var $model \frontend\models\PasswordResetRequestForm */ | |
6 | + | |
7 | +use yii\helpers\Html; | |
8 | +use yii\bootstrap\ActiveForm; | |
9 | + | |
10 | +$this->title = 'Request password reset'; | |
11 | +$this->params['breadcrumbs'][] = $this->title; | |
12 | +?> | |
13 | +<div class="site-request-password-reset"> | |
14 | + <h1><?= Html::encode($this->title) ?></h1> | |
15 | + | |
16 | + <p>Please fill out your email. A link to reset password will be sent there.</p> | |
17 | + | |
18 | + <div class="row"> | |
19 | + <div class="col-lg-5"> | |
20 | + <?php $form = ActiveForm::begin(['id' => 'request-password-reset-form']); ?> | |
21 | + | |
22 | + <?= $form->field($model, 'email')->textInput(['autofocus' => true]) ?> | |
23 | + | |
24 | + <div class="form-group"> | |
25 | + <?= Html::submitButton('Send', ['class' => 'btn btn-primary']) ?> | |
26 | + </div> | |
27 | + | |
28 | + <?php ActiveForm::end(); ?> | |
29 | + </div> | |
30 | + </div> | |
31 | +</div> | ... | ... |
1 | +<?php | |
2 | + | |
3 | +/* @var $this yii\web\View */ | |
4 | +/* @var $form yii\bootstrap\ActiveForm */ | |
5 | +/* @var $model \frontend\models\ResetPasswordForm */ | |
6 | + | |
7 | +use yii\helpers\Html; | |
8 | +use yii\bootstrap\ActiveForm; | |
9 | + | |
10 | +$this->title = 'Reset password'; | |
11 | +$this->params['breadcrumbs'][] = $this->title; | |
12 | +?> | |
13 | +<div class="site-reset-password"> | |
14 | + <h1><?= Html::encode($this->title) ?></h1> | |
15 | + | |
16 | + <p>Please choose your new password:</p> | |
17 | + | |
18 | + <div class="row"> | |
19 | + <div class="col-lg-5"> | |
20 | + <?php $form = ActiveForm::begin(['id' => 'reset-password-form']); ?> | |
21 | + | |
22 | + <?= $form->field($model, 'password')->passwordInput(['autofocus' => true]) ?> | |
23 | + | |
24 | + <div class="form-group"> | |
25 | + <?= Html::submitButton('Save', ['class' => 'btn btn-primary']) ?> | |
26 | + </div> | |
27 | + | |
28 | + <?php ActiveForm::end(); ?> | |
29 | + </div> | |
30 | + </div> | |
31 | +</div> | ... | ... |
1 | +<?php | |
2 | + | |
3 | +/* @var $this yii\web\View */ | |
4 | +/* @var $form yii\bootstrap\ActiveForm */ | |
5 | +/* @var $model \frontend\models\SignupForm */ | |
6 | + | |
7 | +use yii\helpers\Html; | |
8 | +use yii\bootstrap\ActiveForm; | |
9 | + | |
10 | +$this->title = 'Signup'; | |
11 | +$this->params['breadcrumbs'][] = $this->title; | |
12 | +?> | |
13 | +<div class="site-signup"> | |
14 | + <h1><?= Html::encode($this->title) ?></h1> | |
15 | + | |
16 | + <p>Please fill out the following fields to signup:</p> | |
17 | + | |
18 | + <div class="row"> | |
19 | + <div class="col-lg-5"> | |
20 | + <?php $form = ActiveForm::begin(['id' => 'form-signup']); ?> | |
21 | + | |
22 | + <?= $form->field($model, 'username')->textInput(['autofocus' => true]) ?> | |
23 | + | |
24 | + <?= $form->field($model, 'email') ?> | |
25 | + | |
26 | + <?= $form->field($model, 'password')->passwordInput() ?> | |
27 | + | |
28 | + <div class="form-group"> | |
29 | + <?= Html::submitButton('Signup', ['class' => 'btn btn-primary', 'name' => 'signup-button']) ?> | |
30 | + </div> | |
31 | + | |
32 | + <?php ActiveForm::end(); ?> | |
33 | + </div> | |
34 | + </div> | |
35 | +</div> | ... | ... |
1 | +html, | |
2 | +body { | |
3 | + height: 100%; | |
4 | +} | |
5 | + | |
6 | +.wrap { | |
7 | + min-height: 100%; | |
8 | + height: auto; | |
9 | + margin: 0 auto -60px; | |
10 | + padding: 0 0 60px; | |
11 | +} | |
12 | + | |
13 | +.wrap > .container { | |
14 | + padding: 70px 15px 20px; | |
15 | +} | |
16 | + | |
17 | +.footer { | |
18 | + height: 60px; | |
19 | + background-color: #f5f5f5; | |
20 | + border-top: 1px solid #ddd; | |
21 | + padding-top: 20px; | |
22 | +} | |
23 | + | |
24 | +.jumbotron { | |
25 | + text-align: center; | |
26 | + background-color: transparent; | |
27 | +} | |
28 | + | |
29 | +.jumbotron .btn { | |
30 | + font-size: 21px; | |
31 | + padding: 14px 24px; | |
32 | +} | |
33 | + | |
34 | +.not-set { | |
35 | + color: #c55; | |
36 | + font-style: italic; | |
37 | +} | |
38 | + | |
39 | +/* add sorting icons to gridview sort links */ | |
40 | +a.asc:after, a.desc:after { | |
41 | + position: relative; | |
42 | + top: 1px; | |
43 | + display: inline-block; | |
44 | + font-family: 'Glyphicons Halflings'; | |
45 | + font-style: normal; | |
46 | + font-weight: normal; | |
47 | + line-height: 1; | |
48 | + padding-left: 5px; | |
49 | +} | |
50 | + | |
51 | +a.asc:after { | |
52 | + content: "\e151"; | |
53 | +} | |
54 | + | |
55 | +a.desc:after { | |
56 | + content: "\e152"; | |
57 | +} | |
58 | + | |
59 | +.sort-numerical a.asc:after { | |
60 | + content: "\e153"; | |
61 | +} | |
62 | + | |
63 | +.sort-numerical a.desc:after { | |
64 | + content: "\e154"; | |
65 | +} | |
66 | + | |
67 | +.sort-ordinal a.asc:after { | |
68 | + content: "\e155"; | |
69 | +} | |
70 | + | |
71 | +.sort-ordinal a.desc:after { | |
72 | + content: "\e156"; | |
73 | +} | |
74 | + | |
75 | +.grid-view td { | |
76 | + white-space: nowrap; | |
77 | +} | |
78 | + | |
79 | +.grid-view .filters input, | |
80 | +.grid-view .filters select { | |
81 | + min-width: 50px; | |
82 | +} | |
83 | + | |
84 | +.hint-block { | |
85 | + display: block; | |
86 | + margin-top: 5px; | |
87 | + color: #999; | |
88 | +} | |
89 | + | |
90 | +.error-summary { | |
91 | + color: #a94442; | |
92 | + background: #fdf7f7; | |
93 | + border-left: 3px solid #eed3d7; | |
94 | + padding: 10px 20px; | |
95 | + margin: 0 0 15px 0; | |
96 | +} | |
97 | + | |
98 | +/* align the logout "link" (button in form) of the navbar */ | |
99 | +.nav li > form > button.logout { | |
100 | + padding: 15px; | |
101 | + border: none; | |
102 | +} | |
103 | + | |
104 | +@media(max-width:767px) { | |
105 | + .nav li > form > button.logout { | |
106 | + display:block; | |
107 | + text-align: left; | |
108 | + width: 100%; | |
109 | + padding: 10px 15px; | |
110 | + } | |
111 | +} | |
112 | + | |
113 | +.nav > li > form > button.logout:focus, | |
114 | +.nav > li > form > button.logout:hover { | |
115 | + text-decoration: none; | |
116 | +} | |
117 | + | |
118 | +.nav > li > form > button.logout:focus { | |
119 | + outline: none; | |
120 | +} | ... | ... |
No preview for this file type
1 | +#!/usr/bin/env php | |
2 | +<?php | |
3 | +/** | |
4 | + * Yii Application Initialization Tool | |
5 | + * | |
6 | + * In order to run in non-interactive mode: | |
7 | + * | |
8 | + * init --env=Development --overwrite=n | |
9 | + * | |
10 | + * @author Alexander Makarov <sam@rmcreative.ru> | |
11 | + * | |
12 | + * @link http://www.yiiframework.com/ | |
13 | + * @copyright Copyright (c) 2008 Yii Software LLC | |
14 | + * @license http://www.yiiframework.com/license/ | |
15 | + */ | |
16 | + | |
17 | +if (!extension_loaded('openssl')) { | |
18 | + die('The OpenSSL PHP extension is required by Yii2.'); | |
19 | +} | |
20 | + | |
21 | +$params = getParams(); | |
22 | +$root = str_replace('\\', '/', __DIR__); | |
23 | +$envs = require("$root/environments/index.php"); | |
24 | +$envNames = array_keys($envs); | |
25 | + | |
26 | +echo "Yii Application Initialization Tool v1.0\n\n"; | |
27 | + | |
28 | +$envName = null; | |
29 | +if (empty($params['env']) || $params['env'] === '1') { | |
30 | + echo "Which environment do you want the application to be initialized in?\n\n"; | |
31 | + foreach ($envNames as $i => $name) { | |
32 | + echo " [$i] $name\n"; | |
33 | + } | |
34 | + echo "\n Your choice [0-" . (count($envs) - 1) . ', or "q" to quit] '; | |
35 | + $answer = trim(fgets(STDIN)); | |
36 | + | |
37 | + if (!ctype_digit($answer) || !in_array($answer, range(0, count($envs) - 1))) { | |
38 | + echo "\n Quit initialization.\n"; | |
39 | + exit(0); | |
40 | + } | |
41 | + | |
42 | + if (isset($envNames[$answer])) { | |
43 | + $envName = $envNames[$answer]; | |
44 | + } | |
45 | +} else { | |
46 | + $envName = $params['env']; | |
47 | +} | |
48 | + | |
49 | +if (!in_array($envName, $envNames)) { | |
50 | + $envsList = implode(', ', $envNames); | |
51 | + echo "\n $envName is not a valid environment. Try one of the following: $envsList. \n"; | |
52 | + exit(2); | |
53 | +} | |
54 | + | |
55 | +$env = $envs[$envName]; | |
56 | + | |
57 | +if (empty($params['env'])) { | |
58 | + echo "\n Initialize the application under '{$envNames[$answer]}' environment? [yes|no] "; | |
59 | + $answer = trim(fgets(STDIN)); | |
60 | + if (strncasecmp($answer, 'y', 1)) { | |
61 | + echo "\n Quit initialization.\n"; | |
62 | + exit(0); | |
63 | + } | |
64 | +} | |
65 | + | |
66 | +echo "\n Start initialization ...\n\n"; | |
67 | +$files = getFileList("$root/environments/{$env['path']}"); | |
68 | +if (isset($env['skipFiles'])) { | |
69 | + $skipFiles = $env['skipFiles']; | |
70 | + array_walk($skipFiles, function(&$value) use($env, $root) { $value = "$root/$value"; }); | |
71 | + $files = array_diff($files, array_intersect_key($env['skipFiles'], array_filter($skipFiles, 'file_exists'))); | |
72 | +} | |
73 | +$all = false; | |
74 | +foreach ($files as $file) { | |
75 | + if (!copyFile($root, "environments/{$env['path']}/$file", $file, $all, $params)) { | |
76 | + break; | |
77 | + } | |
78 | +} | |
79 | + | |
80 | +$callbacks = ['setCookieValidationKey', 'setWritable', 'setExecutable', 'createSymlink']; | |
81 | +foreach ($callbacks as $callback) { | |
82 | + if (!empty($env[$callback])) { | |
83 | + $callback($root, $env[$callback]); | |
84 | + } | |
85 | +} | |
86 | + | |
87 | +echo "\n ... initialization completed.\n\n"; | |
88 | + | |
89 | +function getFileList($root, $basePath = '') | |
90 | +{ | |
91 | + $files = []; | |
92 | + $handle = opendir($root); | |
93 | + while (($path = readdir($handle)) !== false) { | |
94 | + if ($path === '.git' || $path === '.svn' || $path === '.' || $path === '..') { | |
95 | + continue; | |
96 | + } | |
97 | + $fullPath = "$root/$path"; | |
98 | + $relativePath = $basePath === '' ? $path : "$basePath/$path"; | |
99 | + if (is_dir($fullPath)) { | |
100 | + $files = array_merge($files, getFileList($fullPath, $relativePath)); | |
101 | + } else { | |
102 | + $files[] = $relativePath; | |
103 | + } | |
104 | + } | |
105 | + closedir($handle); | |
106 | + return $files; | |
107 | +} | |
108 | + | |
109 | +function copyFile($root, $source, $target, &$all, $params) | |
110 | +{ | |
111 | + if (!is_file($root . '/' . $source)) { | |
112 | + echo " skip $target ($source not exist)\n"; | |
113 | + return true; | |
114 | + } | |
115 | + if (is_file($root . '/' . $target)) { | |
116 | + if (file_get_contents($root . '/' . $source) === file_get_contents($root . '/' . $target)) { | |
117 | + echo " unchanged $target\n"; | |
118 | + return true; | |
119 | + } | |
120 | + if ($all) { | |
121 | + echo " overwrite $target\n"; | |
122 | + } else { | |
123 | + echo " exist $target\n"; | |
124 | + echo " ...overwrite? [Yes|No|All|Quit] "; | |
125 | + | |
126 | + | |
127 | + $answer = !empty($params['overwrite']) ? $params['overwrite'] : trim(fgets(STDIN)); | |
128 | + if (!strncasecmp($answer, 'q', 1)) { | |
129 | + return false; | |
130 | + } else { | |
131 | + if (!strncasecmp($answer, 'y', 1)) { | |
132 | + echo " overwrite $target\n"; | |
133 | + } else { | |
134 | + if (!strncasecmp($answer, 'a', 1)) { | |
135 | + echo " overwrite $target\n"; | |
136 | + $all = true; | |
137 | + } else { | |
138 | + echo " skip $target\n"; | |
139 | + return true; | |
140 | + } | |
141 | + } | |
142 | + } | |
143 | + } | |
144 | + file_put_contents($root . '/' . $target, file_get_contents($root . '/' . $source)); | |
145 | + return true; | |
146 | + } | |
147 | + echo " generate $target\n"; | |
148 | + @mkdir(dirname($root . '/' . $target), 0777, true); | |
149 | + file_put_contents($root . '/' . $target, file_get_contents($root . '/' . $source)); | |
150 | + return true; | |
151 | +} | |
152 | + | |
153 | +function getParams() | |
154 | +{ | |
155 | + $rawParams = []; | |
156 | + if (isset($_SERVER['argv'])) { | |
157 | + $rawParams = $_SERVER['argv']; | |
158 | + array_shift($rawParams); | |
159 | + } | |
160 | + | |
161 | + $params = []; | |
162 | + foreach ($rawParams as $param) { | |
163 | + if (preg_match('/^--(\w+)(=(.*))?$/', $param, $matches)) { | |
164 | + $name = $matches[1]; | |
165 | + $params[$name] = isset($matches[3]) ? $matches[3] : true; | |
166 | + } else { | |
167 | + $params[] = $param; | |
168 | + } | |
169 | + } | |
170 | + return $params; | |
171 | +} | |
172 | + | |
173 | +function setWritable($root, $paths) | |
174 | +{ | |
175 | + foreach ($paths as $writable) { | |
176 | + if (is_dir("$root/$writable")) { | |
177 | + if (@chmod("$root/$writable", 0777)) { | |
178 | + echo " chmod 0777 $writable\n"; | |
179 | + } else { | |
180 | + printError("Operation chmod not permitted for directory $writable."); | |
181 | + } | |
182 | + } else { | |
183 | + printError("Directory $writable does not exist."); | |
184 | + } | |
185 | + } | |
186 | +} | |
187 | + | |
188 | +function setExecutable($root, $paths) | |
189 | +{ | |
190 | + foreach ($paths as $executable) { | |
191 | + if (file_exists("$root/$executable")) { | |
192 | + if (@chmod("$root/$executable", 0755)) { | |
193 | + echo " chmod 0755 $executable\n"; | |
194 | + } else { | |
195 | + printError("Operation chmod not permitted for $executable."); | |
196 | + } | |
197 | + } else { | |
198 | + printError("$executable does not exist."); | |
199 | + } | |
200 | + } | |
201 | +} | |
202 | + | |
203 | +function setCookieValidationKey($root, $paths) | |
204 | +{ | |
205 | + foreach ($paths as $file) { | |
206 | + echo " generate cookie validation key in $file\n"; | |
207 | + $file = $root . '/' . $file; | |
208 | + $length = 32; | |
209 | + $bytes = openssl_random_pseudo_bytes($length); | |
210 | + $key = strtr(substr(base64_encode($bytes), 0, $length), '+/=', '_-.'); | |
211 | + $content = preg_replace('/(("|\')cookieValidationKey("|\')\s*=>\s*)(""|\'\')/', "\\1'$key'", file_get_contents($file)); | |
212 | + file_put_contents($file, $content); | |
213 | + } | |
214 | +} | |
215 | + | |
216 | +function createSymlink($root, $links) | |
217 | +{ | |
218 | + foreach ($links as $link => $target) { | |
219 | + //first removing folders to avoid errors if the folder already exists | |
220 | + @rmdir($root . "/" . $link); | |
221 | + //next removing existing symlink in order to update the target | |
222 | + if (is_link($root . "/" . $link)) { | |
223 | + @unlink($root . "/" . $link); | |
224 | + } | |
225 | + if (@symlink($root . "/" . $target, $root . "/" . $link)) { | |
226 | + echo " symlink $root/$target $root/$link\n"; | |
227 | + } else { | |
228 | + printError("Cannot create symlink $root/$target $root/$link."); | |
229 | + } | |
230 | + } | |
231 | +} | |
232 | + | |
233 | +/** | |
234 | + * Prints error message. | |
235 | + * @param string $message message | |
236 | + */ | |
237 | +function printError($message) | |
238 | +{ | |
239 | + echo "\n " . formatMessage("Error. $message", ['fg-red']) . " \n"; | |
240 | +} | |
241 | + | |
242 | +/** | |
243 | + * Returns true if the stream supports colorization. ANSI colors are disabled if not supported by the stream. | |
244 | + * | |
245 | + * - windows without ansicon | |
246 | + * - not tty consoles | |
247 | + * | |
248 | + * @return boolean true if the stream supports ANSI colors, otherwise false. | |
249 | + */ | |
250 | +function ansiColorsSupported() | |
251 | +{ | |
252 | + return DIRECTORY_SEPARATOR === '\\' | |
253 | + ? getenv('ANSICON') !== false || getenv('ConEmuANSI') === 'ON' | |
254 | + : function_exists('posix_isatty') && @posix_isatty(STDOUT); | |
255 | +} | |
256 | + | |
257 | +/** | |
258 | + * Get ANSI code of style. | |
259 | + * @param string $name style name | |
260 | + * @return integer ANSI code of style. | |
261 | + */ | |
262 | +function getStyleCode($name) | |
263 | +{ | |
264 | + $styles = [ | |
265 | + 'bold' => 1, | |
266 | + 'fg-black' => 30, | |
267 | + 'fg-red' => 31, | |
268 | + 'fg-green' => 32, | |
269 | + 'fg-yellow' => 33, | |
270 | + 'fg-blue' => 34, | |
271 | + 'fg-magenta' => 35, | |
272 | + 'fg-cyan' => 36, | |
273 | + 'fg-white' => 37, | |
274 | + 'bg-black' => 40, | |
275 | + 'bg-red' => 41, | |
276 | + 'bg-green' => 42, | |
277 | + 'bg-yellow' => 43, | |
278 | + 'bg-blue' => 44, | |
279 | + 'bg-magenta' => 45, | |
280 | + 'bg-cyan' => 46, | |
281 | + 'bg-white' => 47, | |
282 | + ]; | |
283 | + return $styles[$name]; | |
284 | +} | |
285 | + | |
286 | +/** | |
287 | + * Formats message using styles if STDOUT supports it. | |
288 | + * @param string $message message | |
289 | + * @param string[] $styles styles | |
290 | + * @return string formatted message. | |
291 | + */ | |
292 | +function formatMessage($message, $styles) | |
293 | +{ | |
294 | + if (empty($styles) || !ansiColorsSupported()) { | |
295 | + return $message; | |
296 | + } | |
297 | + | |
298 | + return sprintf("\x1b[%sm", implode(';', array_map('getStyleCode', $styles))) . $message . "\x1b[0m"; | |
299 | +} | ... | ... |
1 | +@echo off | |
2 | + | |
3 | +rem ------------------------------------------------------------- | |
4 | +rem Yii command line init script for Windows. | |
5 | +rem | |
6 | +rem @author Qiang Xue <qiang.xue@gmail.com> | |
7 | +rem @link http://www.yiiframework.com/ | |
8 | +rem @copyright Copyright (c) 2008 Yii Software LLC | |
9 | +rem @license http://www.yiiframework.com/license/ | |
10 | +rem ------------------------------------------------------------- | |
11 | + | |
12 | +@setlocal | |
13 | + | |
14 | +set YII_PATH=%~dp0 | |
15 | + | |
16 | +if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe | |
17 | + | |
18 | +"%PHP_COMMAND%" "%YII_PATH%init" %* | |
19 | + | |
20 | +@endlocal | ... | ... |
1 | +<?php | |
2 | +/** | |
3 | + * Application requirement checker script. | |
4 | + * | |
5 | + * In order to run this script use the following console command: | |
6 | + * php requirements.php | |
7 | + * | |
8 | + * In order to run this script from the web, you should copy it to the web root. | |
9 | + * If you are using Linux you can create a hard link instead, using the following command: | |
10 | + * ln ../requirements.php requirements.php | |
11 | + */ | |
12 | + | |
13 | +// you may need to adjust this path to the correct Yii framework path | |
14 | +$frameworkPath = dirname(__FILE__) . '/vendor/yiisoft/yii2'; | |
15 | + | |
16 | +if (!is_dir($frameworkPath)) { | |
17 | + echo '<h1>Error</h1>'; | |
18 | + echo '<p><strong>The path to yii framework seems to be incorrect.</strong></p>'; | |
19 | + echo '<p>You need to install Yii framework via composer or adjust the framework path in file <abbr title="' . __FILE__ . '">' . basename(__FILE__) . '</abbr>.</p>'; | |
20 | + echo '<p>Please refer to the <abbr title="' . dirname(__FILE__) . '/README.md">README</abbr> on how to install Yii.</p>'; | |
21 | +} | |
22 | + | |
23 | +require_once($frameworkPath . '/requirements/YiiRequirementChecker.php'); | |
24 | +$requirementsChecker = new YiiRequirementChecker(); | |
25 | + | |
26 | +$gdMemo = $imagickMemo = 'Either GD PHP extension with FreeType support or ImageMagick PHP extension with PNG support is required for image CAPTCHA.'; | |
27 | +$gdOK = $imagickOK = false; | |
28 | + | |
29 | +if (extension_loaded('imagick')) { | |
30 | + $imagick = new Imagick(); | |
31 | + $imagickFormats = $imagick->queryFormats('PNG'); | |
32 | + if (in_array('PNG', $imagickFormats)) { | |
33 | + $imagickOK = true; | |
34 | + } else { | |
35 | + $imagickMemo = 'Imagick extension should be installed with PNG support in order to be used for image CAPTCHA.'; | |
36 | + } | |
37 | +} | |
38 | + | |
39 | +if (extension_loaded('gd')) { | |
40 | + $gdInfo = gd_info(); | |
41 | + if (!empty($gdInfo['FreeType Support'])) { | |
42 | + $gdOK = true; | |
43 | + } else { | |
44 | + $gdMemo = 'GD extension should be installed with FreeType support in order to be used for image CAPTCHA.'; | |
45 | + } | |
46 | +} | |
47 | + | |
48 | +/** | |
49 | + * Adjust requirements according to your application specifics. | |
50 | + */ | |
51 | +$requirements = array( | |
52 | + // Database : | |
53 | + array( | |
54 | + 'name' => 'PDO extension', | |
55 | + 'mandatory' => true, | |
56 | + 'condition' => extension_loaded('pdo'), | |
57 | + 'by' => 'All DB-related classes', | |
58 | + ), | |
59 | + array( | |
60 | + 'name' => 'PDO SQLite extension', | |
61 | + 'mandatory' => false, | |
62 | + 'condition' => extension_loaded('pdo_sqlite'), | |
63 | + 'by' => 'All DB-related classes', | |
64 | + 'memo' => 'Required for SQLite database.', | |
65 | + ), | |
66 | + array( | |
67 | + 'name' => 'PDO MySQL extension', | |
68 | + 'mandatory' => false, | |
69 | + 'condition' => extension_loaded('pdo_mysql'), | |
70 | + 'by' => 'All DB-related classes', | |
71 | + 'memo' => 'Required for MySQL database.', | |
72 | + ), | |
73 | + array( | |
74 | + 'name' => 'PDO PostgreSQL extension', | |
75 | + 'mandatory' => false, | |
76 | + 'condition' => extension_loaded('pdo_pgsql'), | |
77 | + 'by' => 'All DB-related classes', | |
78 | + 'memo' => 'Required for PostgreSQL database.', | |
79 | + ), | |
80 | + // Cache : | |
81 | + array( | |
82 | + 'name' => 'Memcache extension', | |
83 | + 'mandatory' => false, | |
84 | + 'condition' => extension_loaded('memcache') || extension_loaded('memcached'), | |
85 | + 'by' => '<a href="http://www.yiiframework.com/doc-2.0/yii-caching-memcache.html">MemCache</a>', | |
86 | + 'memo' => extension_loaded('memcached') ? 'To use memcached set <a href="http://www.yiiframework.com/doc-2.0/yii-caching-memcache.html#$useMemcached-detail">MemCache::useMemcached</a> to <code>true</code>.' : '' | |
87 | + ), | |
88 | + array( | |
89 | + 'name' => 'APC extension', | |
90 | + 'mandatory' => false, | |
91 | + 'condition' => extension_loaded('apc'), | |
92 | + 'by' => '<a href="http://www.yiiframework.com/doc-2.0/yii-caching-apccache.html">ApcCache</a>', | |
93 | + ), | |
94 | + // CAPTCHA: | |
95 | + array( | |
96 | + 'name' => 'GD PHP extension with FreeType support', | |
97 | + 'mandatory' => false, | |
98 | + 'condition' => $gdOK, | |
99 | + 'by' => '<a href="http://www.yiiframework.com/doc-2.0/yii-captcha-captcha.html">Captcha</a>', | |
100 | + 'memo' => $gdMemo, | |
101 | + ), | |
102 | + array( | |
103 | + 'name' => 'ImageMagick PHP extension with PNG support', | |
104 | + 'mandatory' => false, | |
105 | + 'condition' => $imagickOK, | |
106 | + 'by' => '<a href="http://www.yiiframework.com/doc-2.0/yii-captcha-captcha.html">Captcha</a>', | |
107 | + 'memo' => $imagickMemo, | |
108 | + ), | |
109 | + // PHP ini : | |
110 | + 'phpExposePhp' => array( | |
111 | + 'name' => 'Expose PHP', | |
112 | + 'mandatory' => false, | |
113 | + 'condition' => $requirementsChecker->checkPhpIniOff("expose_php"), | |
114 | + 'by' => 'Security reasons', | |
115 | + 'memo' => '"expose_php" should be disabled at php.ini', | |
116 | + ), | |
117 | + 'phpAllowUrlInclude' => array( | |
118 | + 'name' => 'PHP allow url include', | |
119 | + 'mandatory' => false, | |
120 | + 'condition' => $requirementsChecker->checkPhpIniOff("allow_url_include"), | |
121 | + 'by' => 'Security reasons', | |
122 | + 'memo' => '"allow_url_include" should be disabled at php.ini', | |
123 | + ), | |
124 | + 'phpSmtp' => array( | |
125 | + 'name' => 'PHP mail SMTP', | |
126 | + 'mandatory' => false, | |
127 | + 'condition' => strlen(ini_get('SMTP')) > 0, | |
128 | + 'by' => 'Email sending', | |
129 | + 'memo' => 'PHP mail SMTP server required', | |
130 | + ), | |
131 | +); | |
132 | +$requirementsChecker->checkYii()->check($requirements)->render(); | ... | ... |
vagrant/config/.gitignore deleted
vagrant/nginx/log/.gitignore deleted
1 | +@echo off | |
2 | + | |
3 | +rem ------------------------------------------------------------- | |
4 | +rem Yii command line bootstrap script for Windows. | |
5 | +rem | |
6 | +rem @author Qiang Xue <qiang.xue@gmail.com> | |
7 | +rem @link http://www.yiiframework.com/ | |
8 | +rem @copyright Copyright (c) 2008 Yii Software LLC | |
9 | +rem @license http://www.yiiframework.com/license/ | |
10 | +rem ------------------------------------------------------------- | |
11 | + | |
12 | +@setlocal | |
13 | + | |
14 | +set YII_PATH=%~dp0 | |
15 | + | |
16 | +if "%PHP_COMMAND%" == "" set PHP_COMMAND=php.exe | |
17 | + | |
18 | +"%PHP_COMMAND%" "%YII_PATH%yii" %* | |
19 | + | |
20 | +@endlocal | ... | ... |