2017-01-10 16:51:55 +01:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Global Configuration Override
|
|
|
|
*
|
|
|
|
* You can use this file for overriding configuration values from modules, etc.
|
|
|
|
* You would place values in here that are agnostic to the environment and not
|
|
|
|
* sensitive to security.
|
|
|
|
*
|
|
|
|
* @NOTE: In practice, this file will typically be INCLUDED in your source
|
|
|
|
* control, so do not include passwords or other sensitive information in this
|
|
|
|
* file.
|
|
|
|
*/
|
2017-03-10 15:24:01 +01:00
|
|
|
|
2022-06-21 15:09:07 +02:00
|
|
|
use Doctrine\DBAL\Driver\PDO\MySQL\Driver;
|
2019-10-30 14:52:53 +01:00
|
|
|
use Monarc\Core\Service\DoctrineCacheServiceFactory;
|
|
|
|
use Monarc\Core\Service\DoctrineLoggerFactory;
|
|
|
|
|
2023-10-24 11:40:14 +02:00
|
|
|
$dataPath = 'data';
|
|
|
|
if (defined('DATA_PATH')) {
|
|
|
|
$dataPath = DATA_PATH;
|
|
|
|
} elseif (!empty(getenv('APP_CONF_DIR'))) {
|
|
|
|
$dataPath = getenv('APP_CONF_DIR') . '/data';
|
2017-03-10 15:24:01 +01:00
|
|
|
}
|
|
|
|
|
2023-10-24 11:40:14 +02:00
|
|
|
return [
|
2017-01-10 16:51:55 +01:00
|
|
|
// DOCTRINE CONF
|
2023-10-24 11:40:14 +02:00
|
|
|
'service_manager' => [
|
|
|
|
'factories' => [
|
2019-10-30 14:52:53 +01:00
|
|
|
'doctrine.cache.mycache' => DoctrineCacheServiceFactory::class,
|
|
|
|
'doctrine.monarc_logger' => DoctrineLoggerFactory::class,
|
2023-10-24 11:40:14 +02:00
|
|
|
],
|
|
|
|
],
|
|
|
|
'doctrine' => [
|
|
|
|
'connection' => [
|
|
|
|
'orm_default' => [
|
2019-10-30 14:52:53 +01:00
|
|
|
'driverClass' => Driver::class,
|
2023-10-24 11:40:14 +02:00
|
|
|
'params' => [
|
2017-01-23 15:28:41 +01:00
|
|
|
'host' => '127.0.0.1',
|
2017-01-10 16:51:55 +01:00
|
|
|
'port' => 3306,
|
2017-01-23 15:28:41 +01:00
|
|
|
'user' => 'root',
|
2017-01-10 16:51:55 +01:00
|
|
|
'password' => '',
|
|
|
|
'dbname' => 'monarc_common',
|
|
|
|
'charset' => 'utf8',
|
2023-10-24 11:40:14 +02:00
|
|
|
'driverOptions' => [
|
2017-01-23 15:01:17 +01:00
|
|
|
PDO::ATTR_STRINGIFY_FETCHES => false,
|
|
|
|
PDO::ATTR_EMULATE_PREPARES => false,
|
2017-01-10 16:51:55 +01:00
|
|
|
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
|
2023-10-24 11:40:14 +02:00
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'orm_cli' => [
|
2019-10-30 14:52:53 +01:00
|
|
|
'driverClass' => Driver::class,
|
2023-10-24 11:40:14 +02:00
|
|
|
'params' => [
|
2017-01-23 15:28:41 +01:00
|
|
|
'host' => '127.0.0.1',
|
2017-01-10 16:51:55 +01:00
|
|
|
'port' => 3306,
|
|
|
|
'user' => 'root',
|
|
|
|
'password' => '',
|
|
|
|
'dbname' => 'monarc_cli',
|
|
|
|
'charset' => 'utf8',
|
2023-10-24 11:40:14 +02:00
|
|
|
'driverOptions' => [
|
2017-01-23 15:01:17 +01:00
|
|
|
PDO::ATTR_STRINGIFY_FETCHES => false,
|
|
|
|
PDO::ATTR_EMULATE_PREPARES => false,
|
2017-01-10 16:51:55 +01:00
|
|
|
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
|
2023-10-24 11:40:14 +02:00
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
2017-01-10 16:51:55 +01:00
|
|
|
/*'migrations_configuration' => array(
|
|
|
|
'orm_default' => array(
|
|
|
|
'name' => 'Monarc Migrations',
|
|
|
|
'directory' => __DIR__."/../../migrations",
|
|
|
|
'namespace' => 'Monarc\Migrations',
|
|
|
|
'table' => 'migrations',
|
|
|
|
'column' => 'version',
|
|
|
|
),
|
|
|
|
'orm_cli' => array(
|
|
|
|
'name' => 'Monarc Common Migrations',
|
|
|
|
'directory' => __DIR__."/../../migrations",
|
|
|
|
'namespace' => 'MonarcCli\Migrations',
|
|
|
|
'table' => 'migrations',
|
|
|
|
'column' => 'version',
|
|
|
|
),
|
|
|
|
),*/
|
2023-10-24 11:40:14 +02:00
|
|
|
'entitymanager' => [
|
|
|
|
'orm_default' => [
|
|
|
|
'connection' => 'orm_default',
|
|
|
|
'configuration' => 'orm_default',
|
|
|
|
],
|
|
|
|
'orm_cli' => [
|
|
|
|
'connection' => 'orm_cli',
|
2017-01-10 16:51:55 +01:00
|
|
|
'configuration' => 'orm_cli',
|
2023-10-24 11:40:14 +02:00
|
|
|
],
|
|
|
|
],
|
|
|
|
'configuration' => [
|
|
|
|
'orm_default' => [
|
|
|
|
'metadata_cache' => 'mycache',
|
|
|
|
'query_cache' => 'mycache',
|
|
|
|
'result_cache' => 'mycache',
|
|
|
|
'driver' => 'orm_default', // This driver will be defined later
|
|
|
|
'generate_proxies' => true,
|
|
|
|
'proxy_dir' => $dataPath . '/DoctrineORMModule/Proxy',
|
|
|
|
'proxy_namespace' => 'DoctrineORMModule\Proxy',
|
|
|
|
'filters' => [],
|
|
|
|
'datetime_functions' => [],
|
|
|
|
'string_functions' => [],
|
|
|
|
'numeric_functions' => [],
|
|
|
|
'second_level_cache' => [],
|
|
|
|
'sql_logger' => 'doctrine.monarc_logger',
|
|
|
|
],
|
|
|
|
'orm_cli' => [
|
|
|
|
'metadata_cache' => 'mycache',
|
|
|
|
'query_cache' => 'mycache',
|
|
|
|
'result_cache' => 'mycache',
|
|
|
|
'driver' => 'orm_cli', // This driver will be defined later
|
|
|
|
'generate_proxies' => true,
|
|
|
|
'proxy_dir' => $dataPath . '/DoctrineORMModule/Proxy',
|
|
|
|
'proxy_namespace' => 'DoctrineORMModule\Proxy',
|
|
|
|
'filters' => [],
|
|
|
|
'datetime_functions' => [],
|
|
|
|
'string_functions' => [],
|
|
|
|
'numeric_functions' => [],
|
|
|
|
'second_level_cache' => [],
|
|
|
|
'sql_logger' => 'doctrine.monarc_logger',
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
2017-03-10 11:36:39 +01:00
|
|
|
|
2023-10-24 11:40:14 +02:00
|
|
|
'spool_path_create' => $dataPath . '/json/create/',
|
|
|
|
//default location path where the json file enabling the creation of the environment of the client should be generated
|
|
|
|
'spool_path_delete' => $dataPath . '/json/delete/',
|
|
|
|
//default location path where the json file enabling the deletion of the environment of the client should be generated
|
|
|
|
'spool_path_update' => $dataPath . '/json/update/',
|
2017-03-10 11:36:39 +01:00
|
|
|
|
2017-01-10 16:51:55 +01:00
|
|
|
// END DOCTRINE CONF
|
2023-10-24 11:40:14 +02:00
|
|
|
];
|