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

feat: Added ablity to update Services Cache at runtime. #8894

Closed
wants to merge 27 commits into from

Conversation

pyromanci
Copy link

@pyromanci pyromanci commented May 14, 2024

Description
I need a different method to load Modules. I wanted to set it up so it was more database driven for enabling or disabling a module. This lead to problems with Services not being auto discovered by the buildServicesCache() function. As the autoloader doesn't know those files exist at the point it time it is called. So added a function that will update the service cache with and new Classes discovered since initial build.

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 and others added 21 commits May 8, 2024 17:47
If it is not called, assertions may not work correctly.
See CLITest::testPromptInputZero().
Even if you rename the Controllers directory, you still are able to
use auto routing with proper $defaultNamespace setting.
Since v4.5.0, you can define App and Config in composer.json.
fix: CLI::promptByMultipleKeys() and prompt()
docs: improve concepts/structure.rst
docs: remove outdated note in managing_apps.rst
docs: fix text decoration in autoloader.rst
@pyromanci pyromanci changed the title Feat - Added ablity to update Services Cache at runtime. feat - Added ablity to update Services Cache at runtime. May 14, 2024
@kenjis
Copy link
Member

kenjis commented May 14, 2024

Thank you for sending this PR!

We expect the following in all Pull Requests (PRs).

Important

We expect all code changes or bug-fixes to be accompanied by one or more tests added to our test suite to prove the code works.

If pull requests do not comply with the above, they will likely be closed. Since we are a team of volunteers, we don't have any more time to work on the framework than you do. Please make it as painless for your contributions to be included as possible.

See https://github.com/codeigniter4/CodeIgniter4/blob/develop/contributing/pull_request.md

@kenjis kenjis added tests needed Pull requests that need tests wrong branch PRs sent to wrong branch GPG-Signing needed Pull requests that need GPG-Signing enhancement PRs that improve existing functionalities labels May 14, 2024
@kenjis kenjis changed the title feat - Added ablity to update Services Cache at runtime. feat: Added ablity to update Services Cache at runtime. May 14, 2024
@kenjis kenjis added the docs needed Pull requests needing documentation write-ups and/or revisions. label May 14, 2024
@pyromanci pyromanci changed the base branch from develop to 4.6 May 15, 2024 00:31
@kenjis kenjis removed the wrong branch PRs sent to wrong branch label May 15, 2024
@kenjis
Copy link
Member

kenjis commented May 15, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4.6 docs needed Pull requests needing documentation write-ups and/or revisions. enhancement PRs that improve existing functionalities GPG-Signing needed Pull requests that need GPG-Signing tests needed Pull requests that need tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants