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

Support PSR4 #3405

Closed
fanqingxuan opened this issue Jul 25, 2020 · 1 comment
Closed

Support PSR4 #3405

fanqingxuan opened this issue Jul 25, 2020 · 1 comment

Comments

@fanqingxuan
Copy link
Contributor

Psr4 specification has been supported by the famous framework like symfony,laravel. I think CI4 also shoud it .But it seems not, For example, all the config files namespace should be App\Config, but now the namespace is Config. in the config directory

@lonnieezell
Copy link
Member

We do support PSR4 standard. Our autoloader is built around it. The Config namespace is an additional namespace root that's been defined, but even it supports PSR4 within it. Theoretically, you could namespace files to App\Config, but since the developer has the option to change the main namespace of the app, we had to provide a way for config files to always be found by the system, even before the autoloader had been loaded. So we added a main Config namespace to handle that.

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

No branches or pull requests

2 participants