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:159

            throw new Exception(
                'No files were found for: "' . implode(', ', $fixturesInput) . "\".\n" .
                "Check that files exist under fixtures path: \n\"" . $this->getFixturePath() . '".'
            );
        }

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

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

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

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

        $fixturesObjects = $this->createFixtures($fixtures);

        $this->unloadFixtures($fixturesObjects);
        $this->loadFixtures($fixturesObjects);
        $this->notifyLoaded($fixturesObjects);

        return ExitCode::OK;
    }

    /**
     * Unloads the specified fixtures.
     *
     * For example,
     *
     * ```
     * # unload the fixture data specified by User and UserProfile.

View on GitHub (pinned to 66f00d18a2)

When it happens

Trigger: Thrown at framework/console/controllers/FixtureController.php:159 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/6631df3025f81eca. Report an issue: GitHub.