Merge branch 'master' into beta

Conflicts:
	config/autoload/database.local.php.dist
	package.json
pull/1/head
The Netlor Automerger 2017-01-18 14:25:40 +01:00
commit c3e9880b1b
15 changed files with 175 additions and 109 deletions

View File

@ -2,7 +2,7 @@ Monarc - Cases
Copyright (c) 2016, securitymadein.lu - Smile GIE
This software might use third party componenets, acknowledged here by :
This software might use third party components, acknowledged here by :
- Zend Framework, v2.4.9

View File

@ -13,8 +13,8 @@
"zendframework/zendframework": "2.5.3",
"doctrine/doctrine-orm-module": "^0.10",
"robmorgan/phinx": "0.5.*",
"monarc/core": "dev-beta",
"monarc/backoffice": "dev-beta",
"monarc/core": "dev-master",
"monarc/backoffice": "dev-master",
"phing/phing": "~2.0"
},
"config": {
@ -23,11 +23,11 @@
"repositories": [
{
"type": "vcs",
"url": "https://github.com/CASES-LU/zm-core"
"url": "git+ssh://gogs@rhea.netlor.fr:2222/monarc/zm_core"
},
{
"type": "vcs",
"url": "https://github.com/CASES-LU/zm-backoffice"
"url": "git+ssh://gogs@rhea.netlor.fr:2222/monarc/zm_backoffice"
}
]
}

View File

@ -5,6 +5,7 @@
*
* @see https://github.com/zendframework/ZFTool
*/
$env = getenv('APP_ENV') ?: 'production';
return array(
'modules' => array(
'DoctrineModule',
@ -19,6 +20,12 @@ return array(
),
'config_glob_paths' => array(
'config/autoload/{,*.}{global,local}.php'
)
),
'config_cache_enabled' => ($env == 'production'),
'config_cache_key' => 'c8aaaaa11586f8b1bf5565cc6064e70a', // md5('config_cache_key_monarc')
'module_map_cache_enabled' => ($env == 'production'),
'module_map_cache_key' => '664579376c4dcdcaa0bcdd0f7e7bf25b', // md5('module_map_cache_key_monarc'),
'cache_dir' => 'data/cache/',
'check_dependencies' => ($env != 'production'),
),
);

View File

@ -5,6 +5,7 @@
*
* @see https://github.com/zendframework/ZFTool
*/
$env = getenv('APP_ENV') ?: 'production';
return array(
'modules' => array(
'DoctrineModule',
@ -19,6 +20,12 @@ return array(
),
'config_glob_paths' => array(
'config/autoload/{,*.}{global,local}.php'
)
),
'config_cache_enabled' => ($env == 'production'),
'config_cache_key' => 'c8aaaaa11586f8b1bf5565cc6064e70a', // md5('config_cache_key_monarc')
'module_map_cache_enabled' => ($env == 'production'),
'module_map_cache_key' => '664579376c4dcdcaa0bcdd0f7e7bf25b', // md5('module_map_cache_key_monarc'),
'cache_dir' => 'data/cache/',
'check_dependencies' => ($env != 'production'),
),
);

View File

@ -1,2 +1,4 @@
local.php
*.local.php
global.php
*.global.php

View File

@ -1,10 +0,0 @@
<?php
return [
'languages' => [
1 => 'Français',
2 => 'English',
3 => 'Deutsch'
],
'defaultLanguageIndex' => 2
];

View File

@ -1,24 +0,0 @@
<?php
return array(
'doctrine' => array(
'connection' => array(
'orm_default' => array(
'params' => array(
'host' => '@db.host@',
'user' => '@db.username@',
'password' => '@db.password@',
'dbname' => '@db.name.core@',
)
),
'orm_cli' => array(
'params' => array(
'host' => '@db.host@',
'user' => '@db.username@',
'password' => '@db.password@',
'dbname' => '@db.name.backoffice@',
)
)
)
)
);

21
config/autoload/global.php Normal file → Executable file
View File

