Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow EnvironmentParameterStore to cast environment values to non-string types #345

Open
cspray opened this issue Jun 21, 2023 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@cspray
Copy link
Owner

cspray commented Jun 21, 2023

The getenv function used by EnvironmentParameterStore will result in a string always being returned the way the class is currently implemented. The return type on this method is currently erroneous; it is declared as string|array|false but will never return array nor false.

Ideally this parameter store would be aware of the type of the parameter it is being injected into and cast where appropriate. This could allow declaring configuration provided through the environment with proper types (e.g. a database configuration specifying a port as an integer).

@cspray cspray added the enhancement New feature or request label Jun 21, 2023
@cspray cspray added this to the v3.0.0 Release milestone Jun 21, 2023
@cspray cspray self-assigned this Jun 21, 2023
@cspray cspray removed this from the v3.0.0 Release milestone May 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: No status
Development

No branches or pull requests

1 participant