-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
docs: calling cells without a full namespace #8327
Conversation
Is the current behavior intentional? CodeIgniter4/system/View/Cell.php Line 184 in 2420424
|
My guess is it's intentional. Otherwise, we would call it like: Factories::cells($class, ['getShared' => false]) which should be enough to get a new instance every time. Edit: |
Well... the more I think about it, the more I'm convinced the better option would be to use Factories::cells($class, ['getShared' => false]) If we call the same cell a couple of times, the odds we will use the same data is probably very rare. Thoughts? |
At least, I don't know why it creates a new instance when a FQCN comes but shares the instance when a shortname comes. CodeIgniter4/system/View/Cell.php Line 185 in 2420424
|
Seems like it was introduced here: #7686 |
This PR #6601 introduced
We just did not need to share the instance created by the Factories? |
Ok, I didn't know that was an issue. Seems like we can now use Factories exclusively - just without sharing the instance. That should cover all the options. |
I added an alternative solution: #8330 |
We went with an alternative solution. |
Description
This PR adds a note about calling cells without a full namespace.
Fixes #8326
Checklist: