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

Update config() to check all namespaces #2079

Merged
merged 1 commit into from
Jun 29, 2019

Conversation

MGatner
Copy link
Member

@MGatner MGatner commented Jun 28, 2019

Description
Calling config($classname) with an un-namespaced class passes the string to $locator->locateFile() which causes it to use legacyLocate(), which searches App and System only. This change leaves the default behavior but falls back to $locator->search() instead of failing immediately, allowing calls like config('Auth') to check first in App and System and then in any autoloaded namespaces.

Checklist:

  • Securely signed commits
  • Component(s) with PHPdocs
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@lonnieezell lonnieezell merged commit cd97aba into codeigniter4:develop Jun 29, 2019
@MGatner MGatner deleted the config-namespaces branch June 29, 2019 10:32
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

Successfully merging this pull request may close these issues.

2 participants