OpenAPI Generator allows generation of API client libraries (SDK generation), server stubs, documentation and configuration automatically given an OpenAPI Spec (v2, v3)
Is your feature request related to a problem? Please describe.
I enhanced config in Slim4 generator, but not really satisfied with the result(I use that generator a lot in real projects).
Here is example of current config in Slim4 generator
Describe the solution you'd like
Thinks that I'm pretty sure about:
it's important to keep sensitive config data out of source base(credentials, api keys, log path, support emails etc.).
everything else can be committed to source code and should be committed
there should be two config files for dev and prod
config file can be .env or .ini file, but I got really bad experience of working with them, so php array seems most reasonable.
app should work with default config in most cases. Usually you don't even need config to start development, so for database credentials we can set something common like localhost:root:root. I wouldn't throw exceptions if config file doesn't exist, maybe it's done on purpose.
placed in config folder outside of public like it's recommended by PDS
@l0gicgate if you have any suggestions on how to organize config files in Slim project please let us know.
@odan I hope your will allow to use your config pattern as reference. I'm not going to copy paste it entirely.
Is your feature request related to a problem? Please describe.
I enhanced config in Slim4 generator, but not really satisfied with the result(I use that generator a lot in real projects). Here is example of current config in Slim4 generator
Describe the solution you'd like
Thinks that I'm pretty sure about:
.env
or.ini
file, but I got really bad experience of working with them, so php array seems most reasonable.localhost:root:root
. I wouldn't throw exceptions if config file doesn't exist, maybe it's done on purpose.config
folder outside ofpublic
like it's recommended by PDSDescribe alternatives you've considered
I really like @odan approach in odan/slim4-skeleton project and it's weird that official Slim skeleton includes completely different flow with
SettingsInterface
.Additional context
@l0gicgate if you have any suggestions on how to organize config files in Slim project please let us know. @odan I hope your will allow to use your config pattern as reference. I'm not going to copy paste it entirely.