fix: wrong Config classname to config() in Toolbar#7735
Merged
kenjis merged 1 commit intocodeigniter4:developfrom Jul 25, 2023
Merged
fix: wrong Config classname to config() in Toolbar#7735kenjis merged 1 commit intocodeigniter4:developfrom
kenjis merged 1 commit intocodeigniter4:developfrom
Conversation
5 tasks
kenjis
commented
Jul 25, 2023
| return; | ||
| } | ||
|
|
||
| $toolbar = Services::toolbar(config(self::class)); |
Member
Author
There was a problem hiding this comment.
self::class is CodeIgniter\Debug\Toolbar, and the basename is Toolbar.
So Factories will load Config\Toolbar (preferApp) now.
Member
Author
There was a problem hiding this comment.
But with #7733, Factories will try to instantiate CodeIgniter\Debug\Toolbar,
and it causes:
ArgumentCountError
Too few arguments to function CodeIgniter\Debug\Toolbar::__construct(), 0 passed in
/.../CodeIgniter4/system/Config/Factories.php on line 183 and exactly 1 expected
But I was not able to get the error message and error log if I did not enable step debugging with Xdebug.
Why spark serve died without log?
Member
There was a problem hiding this comment.
I'm not sure; that's an odd one. Maybe some kind of autoloading loop?
paulbalandan
approved these changes
Jul 25, 2023
michalsn
approved these changes
Jul 25, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
From 6f8f3a2
I don't know why, but this bug crashes
spark servewith #7733Steps to Reproduce
Check out #7733. Run
spark serve.Navigate to http://localhost:8080/, and I see:
Checklist: