dev-master
9999999-dev https://github.com/atukai/php-settings-middlewarePHP settings managing middleware
The Requires
- php ^5.6 || ^7.0
middleware settings php
PHP settings managing middleware
Managing php settings., (*1)
composer require atukai/php-settings-middleware
, (*2)
To configure the php settings as you required, add the following to your config file
under php_setting
key:, (*3)
'php_settings' => [ 'display_startup_errors' => false, 'display_errors' => true, 'max_execution_time' => 30, 'date.timezone' => 'UTC', 'routes' => [ 'home' => [ 'memory_limit' => '32M', 'max_execution_time' => '60', ], ], ]
Add factory to container config, (*4)
'dependencies' => [ 'factories' => [ ... \At\PhpSettings\PhpSettingsMiddleware::class => \At\PhpSettings\PhpSettingsMiddlewareFactory::class, ... ], ],
Add the middleware to the pipeline, (*5)
'middleware' => [ ... \At\PhpSettings\PhpSettingsMiddleware::class, ... ],
For more details of PHP ini configurations see, (*6)
PHP settings managing middleware
middleware settings php