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

fix: replace config(DocTypes::class) with new DocTypes() #7872

Merged
merged 2 commits into from
Aug 31, 2023

Conversation

kenjis
Copy link
Member

@kenjis kenjis commented Aug 29, 2023

Description
Supersedes #7860

  • fix the error "FactoriesCache undefined method Config\DocTypes::__set_state" when using Config Caching and html helper.
  • change _solidus() for testing.

Checklist:

  • Securely signed commits
  • Component(s) with PHPDoc blocks, only if necessary or adds value
  • Unit testing, with >80% coverage
  • User guide updated
  • Conforms to style guide

@kenjis kenjis added bug Verified issues on the current code behavior or pull requests that will fix them 4.4 labels Aug 29, 2023
@kenjis
Copy link
Member Author

kenjis commented Aug 29, 2023

I thought this approach was better, but it seems difficult to write tests.
_solidus() is a function that has the state, but there is no way to change the state if we don't use config().
@paulbalandan What do you think?

@kenjis kenjis marked this pull request as draft August 29, 2023 03:13
@kenjis kenjis marked this pull request as ready for review August 29, 2023 06:33
@kenjis
Copy link
Member Author

kenjis commented Aug 29, 2023

This may be forced, but I can change the state of _solidus() for testing.

@kenjis kenjis mentioned this pull request Aug 29, 2023
9 tasks
@kenjis kenjis merged commit 37ebc6f into codeigniter4:develop Aug 31, 2023
@kenjis kenjis deleted the fix-FactoriesCache-error branch August 31, 2023 04:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.4 bug Verified issues on the current code behavior or pull requests that will fix them
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants