From ea4964dede7a1d6db9563ce4f0375bb73d451140 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C4=81rti=C5=86=C5=A1=20Briedis?= Date: Tue, 10 Dec 2024 12:40:50 +0200 Subject: [PATCH 1/2] Fix enum test. Value used in assertion should match the actual enum name. --- tests/framework/db/CommandTest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/framework/db/CommandTest.php b/tests/framework/db/CommandTest.php index cc30d748860..1c0b203e9ad 100644 --- a/tests/framework/db/CommandTest.php +++ b/tests/framework/db/CommandTest.php @@ -1539,7 +1539,7 @@ public function testBindValuesSupportsEnums() $command = $db->createCommand(); $command->setSql('SELECT :p1')->bindValues([':p1' => enums\Status::Active]); - $this->assertSame('ACTIVE', $command->params[':p1']); + $this->assertSame('Active', $command->params[':p1']); $command->setSql('SELECT :p1')->bindValues([':p1' => enums\StatusTypeString::Active]); $this->assertSame('active', $command->params[':p1']); From b761bef43922e4b2fa2fc51276392000b7e774bf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C4=81rti=C5=86=C5=A1=20Briedis?= Date: Tue, 10 Dec 2024 12:45:50 +0200 Subject: [PATCH 2/2] Update changelog with pull request #20296 --- framework/CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 60cc9c34596..5d194e4316b 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -22,6 +22,7 @@ Yii Framework 2 Change Log - Bug #20140: Fix compatibility with PHP 8.4: calling `session_set_save_handler()` (Izumi-kun) - New #20185: Add `BackedEnum` support to `AttributeTypecastBehavior` (briedis) - Bug #17365: Fix "Trying to access array offset on null" warning (xcopy) +- Bug #20296: Fix broken enum test (briedis) 2.0.51 July 18, 2024 --------------------