# Extension > Nettrine
#
extensions:
	nettrine.annotations: Nettrine\Annotations\DI\AnnotationsExtension
	nettrine.cache: Nettrine\Cache\DI\CacheExtension
	nettrine.migrations: Nettrine\Migrations\DI\MigrationsExtension
	nettrine.fixtures: Nettrine\Fixtures\DI\FixturesExtension

	# Dbal
	nettrine.dbal: Nettrine\DBAL\DI\DbalExtension
	nettrine.dbal.console: Nettrine\DBAL\DI\DbalConsoleExtension(%consoleMode%)

	# Orm
	nettrine.orm: Nettrine\ORM\DI\OrmExtension
	nettrine.orm.cache: Nettrine\ORM\DI\OrmCacheExtension
	nettrine.orm.console: Nettrine\ORM\DI\OrmConsoleExtension(%consoleMode%)
	nettrine.orm.annotations: Nettrine\ORM\DI\OrmAnnotationsExtension

nettrine.dbal:
	debug:
		panel: %debugMode%
	configuration:
		sqlLogger: Nettrine\DBAL\Logger\PsrLogger(@Monolog\Logger)
	connection:
		driver: %database.driver%
		host: %database.host%
		user: %database.user%
		password: %database.password%
		dbname: %database.dbname%
		port: %database.port%

nettrine.orm:
	entityManagerDecoratorClass: App\Model\Database\EntityManager
	configuration:
		autoGenerateProxyClasses: %debugMode%

nettrine.orm.annotations:
	mapping:
		App\Model\Database\Entity: %appDir%/model/Database/Entity

nettrine.orm.cache:

nettrine.cache:
#	driver: Doctrine\Common\Cache\ApcuCache

nettrine.migrations:
	table: doctrine_migrations
	column: version
	directory: %rootDir%/db/Migrations
	namespace: Database\Migrations
	versionsOrganization: null

nettrine.fixtures:
	paths:
		- %rootDir%/db/Fixtures

decorator:
	Doctrine\Common\EventSubscriber:
		tags: [nettrine.subscriber]

services:
	- Nettrine\Migrations\Subscriber\FixPostgreSQLDefaultSchemaSubscriber
