Skip to content
This repository was archived by the owner on Jan 1, 2020. It is now read-only.

Commit bec15ed

Browse files
committed
Provide production settings out-of-the-box
- Enable config caching, and provide a cache key - Enable module map caching, and provide a cache key - Specify the configuration cache directory - Ensure glob paths are fully qualified (required for IBM i Series)
1 parent f1de7cb commit bec15ed

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

config/application.config.php

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -24,27 +24,27 @@
2424
// modules are loaded. These effectively override configuration
2525
// provided by modules themselves. Paths may use GLOB_BRACE notation.
2626
'config_glob_paths' => [
27-
'config/autoload/{{,*.}global,{,*.}local}.php',
27+
realpath(__DIR__) . '/autoload/{{,*.}global,{,*.}local}.php',
2828
],
2929

3030
// Whether or not to enable a configuration cache.
3131
// If enabled, the merged configuration will be cached and used in
3232
// subsequent requests.
33-
//'config_cache_enabled' => $booleanValue,
33+
'config_cache_enabled' => true,
3434

3535
// The key used to create the configuration cache file name.
36-
//'config_cache_key' => $stringKey,
36+
'config_cache_key' => 'application.config.cache',
3737

3838
// Whether or not to enable a module class map cache.
3939
// If enabled, creates a module class map cache which will be used
4040
// by in future requests, to reduce the autoloading process.
41-
//'module_map_cache_enabled' => $booleanValue,
41+
'module_map_cache_enabled' => true,
4242

4343
// The key used to create the class map cache file name.
44-
//'module_map_cache_key' => $stringKey,
44+
'module_map_cache_key' => 'application.module.cache',
4545

4646
// The path in which to cache merged configuration.
47-
//'cache_dir' => $stringPath,
47+
'cache_dir' => 'data/cache/',
4848

4949
// Whether or not to enable modules dependency checking.
5050
// Enabled by default, prevents usage of modules that depend on other modules
@@ -53,16 +53,16 @@
5353
],
5454

5555
// Used to create an own service manager. May contain one or more child arrays.
56-
//'service_listener_options' => array(
57-
// array(
56+
//'service_listener_options' => [
57+
// [
5858
// 'service_manager' => $stringServiceManagerName,
5959
// 'config_key' => $stringConfigKey,
6060
// 'interface' => $stringOptionalInterface,
6161
// 'method' => $stringRequiredMethodName,
62-
// ),
63-
// ),
62+
// ],
63+
// ],
6464

6565
// Initial configuration with which to seed the ServiceManager.
6666
// Should be compatible with Zend\ServiceManager\Config.
67-
// 'service_manager' => array(),
67+
// 'service_manager' => [],
6868
];

config/development.config.php.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ return [
1111
],
1212
// Configuration overrides during development mode
1313
'module_listener_options' => [
14-
'config_glob_paths' => ['config/autoload/{,*.}{global,local}-development.php'],
14+
'config_glob_paths' => [realpath(__DIR__) . '/autoload/{,*.}{global,local}-development.php'],
1515
'config_cache_enabled' => false,
1616
'module_map_cache_enabled' => false,
1717
],

0 commit comments

Comments
 (0)