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

Use lowercase service names #2569

Merged
merged 1 commit into from
Feb 18, 2020
Merged

Conversation

MGatner
Copy link
Member

@MGatner MGatner commented Feb 17, 2020

Description
Shared and mocked instance names are all stored in lowercase, but not necessarily looked up by the same. This PR forces the lowercase version to be used during getSharedInstance() as well.

Fixes #2534

Checklist:

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

@MGatner
Copy link
Member Author

MGatner commented Feb 17, 2020

Just a note... This causes static function calls to use the lowercase version as well. Because PHP is case insensitive this works fine, but could cause problems if that ever were to change.

@MGatner MGatner merged commit 30b02c6 into codeigniter4:develop Feb 18, 2020
@MGatner MGatner deleted the mock-lower branch November 28, 2020 18:44
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.

Bug: system/Config/BaseService.php getSharedInstance() will not return mocks with non-lowercase key
1 participant