public function detectFormat(string $fixturePath): string
    {
        $info = new SplFileInfo($fixturePath);
        $extension = $info->getExtension();
        $knownFormats = [
            DbItf::FIXTURE_FORMAT_JSON,
            DbItf::FIXTURE_FORMAT_PHP,
            DbItf::FIXTURE_FORMAT_SQL,
            DbItf::FIXTURE_FORMAT_TXT,
        ];

        if (!in_array($extension, $knownFormats)) {
            throw new FixtureLoaderEx("Unknown fixture format: $extension.");
        }

        return $extension;
    }