@ -12,6 +12,11 @@
*/
return array(
// DOCTRINE CONF
'service_manager' => array(
'factories' => array(
'doctrine.cache.mycache' => 'MonarcCore\Service\DoctrineCacheServiceFactory',
),
),
'doctrine' => array(
'connection' => array(
'orm_default' => array(
@ -20,7 +25,7 @@ return array(
'host' => 'localhost',
'port' => 3306,
'user' => 'user',
'password' => 'password',
'password' => '',
'dbname' => 'monarc_common',
'charset' => 'utf8',
'driverOptions' => array(
@ -34,7 +39,7 @@ return array(
'host' => 'localhost',
'port' => 3306,
'user' => 'root',
'password' => 'password',
'password' => '',
'dbname' => 'monarc_cli',
'charset' => 'utf8',
'driverOptions' => array(
@ -71,9 +76,9 @@ return array(
),
'configuration' => array(
'orm_default' => array(
'metadata_cache' => 'array',
'query_cache' => 'array',
'result_cache' => 'array',
'metadata_cache' => 'mycache',
'query_cache' => 'mycache',
'result_cache' => 'mycache',
'driver' => 'orm_default', // This driver will be defined later
'generate_proxies' => true,
'proxy_dir' => 'data/DoctrineORMModule/Proxy',
@ -85,9 +90,9 @@ return array(
'second_level_cache' => array(),
),
'orm_cli' => array(
'metadata_cache' => 'array',
'query_cache' => 'array',
'result_cache' => 'array',
'metadata_cache' => 'mycache',
'query_cache' => 'mycache',
'result_cache' => 'mycache',
'driver' => 'orm_cli', // This driver will be defined later
'generate_proxies' => true,
'proxy_dir' => 'data/DoctrineORMModule/Proxy',

109
config/autoload/global.php.dist Executable file
View File

@ -0,0 +1,109 @@
<?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.
*/
return array(
// DOCTRINE CONF
'service_manager' => array(
'factories' => array(
'doctrine.cache.mycache' => 'MonarcCore\Service\DoctrineCacheServiceFactory',
),
),
'doctrine' => array(
'connection' => array(
'orm_default' => array(
'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
'params' => array(
'host' => 'localhost',
'port' => 3306,
'user' => 'user',
'password' => '',
'dbname' => 'monarc_common',
'charset' => 'utf8',
'driverOptions' => array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
),
),
),
'orm_cli' => array(
'driverClass' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
'params' => array(
'host' => 'localhost',
'port' => 3306,
'user' => 'root',
'password' => '',
'dbname' => 'monarc_cli',
'charset' => 'utf8',
'driverOptions' => array(
PDO::MYSQL_ATTR_INIT_COMMAND => 'SET NAMES utf8',
),
),
),
),
/*'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',
),
),*/
'entitymanager' => array(
'orm_default' => array(
'connection' => 'orm_default',
'configuration' => 'orm_default'
),
'orm_cli' => array(
'connection' => 'orm_cli',
'configuration' => 'orm_cli',
),
),
'configuration' => array(
'orm_default' => array(
'metadata_cache' => 'mycache',
'query_cache' => 'mycache',
'result_cache' => 'mycache',
'driver' => 'orm_default', // This driver will be defined later
'generate_proxies' => true,
'proxy_dir' => 'data/DoctrineORMModule/Proxy',
'proxy_namespace' => 'DoctrineORMModule\Proxy',
'filters' => array(),
'datetime_functions' => array(),
'string_functions' => array(),
'numeric_functions' => array(),
'second_level_cache' => array(),
),
'orm_cli' => array(
'metadata_cache' => 'mycache',
'query_cache' => 'mycache',
'result_cache' => 'mycache',
'driver' => 'orm_cli', // This driver will be defined later
'generate_proxies' => true,
'proxy_dir' => 'data/DoctrineORMModule/Proxy',
'proxy_namespace' => 'DoctrineORMModule\Proxy',
'filters' => array(),
'datetime_functions' => array(),
'string_functions' => array(),
'numeric_functions' => array(),
'second_level_cache' => array(),
),
),
),
// END DOCTRINE CONF
);

View File

@ -1,30 +0,0 @@
<?php
return array(
'languages' => [
1 => 'Français',
2 => 'English',
3 => 'Deutsch'
],
'defaultLanguageIndex' => 1,
/* Link with (ModuleCore)
config['languages'] = [
'fr' => array(
'index' => 1,
'label' => 'Français'
),
'en' => array(
'index' => 2,
'label' => 'English'
),
'de' => array(
'index' => 3,
'label' => 'Deutsch'
),
]
*/
'activeLanguages' => array('fr','en','de',)
);

View File

@ -33,15 +33,6 @@ return array(
),
),
'languages' => [
1 => 'Français',
2 => 'English',
3 => 'Deutsch'
],
'defaultLanguageIndex' => 1,
/* Link with (ModuleCore)
config['languages'] = [
'fr' => array(

View File

@ -1,13 +0,0 @@
<?php
return [
'smtp' => [
'name' => 'mailtrap.io',
'host' => 'mailtrap.io',
'connection_class' => 'crammd5',
'connection_config' => [
'username' => '******',
'password' => '******',
],
]
];

View File

@ -1,13 +1,27 @@
#!/bin/bash
if [ -d node_modules/ng_backoffice ]; then
pushd node_modules/ng_backoffice
../.bin/grunt compile_translations
../.bin/grunt concat
pushd node_modules/ng_backoffice
grunt compile_translations
grunt concat
if [ -d node_modules/ng_backoffice/po ]; then
for i in $(ls node_modules/ng_backoffice/po/*\.po); do
l=$(basename $i .po)
msgfmt -o ./node_modules/ng_backoffice/po/$l.mo -v ./node_modules/ng_backoffice/po/$l.po
done;
fi
fi
if [ -d node_modules/ng_client ]; then
pushd node_modules/ng_client
../.bin/grunt compile_translations
../.bin/grunt concat
pushd node_modules/ng_client
grunt compile_translations
grunt concat
if [ -d node_modules/ng_client/po ]; then
for i in $(ls node_modules/ng_client/po/*\.po); do
l=$(basename $i .po)
msgfmt -o ./node_modules/ng_client/po/$l.mo -v ./node_modules/ng_client/po/$l.po
done;
fi
fi

View File

@ -59,7 +59,7 @@ if [ -d node_modules/ng_backoffice ]; then
cd ../..
pushd node_modules/ng_backoffice
../.bin/grunt concat
grunt concat
popd
fi
@ -90,7 +90,7 @@ if [ -d node_modules/ng_client ]; then
cd ../..
pushd node_modules/ng_client
../.bin/grunt concat
grunt concat
popd
fi

View File

@ -66,3 +66,11 @@ fi
./scripts/link_modules_resources.sh
./scripts/compile_translations.sh
# Clear doctrine cache
php ./public/index.php orm:clear-cache:metadata
php ./public/index.php orm:clear-cache:query
php ./public/index.php orm:clear-cache:result
# Clear ZF2 cache
touch ./data/cache/upgrade && chmod 777 ./data/cache/upgrade