CakePHP PHP PM Bridge
Alpha. Please use at your own risk.
IMPORTANT: Cookies not working at this point, so no sessions or Csrf available, (*1)
CakePHP Bridge to use with PHP-PM project (https://github.com/php-pm/php-pm)., (*2)
Requirements
- CakePHP ^4.0
- PHP ^7.2
- phpcgi installed
- php_pcntl extension installed and enabled
Setup
-
Via composer, add to your composer.json, (*3)
"cakedc/cakephp-phppm": "dev-master", (*4)
Run
-
Execute the PM via command line, (*5)
vendor/bin/ppm --bridge='\CakeDC\PHPPM\Bridges\Cakephp' start --debug 0 --workers 9 --logging 0 --static-directory webroot, (*6)
vendor/bin/ppm --bridge='\CakeDC\PHPPM\Bridges\Cakephp' start --debug 1 --workers 1 --static-directory webroot, (*7)
Testing it
-
Try some benchmarks, (*8)
ab -n 5000 -c 100 http://127.0.0.1:8080/api/posts, (*9)
Important notes
- Cookies: they are not working properly now, so you won't have sessions OR Csrf properly working, if you
are providing an API this is not something that should bother you too much anyway...
- This plugin bootstraps your application once, so ensure your bootstrap is not dynamic, for example, no
dynamic routes coming from database based on request params.
Support
Commercial support is also available, contact us for more information., (*10)
Contributing
This repository follows the CakeDC Plugin Standard. If you'd like to contribute new features, enhancements or bug fixes to the plugin, please read our Contribution Guidelines for detailed instructions., (*11)
License
Copyright 2018 Cake Development Corporation (CakeDC). All rights reserved., (*12)
Licensed under the MIT License. Redistributions of the source code included in this repository must retain the copyright notice found in each file., (*13)