Open david-sosa-valdes opened 7 years ago
I was a bit afraid of that. I have been thinking the whole bootstrapping process of CI needs to be looked at, since it was dealt with early on to get something to work with, and then another contributor put it in a class, but still doesn't feel right/elegant to me. Which would mean that, ideally, we wouldn't need to run through the index file, but just load up the CodeIgniter.php file and tell it to bootstrap.
We'll watch that discussion and see if anything helpful comes from it, but I'm not overly hopeful.
I've just pushed some changes to the main CodeIgniter repo that should help with this: https://github.com/bcit-ci/CodeIgniter4/pull/367
Yes, the console command it's now operational and wrapped with CI. Now I think we need to define which are the use cases to see if it can correctly execute everything.
Great! Glad that change worked.
To get us started, what use cases did you have implemented on Craftsman?
Craftsman has a simple logic, it only have one generic CI_Controller
that can load all the core and user classes.
Some important features that Vulcan::console
already accomplish correctly are:
Another features that i want to accomplish are:
What do you think?
Yup, I think all of those are great! Very much looking forward to playing with those. :)
Only thing else that I can think off the top of my head is ensuring it's simple to use the debugger in Psysh, but I'm not sure if there's anything we need to do there.
As a matter of fact, i create a simple library that calls psysh in the CI application, all you need to do is include eval(\Vulcan\Libraries\Debugger::check());
in your script.
When your script reaches this point, execution will be suspended and you’ll be dropped into a PsySH shell. Your program state is loaded and available for you to inspect and experiment with.
But the problem here is exactly like when we run the CLI before the last updates of CI4. When you run:
php serve.php
It wraps the psysh\shell inside a passthru execution and makes it no operational, so if you want to use it you must run a server instance with:
php -S localhost:8000 -t public/ rewrite.php"
When we execute the
console
command like:It's ok...the problem here is when we call it using the
ci.php
script like:Because it wraps the
psysh\shell
inside a passthru execution and makes it no operational.I open a discussion to solve this problem on: https://github.com/bobthecow/psysh/issues/343