diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index 1e3de458427..5ca43c47944 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -22,6 +22,7 @@ Yii Framework 2 Change Log - Bug #20489: Replace deprecated `strftime` with `date` in `YiiRequirementChecker` (max-s-lab) - Bug #20494: Fix `PHPdoc`, add `PHPStan/Psalm` annotations for `authMethods` property in `CompositeAuth` class (terabytesoftw) - Bug #20485: Fix error `Cannot unset string offsets` in `yii\di\Instance:ensure(['__class' => ...], 'some\class\name')` (max-s-lab) +- Enh #20047: Throw exception when fixture not found rather than ignoring (borgou) 2.0.53 June 27, 2025 -------------------- @@ -128,7 +129,6 @@ Yii Framework 2 Change Log - Enh #20171: Support JSON columns for MariaDB 10.4 or higher (@terabytesoftw) - New #20137: Added `yii\caching\CallbackDependency` to allow using a callback to determine if a cache dependency is still valid (laxity7) - 2.0.49.2 October 12, 2023 ------------------------- diff --git a/framework/console/controllers/FixtureController.php b/framework/console/controllers/FixtureController.php index caba5d271cd..d7bd236296d 100644 --- a/framework/console/controllers/FixtureController.php +++ b/framework/console/controllers/FixtureController.php @@ -482,6 +482,8 @@ private function getFixturesConfig($fixtures) $config[] = $fullClassName; } elseif (class_exists($fullClassName . 'Fixture')) { $config[] = $fullClassName . 'Fixture'; + } else { + throw new Exception('Neither fixture "' . $fullClassName . '" nor "' . $fullClassName . 'Fixture" was found.'); } }