[split] appstarter doesn't work (CodeIgniter 4.0.0-beta.3 released) |
I just tried out the codeigniter4/appstarter and it doesn't work "out of the box". I'd report it on GitHub but the project repo doesn't have an issue tracker.
The problem is simple to fix - it ships with the DebugToolbar enabled in app/Config/Filters.php. PHP Code: // Makes reading things below nicer, The toolbar needs to be commented out in $globals['after'] like so: PHP Code: // Always applied before every request Just thought I'd post this for anyone wondering why the appstarter doesn't work out-of-the-box.
Thanks for your reply. It isn't really a "problem", easily worked around but it could be off-putting to someone trying the framework out. I thought I had supplied sufficient detail in my earlier post but I'll post the error log here for completeness:
Quote:CRITICAL - 2019-05-17 12:39:38 --> Class 'CodeIgniter\Filters\DebugToolbar' not found This is a fresh install using composer (composer create-project codeigniter4/appstarter ci4 -s beta) and running on PHP 7.2 with all dependencies met. I can test with other PHP versions if you like. I notice that "vendor/codeigniter4/framework/application/Filters/DebugToolbar.php" has a namespace of "App\Filters" while "app/Config/Filters.php" uses "\CodeIgniter\Filters\DebugToolbar::class" as shown in the first code snippet in my earlier post.
Hmm - something hinky here.
"vendor/codeigniter4/framework/application/Filters/DebugToolbar.php" should not exist - that looks like an old remnant, before the "application" folder was renamed "app", and the DebugToolbar was moved from app/ to system/. I have found that I need to do a "composer update" after creating a new project with the appstarter, to get everything fully up-to-date.
Excellent - yes, running composer update fixes the missing \CodeIgniter\Filters\DebugToolbar class. As to why this is necessary, I had a quick look at the source of the appstarter composer.lock file:
Code: "name": "codeigniter4/framework",
Well, that was more work than I expected (I had to update Sphinx to version 1.8.0 on Debian to get the documentation to build) but I have sent a pull request as promised.
|
Welcome Guest, Not a member yet? Register Sign In |