mobingilabs / php-microservice-base
Expressive Skeleton 3 - Mobingi PHP Base
Requires
- php: ^7.1
- ext-json: *
- aws/aws-sdk-php: ^3.55
- justinrainbow/json-schema: ^5.2
- roave/security-advisories: dev-master
- zendframework/zend-component-installer: ^2.1.1
- zendframework/zend-config-aggregator: ^1.0
- zendframework/zend-diactoros: ^1.7.1
- zendframework/zend-expressive: ^3.0.1
- zendframework/zend-expressive-fastroute: ^3.0
- zendframework/zend-expressive-helpers: ^5.0
- zendframework/zend-http: ^2.8
- zendframework/zend-i18n: ^2.9
- zendframework/zend-inputfilter: ^2.8
- zendframework/zend-permissions-rbac: ^3.0
- zendframework/zend-servicemanager: ^3.3
- zendframework/zend-stdlib: ^3.1
Requires (Dev)
- composer/composer: ^1.5
- filp/whoops: ^2.1.12
- phpunit/phpunit: ^7.0.1
- squizlabs/php_codesniffer: ^2.9.1
- zendframework/zend-expressive-tooling: ^1.0
- zfcampus/zf-development-mode: ^3.1
README
$ composer create-project mobingilabs/php-microservice-base your_service_name_here
Follow the composer instructions and it will generate the project using data provided in the wizard.
Expressive Skeleton 3 - [SERVICE_NAME] Micro-service
Application Development Mode Tool
This skeleton comes with zf-development-mode. It provides a composer script to allow you to enable and disable development mode.
To enable development mode
Note: Do NOT run development mode on your production server!
$ composer development-enable
Note: Enabling development mode will also clear your configuration cache, to allow safely updating dependencies and ensuring any new configuration is picked up by your application.
To disable development mode
$ composer development-disable
Development mode status
$ composer development-status
Configuration caching
By default, the skeleton will create a configuration cache in
data/config-cache.php
. When in development mode, the configuration cache is
disabled, and switching in and out of development mode will remove the
configuration cache.
You may need to clear the configuration cache in production when deploying if you deploy to the same directory. You may do so using the following:
$ composer clear-config-cache
You may also change the location of the configuration cache itself by editing
the config/config.php
file and changing the config_cache_path
entry of the
local $cacheConfig
variable.