-
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
[Autoloader] include_once is not needed on Autoloader::loadClass() with no namespace #4756
[Autoloader] include_once is not needed on Autoloader::loadClass() with no namespace #4756
Conversation
1ef1f78
to
a9d0ad8
Compare
The test for it is already in : CodeIgniter4/tests/system/Autoloader/AutoloaderTest.php Lines 175 to 189 in 5fc58f9
also proven in other tests like |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I'm missing something. If a non-namespaced file is found, this will now just return the file path without include_once
it. So where will this get loaded? Will this be delegated in the next autoload function registered?
Actually, it should just return false as it somehow handled by Fabricator, iirc, it previously was needed as cause class redeclare, @paulbalandan what do you think of non - namespace return false? |
@paulbalandan looking at the previous change on this, this was introduced for faster load due to As the I updated at 81c5454 |
@MGatner @paulbalandan thank you for the review. |
include_once is not needed on get class with no namespace for
Autoloader::loadClass()
call as it try to getapp\Config
that autoloaded.Checklist: