Welcome Guest, Not a member yet? Register   Sign In
Poll: Should CLI support HTTP Verbs
You do not have permission to vote in this poll.
Yes
100.00%
1 100.00%
No
0%
0 0%
Total 1 vote(s) 100%
* You voted for this item. [Show Results]

Serving HTTP verbs via CLI
#1

Currently, any request made through CLI receives the method 'cli'.

Further, there are PHP servers that run purely in CLI mode and forwards requests to frameworks like CI.

However, currently CI is very strict in this manner and ignores any HTTP verbs passed to it.

It is not good to limit the framework to work majorly with PHP-FPM processes and offer a limited CLI context.
I would request that CI should remove this limitation and accept/serve HTTP verbs passed through CLI.

Thanks
Reply
#2

(10-09-2022, 02:59 AM)amit Wrote: Further, there are PHP servers that run purely in CLI mode and forwards requests to frameworks like CI.

What exactly is it?

(10-09-2022, 02:59 AM)amit Wrote: However, currently CI is very strict in this manner and ignores any HTTP verbs passed to it.

What is the exact issue?
How to reproduce?
Reply
#3

(10-10-2022, 04:35 PM)kenjis Wrote: What exactly is it?
Swoole server

(10-10-2022, 04:35 PM)kenjis Wrote: What is the exact issue?
How to reproduce?

I attempted to load CI files on the Swoole server startup.
And was forwarding requests to CodeIgniter with a customized InputRequest class.
But after all CI was handling it as a CLI request ignoring the HTTP verb associated from the forwarded request.

I can't share the code due to company policy but it was setting up Swoole and let CI handle request/response.
My code could be wrong but seems like CI has nothing like Laravel Octane and I don't understand laravel
Reply
#4

(This post was last modified: 10-15-2022, 01:15 AM by kenjis.)

See https://forum.codeigniter.com/showthread.php?tid=83970

First of all, CI4 is simply not designed to work with Long-living PHP like Swoole;
it is not restricted for use with Swoole, it is designed without any assumption that it would be used with a server like Swoole.

So it is not easy task to work with Swoole.

CodeIgniter4-Burner does not support Swoole now, but I recommend you check it.
Reply




Theme © iAndrew 2016 - Forum software by © MyBB