{"record":{"id":"7e26f29e2d85a451","repo":"symfony/translation","slug":"the-scheme-is-not-supported-by-any-provider","errorCode":null,"errorMessage":"The scheme is not supported by any provider.","messagePattern":"The scheme is not supported by any provider\\.","errorType":"exception","errorClass":"UnsupportedSchemeException","httpStatus":null,"severity":"error","filePath":"Provider/TranslationProviderCollectionFactory.php","lineNumber":52,"sourceCode":"            $providers[$name] = $this->fromDsnObject(\n                new Dsn($currentConfig['dsn']),\n                !$currentConfig['locales'] ? $this->enabledLocales : $currentConfig['locales'],\n                !$currentConfig['domains'] ? [] : $currentConfig['domains']\n            );\n        }\n\n        return new TranslationProviderCollection($providers);\n    }\n\n    public function fromDsnObject(Dsn $dsn, array $locales, array $domains = []): ProviderInterface\n    {\n        foreach ($this->factories as $factory) {\n            if ($factory->supports($dsn)) {\n                return new FilteringProvider($factory->create($dsn), $locales, $domains);\n            }\n        }\n\n        throw new UnsupportedSchemeException($dsn);\n    }\n}\n","sourceCodeStart":34,"sourceCodeEnd":55,"githubUrl":"https://github.com/symfony/translation/blob/ae9e8a51bc29780d63c7f9efd6005d7c875e100b/Provider/TranslationProviderCollectionFactory.php#L34-L55","documentation":"Thrown by TranslationProviderCollectionFactory::fromDsnObject() when no registered provider factory supports the Dsn's scheme. It produces UnsupportedSchemeException with a default message indicating the scheme is not supported by any provider.","triggerScenarios":"Calling fromDsnObject/fromConfig with a DSN whose scheme no factory's supports() accepts — e.g. an unknown or misspelled scheme, or a factory package not installed.","commonSituations":"Using a provider package that is not composer-installed (e.g. symfony/loco-translation-provider missing), typo in DSN scheme, or a DSN scheme like 'http://' that no translation provider supports.","solutions":["Install the matching provider package: composer require symfony/<provider>-translation-provider","Check the DSN scheme spelling in TRANSLATION_PROVIDER_DSN","List supported schemes via each factory's getSupportedSchemes() to confirm"],"exampleFix":"// before\nTRANSLATION_PROVIDER_DSN=loco://default  # loco provider not installed\n// after\ncomposer require symfony/loco-translation-provider\nTRANSLATION_PROVIDER_DSN=loco://API_KEY@default","handlingStrategy":"validation","validationCode":"$supported = array_merge(...array_map(fn($f) => $f->getSupportedSchemes(), $factories));\nif (!in_array($dsn->getScheme(), $supported, true)) {\n    throw new \\InvalidArgumentException(\"Scheme {$dsn->getScheme()} unsupported; install the provider package.\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    $collection = $factory->fromConfig($config, $locales, $domains);\n} catch (UnsupportedSchemeException $e) {\n    // report that the DSN scheme has no installed provider factory\n}","preventionTips":["composer require the symfony/<provider>-translation-provider package for each DSN you use","Keep TRANSLATION_PROVIDER_DSN schemes lowercase and exact","Smoke-test provider DSNs in CI before deploy"],"tags":["php","symfony","translation","dsn","factory"],"backgroundTag":"unsupported-config-value","analyzedSha":"ae9e8a51bc29780d63c7f9efd6005d7c875e100b","analyzedAt":"2026-09-15T22:29:15.305Z","contentChangedAt":"2026-09-15T22:29:15.305Z","schemaVersion":2},"datasetVersion":"2026-09-16T09:17:16.951Z"}