plume-solution / nitrophp-skeleton
Symfony skeleton powered by ReactPHP async functionality
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 5
Forks: 0
Open Issues: 7
Type:project
Requires
- php: ^7.1.3
- ext-ctype: *
- ext-iconv: *
- nyholm/psr7: ^1.1
- react/http: ^0.8.4
- sensio/framework-extra-bundle: ^5.3
- symfony/console: ^4.2
- symfony/debug-pack: ^1.0
- symfony/dotenv: ^4.2
- symfony/flex: ^1.1
- symfony/framework-bundle: ^4.2
- symfony/maker-bundle: ^1.11
- symfony/monolog-bundle: ^3.3
- symfony/orm-pack: ^1.0
- symfony/psr-http-message-bridge: ^1.2
- symfony/security-bundle: ^4.2
- symfony/swiftmailer-bundle: ^3.2
- symfony/validator: ^4.2
- symfony/yaml: ^4.2
Requires (Dev)
- symfony/test-pack: ^1.0
Conflicts
- dev-master
- v2.0.2
- v2.0.1
- v2.0.0
- v1.0.0
- dev-renovate/packagist-react-http-vulnerability
- dev-renovate/major-symfony
- dev-dependabot/composer/react/http-1.9.0
- dev-dependabot/composer/nyholm/psr7-1.6.1
- dev-renovate/sensio-framework-extra-bundle-6.x
- dev-renovate/php-8.x
- dev-dependabot/composer/symfony/http-kernel-5.1.9
This package is auto-updated.
Last update: 2024-09-09 02:59:27 UTC
README
NitroPHP skeleton is a skeleton for Symfony enpowered by ReactPHP for ultimate performance.
It uses an great asynchronous server for managing request->response cycle and implementing an asynchronous periodic timer based command launching for recurrent task.
Installation
you can install this skeleton by using composer by using :
composer create-project plume-solution/nitrophp-skeleton
Usage
server
Server is simply to use, it is a script in bin directory.
For launching, just use :
php bin/react
It use the kernel in a separate process for handle request ike the original index.php of symfony.
For now it is unable to stream assets, please use for api server only. Don't worry, this is future planned
Please refer to original documentation of symfony for create your first controller : https://symfony.com/doc/current/page_creation.html
If you need a specific configuration on the server, you can edit /config/package/server.yaml like this :
parameters: loop: server: url: 'http://127.0.0.1' port: 9000
Async periodic service
NitroPHP skeleton implementing async symfony command call, this is called from unique instantied kernel of the server and is more speed than using Cron (for linux) or planified task (for windows)
For configuring an periodic call, edit /config/package/periodic_timer.yaml like this :
parameters: loop: timer: mySuperService: #just using for clean config input: 'app:my:super:command' #command to call from console time: 60 #time in second before call another time the command
See Official documentation for creating your first command : https://symfony.com/doc/current/console.html#creating-a-command
Future planned
- Unit test
- Assets stream on the server
- Performance improvement
- On update reboot
- Many cool project using NitroPHP 😎
- and your suggest 😁