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

[Improvement Request] Add Minimal Configuration Validation #150

Open
trickeyone opened this issue Apr 8, 2021 · 0 comments
Open

[Improvement Request] Add Minimal Configuration Validation #150

trickeyone opened this issue Apr 8, 2021 · 0 comments
Assignees

Comments

@trickeyone
Copy link

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants