Skip to content

Instantly share code, notes, and snippets.

@miholeus
Created June 6, 2013 15:01
Show Gist options
  • Save miholeus/5722168 to your computer and use it in GitHub Desktop.
Save miholeus/5722168 to your computer and use it in GitHub Desktop.
application.yml
base:
components:
db:
connectionString: 'mysql:host=localhost;dbname=default_crm'
username: o.mikhailov
password: ahPi7faiwei
connections:
developer:
connectionString: 'mysql:host=localhost;dbname=crm_extended'
username: o.mikhailov
password: ahPi7faiwei
charset: utf8
slave:
connectionString: 'mysql:host=localhost;dbname=default_crm'
username: o.mikhailov
password: ahPi7faiwei
charset: utf8
# Настройки логирования
log:
routes:
4: # Для записи ошибок в БД нужен этот класс
class: components\Log\DbErrorLogger
levels: 'error, warning, trace, info'
enabled: true
autoCreateLogTable: false
connectName: developer
main:
_extends: base
development:
params:
profiling:
perms:
enabled: true
name: perms_profiling
components:
phpSettings:
error_reporting: !code E_ALL & ~E_STRICT
_extends: main
testing:
params:
notShowFullErrors: true # если вы хотите, чтобы тесты не реагировали на действительные ошибки
testServiceValidators: true # если необходимо проверять методы тестируемого сервиса на корректность валидации данных
components:
db:
connectionString: 'mysql:host=localhost;dbname=default_crm_test'
username: o.mikhailov
password: ahPi7faiwei
connections:
slave:
original:
connectionString: 'mysql:host=localhost;dbname=default_crm'
username: o.mikhailov
password: ahPi7faiwei
_extends: base
testing-with-replication:
components:
db:
connections:
slave:
charset: utf8
connectionString: 'mysql:host=localhost;dbname=default_crm_test'
username: o.mikhailov
password: ahPi7faiwei
emulatePrepare: true
_extends: testing
# Конфигурация с заведомо неверным(нерабочим) slave-сервером
testing-with-invalid-slave:
components:
db:
connections:
slave:
class: \components\Db\DbConnection
connectionString: 'mysql:host=non-exists;dbname=non-exists'
username: non-exists
password: non-exists
emulatePrepare: true
_extends: testing-with-replication
# Конфигурация с включенным E_STRICT
testing-with-all-errors:
components:
phpSettings:
error_reporting: !code E_ALL
_extends: testing
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment