yiisoft/yii2 · error · Exception

No fixtures were found in namespace: {$this->namespace}".

Error message

No fixtures were found in namespace: {$this->namespace}".

What it means

Error "No fixtures were found in namespace: {$this->namespace}"." thrown in yiisoft/yii2.

Source

Thrown at framework/console/controllers/FixtureController.php:235

                "Check that files exist under fixtures path: \n\"" . $this->getFixturePath() . '".'
            );
        }

        $fixturesToUnload = array_diff($foundFixtures, $except);

        if ($fixturesToUnload === []) {
            $this->notifyNothingToUnload($foundFixtures, $except);
            return ExitCode::OK;
        }

        if (!$this->confirmUnload($fixturesToUnload, $except)) {
            return ExitCode::OK;
        }

        $fixtures = $this->getFixturesConfig(array_merge($this->globalFixtures, $fixturesToUnload));

        if ($fixtures === []) {
            throw new Exception('No fixtures were found in namespace: ' . $this->namespace . '".');
        }

        $this->unloadFixtures($this->createFixtures($fixtures));
        $this->notifyUnloaded($fixtures);

        return ExitCode::OK;
    }

    /**
     * Show help message.
     */
    private function printHelpMessage()
    {
        $this->stdout($this->getHelpSummary() . "\n");

        $helpCommand = Console::ansiFormat('yii help fixture', [Console::FG_CYAN]);
        $this->stdout("Use $helpCommand to get usage info.\n");
    }

View on GitHub (pinned to 66f00d18a2)

When it happens

Trigger: Thrown at framework/console/controllers/FixtureController.php:235 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of yiisoft/yii2@66f00d18a2 (2026-08-17). Data as JSON: /api/errors/0c2389278384c97b. Report an issue: GitHub.