Skip to content

[Improvement Request] Add Minimal Configuration Validation #150

Open
@trickeyone

Description

@trickeyone

So, it's not a major issue but I ran into something that took me way longer than it should have to figure out. For some reason, OneLogin\Saml2\Auth kept errorring when loading the config saying that both the idp and sp configurations were missing. Background, I'm on Symfony 5.2, so all bundle configs go in the packages directory.

I had the YAML file with the hslavich_onelogin_saml config completely filled out with both sections. I even added debug var_dump calls in where the config was supposed to be parsed (the HslavichOneloginSamlExtension), but the config was coming back with only an empty organization section. Long story (slightly) short, it turns out that the YAML file had the short yml extension instead of yaml and Symfony only loads yaml extensions.

So, my ask would be to add a step similar to something like what Doctrine does, maybe. Where it checks that at least the dbal section of the config is set, if it isn't a LogicException is thrown. Just a sanity check.

Maybe also look at adding a Symfony Flex recipe to auto-generate the config file?

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions