diff --git a/framework/CHANGELOG.md b/framework/CHANGELOG.md index a80668a4524..66294578526 100644 --- a/framework/CHANGELOG.md +++ b/framework/CHANGELOG.md @@ -14,7 +14,7 @@ Yii Framework 2 Change Log - Enh #20030: Improve performance of handling `ErrorHandler::$memoryReserveSize` (antonshevelev, rob006) - Enh #20042: Add empty array check to `ActiveQueryTrait::findWith()` (renkas) - Enh #20032: Added `mask` method for string masking with multibyte support (salehhashemi1992) - +- Enh #20047: Throw exception when fixture not found rather than ignoring (borgou) 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.'); } }