openapi-php-sdk icon indicating copy to clipboard operation
openapi-php-sdk copied to clipboard

Symfony: Environment variables not loaded before client initialization

Open francescobianco opened this issue 1 year ago • 0 comments

Labels: config, symfony, bug Context: Symfony 6.4 with Dotenv component

Description: When initializing the Openapi SDK in a Symfony service during kernel boot, the .env values are not yet loaded, causing missing credentials or base URL.

Expected: Defer initialization until after environment variables are fully resolved (e.g. during container compilation).

Impact: Impossible to use different API keys for dev/staging/prod environments.

francescobianco avatar Nov 09 '25 16:11 francescobianco