Download the PHP package ensi/octane-swoole-urgent-starter without Composer
On this page you can find all versions of the php package ensi/octane-swoole-urgent-starter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ensi/octane-swoole-urgent-starter
More information about ensi/octane-swoole-urgent-starter
Files in ensi/octane-swoole-urgent-starter
Package octane-swoole-urgent-starter
Short Description Laravel octane swoole urgent starter
License MIT
Informations about the package octane-swoole-urgent-starter
Alternative Laravel Octane swoole server starter
This package adds alternative behaviour to octane server for dev and prod usage.
Dev: server process continue work even if syntax error appears in code.
Prod: you can start swoole master process directly, without artisan command, which consumes some memory.
Installation
You can install the package via composer:
and add this section to config/octane.php file
Version Compatibility
Laravel Octane swoole server starter | Laravel Octane | PHP |
---|---|---|
^0.1.0 | ^1.2 | * |
^2.0.0 | ^2.0 | ^8.1 |
Basic Usage
Dev
Just start octane server with swoole backend and --watch option,
and see how it reloads after very fatal errors.
If you want to see error message in http response, set true
to OCTANE_SHOW_FATAL_ERROR
environment variable.
Prod
Originally, octane:start
command makes server state file and then starts swoole process as child.
Now you can to separate this to two steps.
First: use octane:dump-server-state
command for saving server state file.
Second: start swoole process, without any useless parent.
When service works in ELC workspace
Old elc workspace template uses hack for reloading code without container restarts. You should to replace last artisan command in templates/swoole-X.X/php/entrypoint to this
Contributing
Please see CONTRIBUTING for details.
Testing
- composer install
- composer test
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
License
The MIT License (MIT). Please see License File for more information.