-
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
Issue Extend Core Class #1653
Comments
The library namespace is I think the class is not in the correct filepath: If is the case, move and test, please: <?php namespace App\Controllers;
use CodeIgniter\Controller;
use Config\Services;
class Issue1653 extends Controller
{
public function index()
{
$r = Services::renderer();
\var_dump($r->exists('errors/html/unknown'));
\var_dump($r->exists('errors/html/error_404'));
}
} I tested, and it worked. |
@natanfelles did a check, the class path is correct. Mind u, this error occurs when the sharedinstance is true. |
Good to know that you found the bug when you saw that using the same instance in Thanks for mind me (and saying why) even though I've seen it but thought it was part of your customizations! Next time you do not need to open an issue because of this, and that's very good. |
@natanfelles please re-phrase "Good to know that you found the bug when you saw that using the same instance in $r it worked." I seem lost. |
No. You are not lost. You solved. And that's it. Thanks, for say that if the Have a great week, @chistel ! |
There's an issue with getsharedinstance while extend the core class.
prior to the last major change on Autoload and Baseservice, it was all Good.
for instance i extended the view class and used the extended service as follows,
$renderer = Services::renderer($path, null, true);
i still get a call to the core class lib instead of the extended lib.
then i extended the render service as shown below
The text was updated successfully, but these errors were encountered: