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

Do not error on absent config files #124

Open
samdark opened this issue Jan 15, 2023 · 4 comments
Open

Do not error on absent config files #124

samdark opened this issue Jan 15, 2023 · 4 comments
Labels
type:enhancement Enhancement

Comments

@samdark
Copy link
Member

samdark commented Jan 15, 2023

Problem

Too many files returning [] in application's config directory.

Solution

Return [] if the file is not found instead of throwing exception.

To save clarity about what config files are read we can do #125

@samdark samdark added the type:enhancement Enhancement label Jan 15, 2023
@cebe
Copy link
Member

cebe commented Jan 20, 2023

absent files could be allowed by adding the ? marker. Returning empty array on a required file does not seem to be a good idea to me.

@vjik
Copy link
Member

vjik commented Jan 20, 2023

Seems, idea of issue — make all files always optional.

@terabytesoftw
Copy link
Member

terabytesoftw commented Jan 20, 2023

Suppose this case, i have an app without providers.php, but i installed an extension that has the config of providers.php, then it should be guaranteed, that if I have them as optional, it builds the config, without throwing any exception, i think from this is what the topic is about.

@vjik
Copy link
Member

vjik commented Jan 20, 2023

Suppose this case, i have an app without providers.php, but i installed an extension that has the config of providers.php, then it should be guaranteed, that if I have them as optional, it builds the config, without throwing any exception, i think from this is what the topic is about.

It's good case. If it doesn't work that way, it needs to be fixed.

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

No branches or pull requests

4 participants