From 8a980897015c85017260c2a66fb72e4be44b787a Mon Sep 17 00:00:00 2001 From: Matheus Evangelista Morais Date: Wed, 12 Feb 2025 22:25:20 -0300 Subject: [PATCH 1/9] Just adding space in comments for documentation --- views/site/error.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/views/site/error.php b/views/site/error.php index 4a37b2568..176874796 100644 --- a/views/site/error.php +++ b/views/site/error.php @@ -3,7 +3,7 @@ /** @var yii\web\View $this */ /** @var string $name */ /** @var string $message */ -/** @var Exception$exception */ +/** @var Exception $exception */ use yii\helpers\Html; From fa65fe091e50daadab408b8b72744ff3c9a0b3a2 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 13 Feb 2025 23:25:15 +0300 Subject: [PATCH 2/9] release version 2.0.52 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4b6cab88c..0d05011ca 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "irc": "ircs://irc.libera.chat:6697/yii", "source": "https://github.com/yiisoft/yii2" }, - "minimum-stability": "dev", + "minimum-stability": "stable", "require": { "php": ">=7.4.0", "yiisoft/yii2": "~2.0.45", From 281a5dcec4e0856764c1a94594e3535a73678208 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Thu, 13 Feb 2025 23:25:29 +0300 Subject: [PATCH 3/9] prepare for next release --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0d05011ca..4b6cab88c 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "irc": "ircs://irc.libera.chat:6697/yii", "source": "https://github.com/yiisoft/yii2" }, - "minimum-stability": "stable", + "minimum-stability": "dev", "require": { "php": ">=7.4.0", "yiisoft/yii2": "~2.0.45", From 2b430206f2ac40fb6d93b00462493cbc77b2036b Mon Sep 17 00:00:00 2001 From: Fejan <63099555+fejan-malek@users.noreply.github.com> Date: Mon, 9 Jun 2025 15:40:44 +0530 Subject: [PATCH 4/9] Update cache version and PHP version in GH workflow action (#320) --- .github/workflows/build.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f1065f909..564343a98 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: env: extensions: dom, json, gd, imagick - key: cache-v1 + key: cache-v4 runs-on: ${{ matrix.os }} @@ -24,6 +24,9 @@ jobs: - "7.4" - "8.0" - "8.1" + - "8.2" + - "8.3" + - "8.4" steps: - name: Checkout @@ -38,7 +41,7 @@ jobs: key: ${{ env.key }} - name: Cache extensions - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ${{ steps.cache-env.outputs.dir }} key: ${{ steps.cache-env.outputs.key }} @@ -62,7 +65,7 @@ jobs: echo "COMPOSER_CACHE_DIR=~\AppData\Local\Composer" >> $GITHUB_ENV - name: Cache dependencies installed with composer - uses: actions/cache@v1 + uses: actions/cache@v4 with: path: ${{ steps.cache-env.outputs.dir }} key: php${{ matrix.php }}-composer-${{ matrix.dependencies }}-${{ hashFiles('**/composer.json') }} From 2fedf51a4f4c662a57133294ef1850c4d838f947 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Fri, 27 Jun 2025 11:01:57 +0300 Subject: [PATCH 5/9] release version 2.0.53 --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 4b6cab88c..0d05011ca 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "irc": "ircs://irc.libera.chat:6697/yii", "source": "https://github.com/yiisoft/yii2" }, - "minimum-stability": "dev", + "minimum-stability": "stable", "require": { "php": ">=7.4.0", "yiisoft/yii2": "~2.0.45", From 9836ece64899d4faac10ad43aaed85a99ace9410 Mon Sep 17 00:00:00 2001 From: Alexander Makarov Date: Fri, 27 Jun 2025 11:02:11 +0300 Subject: [PATCH 6/9] prepare for next release --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 0d05011ca..4b6cab88c 100644 --- a/composer.json +++ b/composer.json @@ -12,7 +12,7 @@ "irc": "ircs://irc.libera.chat:6697/yii", "source": "https://github.com/yiisoft/yii2" }, - "minimum-stability": "stable", + "minimum-stability": "dev", "require": { "php": ">=7.4.0", "yiisoft/yii2": "~2.0.45", From 3c14e8bade29455f6315d9e7216dacc9dacfc9f2 Mon Sep 17 00:00:00 2001 From: Fejan <63099555+fejan-malek@users.noreply.github.com> Date: Thu, 14 Aug 2025 21:50:58 +0530 Subject: [PATCH 7/9] Change: updated checkout version in GH from v2 to v5 (#321) --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 564343a98..a5beac653 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v5 - name: Setup cache environment id: cache-env From 0f91f32ecff52ef479addb0a5013342d59fe0697 Mon Sep 17 00:00:00 2001 From: Maksim Spirkov <63721828+mspirkov@users.noreply.github.com> Date: Mon, 27 Oct 2025 10:51:14 +0300 Subject: [PATCH 8/9] Fix codestyle (#322) --- assets/AppAsset.php | 1 + commands/HelloController.php | 1 + config/__autocomplete.php | 12 +++++++----- config/test.php | 1 + config/test_db.php | 1 + mail/layouts/text.php | 2 +- models/LoginForm.php | 2 +- requirements.php | 1 + tests/_bootstrap.php | 3 ++- tests/_support/AcceptanceTester.php | 6 +++--- tests/_support/FunctionalTester.php | 1 - tests/_support/UnitTester.php | 6 +++--- tests/acceptance/ContactCest.php | 4 ++-- tests/acceptance/HomeCest.php | 6 +++--- tests/functional/ContactFormCest.php | 8 ++++---- tests/functional/LoginFormCest.php | 5 ++--- tests/unit/models/LoginFormTest.php | 1 - tests/unit/models/UserTest.php | 5 ++--- tests/unit/widgets/AlertTest.php | 6 ++++-- 19 files changed, 39 insertions(+), 33 deletions(-) diff --git a/assets/AppAsset.php b/assets/AppAsset.php index 3d40487ae..d9d4cc430 100644 --- a/assets/AppAsset.php +++ b/assets/AppAsset.php @@ -1,4 +1,5 @@ validate()) { - return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600*24*30 : 0); + return Yii::$app->user->login($this->getUser(), $this->rememberMe ? 3600 * 24 * 30 : 0); } return false; } diff --git a/requirements.php b/requirements.php index c1a6bf680..db69a36ee 100644 --- a/requirements.php +++ b/requirements.php @@ -1,4 +1,5 @@ amOnPage(Url::toRoute('/site/contact')); } - + public function contactPageWorks(AcceptanceTester $I) { $I->wantTo('ensure that contact page works'); @@ -25,7 +25,7 @@ public function contactFormCanBeSubmitted(AcceptanceTester $I) $I->fillField('#contactform-verifycode', 'testme'); $I->click('contact-button'); - + $I->wait(2); // wait for button to be clicked $I->dontSeeElement('#contact-form'); diff --git a/tests/acceptance/HomeCest.php b/tests/acceptance/HomeCest.php index e65df16ae..98fb6b9f7 100644 --- a/tests/acceptance/HomeCest.php +++ b/tests/acceptance/HomeCest.php @@ -6,13 +6,13 @@ class HomeCest { public function ensureThatHomePageWorks(AcceptanceTester $I) { - $I->amOnPage(Url::toRoute('/site/index')); + $I->amOnPage(Url::toRoute('/site/index')); $I->see('My Company'); - + $I->seeLink('About'); $I->click('About'); $I->wait(2); // wait for page to be opened - + $I->see('This is the About page.'); } } diff --git a/tests/functional/ContactFormCest.php b/tests/functional/ContactFormCest.php index d17ef52fd..f1ccaf18f 100644 --- a/tests/functional/ContactFormCest.php +++ b/tests/functional/ContactFormCest.php @@ -1,6 +1,6 @@ see('Contact', 'h1'); + $I->see('Contact', 'h1'); } public function submitEmptyForm(\FunctionalTester $I) @@ -38,7 +38,7 @@ public function submitFormWithIncorrectEmail(\FunctionalTester $I) $I->see('Email is not a valid email address.'); $I->dontSee('Subject cannot be blank', '.help-inline'); $I->dontSee('Body cannot be blank', '.help-inline'); - $I->dontSee('The verification code is incorrect', '.help-inline'); + $I->dontSee('The verification code is incorrect', '.help-inline'); } public function submitFormSuccessfully(\FunctionalTester $I) @@ -52,6 +52,6 @@ public function submitFormSuccessfully(\FunctionalTester $I) ]); $I->seeEmailIsSent(); $I->dontSeeElement('#contact-form'); - $I->see('Thank you for contacting us. We will respond to you as soon as possible.'); + $I->see('Thank you for contacting us. We will respond to you as soon as possible.'); } } diff --git a/tests/functional/LoginFormCest.php b/tests/functional/LoginFormCest.php index 7a83a27d6..a1545a706 100644 --- a/tests/functional/LoginFormCest.php +++ b/tests/functional/LoginFormCest.php @@ -10,7 +10,6 @@ public function _before(\FunctionalTester $I) public function openLoginPage(\FunctionalTester $I) { $I->see('Login', 'h1'); - } // demonstrates `amLoggedInAs` method @@ -54,6 +53,6 @@ public function loginSuccessfully(\FunctionalTester $I) 'LoginForm[password]' => 'admin', ]); $I->see('Logout (admin)'); - $I->dontSeeElement('form#login-form'); + $I->dontSeeElement('form#login-form'); } -} \ No newline at end of file +} diff --git a/tests/unit/models/LoginFormTest.php b/tests/unit/models/LoginFormTest.php index 3c1dcddaa..6f96c2377 100644 --- a/tests/unit/models/LoginFormTest.php +++ b/tests/unit/models/LoginFormTest.php @@ -47,5 +47,4 @@ public function testLoginCorrect() verify(\Yii::$app->user->isGuest)->false(); verify($this->model->errors)->arrayHasNotKey('password'); } - } diff --git a/tests/unit/models/UserTest.php b/tests/unit/models/UserTest.php index 28986cbbd..3db9772a3 100644 --- a/tests/unit/models/UserTest.php +++ b/tests/unit/models/UserTest.php @@ -19,7 +19,7 @@ public function testFindUserByAccessToken() verify($user = User::findIdentityByAccessToken('100-token'))->notEmpty(); verify($user->username)->equals('admin'); - verify(User::findIdentityByAccessToken('non-existing'))->empty(); + verify(User::findIdentityByAccessToken('non-existing'))->empty(); } public function testFindUserByUsername() @@ -38,7 +38,6 @@ public function testValidateUser() verify($user->validateAuthKey('test102key'))->empty(); verify($user->validatePassword('admin'))->notEmpty(); - verify($user->validatePassword('123456'))->empty(); + verify($user->validatePassword('123456'))->empty(); } - } diff --git a/tests/unit/widgets/AlertTest.php b/tests/unit/widgets/AlertTest.php index e9857a161..af2db5d21 100644 --- a/tests/unit/widgets/AlertTest.php +++ b/tests/unit/widgets/AlertTest.php @@ -177,7 +177,8 @@ public function testMultipleWarningMessages() verify($renderingResult)->stringNotContainsString('alert-info'); } - public function testSingleMixedMessages() { + public function testSingleMixedMessages() + { $errorMessage = 'This is an error message'; $dangerMessage = 'This is a danger message'; $successMessage = 'This is a success message'; @@ -204,7 +205,8 @@ public function testSingleMixedMessages() { verify($renderingResult)->stringContainsString('alert-warning'); } - public function testMultipleMixedMessages() { + public function testMultipleMixedMessages() + { $firstErrorMessage = 'This is the first error message'; $secondErrorMessage = 'This is the second error message'; $firstDangerMessage = 'This is the first danger message'; From db54e5150dcdcebe1ca3ee2edab1f7e2a84f72f3 Mon Sep 17 00:00:00 2001 From: Maksim Spirkov <63721828+mspirkov@users.noreply.github.com> Date: Mon, 27 Oct 2025 21:41:22 +0300 Subject: [PATCH 9/9] Exclude commits with CS changes from Git Blame (#323) --- .git-blame-ignore-revs | 8 ++++++++ .gitattributes | 11 ++++++----- .gitignore | 3 +++ 3 files changed, 17 insertions(+), 5 deletions(-) create mode 100644 .git-blame-ignore-revs diff --git a/.git-blame-ignore-revs b/.git-blame-ignore-revs new file mode 100644 index 000000000..011c056bb --- /dev/null +++ b/.git-blame-ignore-revs @@ -0,0 +1,8 @@ +# Reformat code te be PSR-2 compatible +93cc82c4bf42cea403e1acaab201338bea304b6e +# Convert to short syntax (array) +332030325fbad38a64c5e60980d3b14b6434d6dd +# Convert to short syntax +b0fcdfab1aecaeb620f75a83f15aa02bc25765a0 +# Fix codestyle +0f91f32ecff52ef479addb0a5013342d59fe0697 diff --git a/.gitattributes b/.gitattributes index 3e9092c68..705fb391d 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,6 +1,7 @@ # Ignore all test and documentation for archive -/.github export-ignore -/.gitattributes export-ignore -/.scrutinizer.yml export-ignore -/.travis.yml export-ignore -/docs export-ignore +/.github export-ignore +/.git-blame-ignore-revs export-ignore +/.gitattributes export-ignore +/.scrutinizer.yml export-ignore +/.travis.yml export-ignore +/docs export-ignore diff --git a/.gitignore b/.gitignore index 5bd9be80b..05fb29d1b 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,9 @@ # phpstorm project files .idea +# visual studio code project files +.vscode + # netbeans project files nbproject