diff --git a/.gitignore b/.gitignore index 5bd9be8..28419e4 100644 --- a/.gitignore +++ b/.gitignore @@ -18,6 +18,9 @@ Thumbs.db # composer itself is not needed composer.phar +# composer lock +composer.lock + # Mac DS_Store Files .DS_Store diff --git a/assets/AppAsset.php b/assets/AppAsset.php index 3b950fe..732d48e 100644 --- a/assets/AppAsset.php +++ b/assets/AppAsset.php @@ -26,6 +26,6 @@ class AppAsset extends AssetBundle ]; public $depends = [ 'yii\web\YiiAsset', - 'yii\bootstrap4\BootstrapAsset', + 'yii\bootstrap5\BootstrapAsset' ]; } diff --git a/codeception.yml b/codeception.yml index c8c2169..dd8febc 100644 --- a/codeception.yml +++ b/codeception.yml @@ -2,7 +2,7 @@ actor: Tester bootstrap: _bootstrap.php paths: tests: tests - log: tests/_output + output: tests/_output data: tests/_data helpers: tests/_support settings: diff --git a/composer.json b/composer.json index 0edbf98..31d1a6d 100644 --- a/composer.json +++ b/composer.json @@ -15,20 +15,22 @@ "minimum-stability": "dev", "require": { "php": ">=7.4.0", - "yiisoft/yii2": "~2.0.14", - "yiisoft/yii2-bootstrap4": "~2.0.0", + "yiisoft/yii2": "~2.0.45", + "yiisoft/yii2-bootstrap5": "~2.0.2", "yiisoft/yii2-symfonymailer": "~2.0.3" }, "require-dev": { "yiisoft/yii2-debug": "~2.1.0", "yiisoft/yii2-gii": "~2.2.0", "yiisoft/yii2-faker": "~2.0.0", - "codeception/codeception": "^4.0", - "codeception/module-asserts": "^1.0", - "codeception/module-yii2": "^1.0", - "codeception/module-filesystem": "^1.0", + "phpunit/phpunit": "~9.5.0", + "codeception/codeception": "^5.0.0-alpha2 || ^4.0", + "codeception/lib-innerbrowser": "^3.0 || ^1.1", + "codeception/module-asserts": "^3.0 || ^1.1", + "codeception/module-yii2": "dev-codecept5 || ^1.1", + "codeception/module-filesystem": "^3.0 || ^1.1", "codeception/verify": "^2.2", - "symfony/browser-kit": ">=2.7 <=4.2.4" + "symfony/browser-kit": "^6.0 || >=2.7 <=4.2.4" }, "config": { "allow-plugins": { diff --git a/config/test.php b/config/test.php index f2e26ef..317bc1c 100644 --- a/config/test.php +++ b/config/test.php @@ -16,6 +16,9 @@ return [ 'components' => [ 'db' => $db, 'mailer' => [ + 'class' => \yii\symfonymailer\Mailer::class, + 'viewPath' => '@app/mail', + // send all mails to a file by default. 'useFileTransport' => true, 'messageClass' => 'yii\symfonymailer\Message' ], diff --git a/config/web.php b/config/web.php index 25cb0d0..8b9dd3f 100644 --- a/config/web.php +++ b/config/web.php @@ -27,10 +27,9 @@ $config = [ 'errorAction' => 'site/error', ], 'mailer' => [ - 'class' => 'yii\swiftmailer\Mailer', - // send all mails to a file by default. You have to set - // 'useFileTransport' to false and configure transport - // for the mailer to send real emails. + 'class' => \yii\symfonymailer\Mailer::class, + 'viewPath' => '@app/mail', + // send all mails to a file by default. 'useFileTransport' => true, ], 'log' => [ diff --git a/tests/acceptance.suite.yml.example b/tests/acceptance.suite.yml.example index 7bb4986..3821d4f 100644 --- a/tests/acceptance.suite.yml.example +++ b/tests/acceptance.suite.yml.example @@ -1,4 +1,4 @@ -class_name: AcceptanceTester +actor: AcceptanceTester modules: enabled: - WebDriver: diff --git a/tests/functional.suite.yml b/tests/functional.suite.yml index 6d6ff7b..9d8cf14 100644 --- a/tests/functional.suite.yml +++ b/tests/functional.suite.yml @@ -6,7 +6,7 @@ # RUN `build` COMMAND AFTER ADDING/REMOVING MODULES. #basic/web/index.php -class_name: FunctionalTester +actor: FunctionalTester modules: enabled: - Filesystem diff --git a/tests/unit.suite.yml b/tests/unit.suite.yml index d2e6622..c14e49c 100644 --- a/tests/unit.suite.yml +++ b/tests/unit.suite.yml @@ -3,7 +3,7 @@ # suite for unit (internal) tests. # RUN `build` COMMAND AFTER ADDING/REMOVING MODULES. -class_name: UnitTester +actor: UnitTester modules: enabled: - Asserts diff --git a/tests/unit/models/UserTest.php b/tests/unit/models/UserTest.php index cd10725..28986cb 100644 --- a/tests/unit/models/UserTest.php +++ b/tests/unit/models/UserTest.php @@ -31,7 +31,7 @@ class UserTest extends \Codeception\Test\Unit /** * @depends testFindUserByUsername */ - public function testValidateUser($user) + public function testValidateUser() { $user = User::findByUsername('admin'); verify($user->validateAuthKey('test100key'))->notEmpty(); diff --git a/views/layouts/main.php b/views/layouts/main.php index 67328ca..8de99c5 100644 --- a/views/layouts/main.php +++ b/views/layouts/main.php @@ -5,10 +5,10 @@ use app\assets\AppAsset; use app\widgets\Alert; -use yii\bootstrap4\Breadcrumbs; -use yii\bootstrap4\Html; -use yii\bootstrap4\Nav; -use yii\bootstrap4\NavBar; +use yii\bootstrap5\Breadcrumbs; +use yii\bootstrap5\Html; +use yii\bootstrap5\Nav; +use yii\bootstrap5\NavBar; AppAsset::register($this); ?> diff --git a/views/site/contact.php b/views/site/contact.php index 4ae25a9..597fabc 100644 --- a/views/site/contact.php +++ b/views/site/contact.php @@ -1,11 +1,11 @@ title = 'Contact'; diff --git a/views/site/login.php b/views/site/login.php index c8d495e..ebb07d9 100644 --- a/views/site/login.php +++ b/views/site/login.php @@ -1,11 +1,11 @@ title = 'Login'; $this->params['breadcrumbs'][] = $this->title; diff --git a/widgets/Alert.php b/widgets/Alert.php index fd2b195..1302c1f 100644 --- a/widgets/Alert.php +++ b/widgets/Alert.php @@ -23,7 +23,7 @@ use Yii; * @author Kartik Visweswaran * @author Alexander Makarov */ -class Alert extends \yii\bootstrap4\Widget +class Alert extends \yii\bootstrap5\Widget { /** * @var array the alert types configuration for the flash messages. @@ -57,7 +57,7 @@ class Alert extends \yii\bootstrap4\Widget $flash = $session->getFlash($type); foreach ((array) $flash as $i => $message) { - echo \yii\bootstrap4\Alert::widget([ + echo \yii\bootstrap5\Alert::widget([ 'body' => $message, 'closeButton' => $this->closeButton, 'options' => array_merge($this->options, [