problem s konfiguraciou Nettrine balickov

kocourPB
Člen | 47
+
0
-

Ahoj,

rozbieham si cisty sandbox projekt a zasekol som sa pri instalacii Nettrine balickov.

Pri spusteni bin/console dostavam exceptionu:

It's a requirement to specify a Metadata Driver and pass it to Doctrine\ORM\Configuration::setMetadataDriverImpl().

common.neon

parameters:

application:
	errorPresenter: Error
	mapping:
		*: App\*Module\Presenters\*Presenter

session:
	expiration: 14 days

extensions:
    console: Contributte\Console\DI\ConsoleExtension(%consoleMode%)

    nettrine.dbal: Nettrine\DBAL\DI\DbalExtension
    nettrine.orm: Nettrine\ORM\DI\OrmExtension
    nettrine.cache: Nettrine\Cache\DI\CacheExtension
    nettrine.orm.cache: Nettrine\ORM\DI\OrmCacheExtension
    nettrine.orm.console: Nettrine\ORM\DI\OrmConsoleExtension(%consoleMode%)
    nettrine.migrations: Nettrine\Migrations\DI\MigrationsExtension

nettrine.orm.cache:
  defaultDriver: Doctrine\Common\Cache\VoidCache
  queryCache: Doctrine\Common\Cache\VoidCache
  resultCache: Doctrine\Common\Cache\VoidCache
  hydrationCache: Doctrine\Common\Cache\VoidCache
  metadataCache: Doctrine\Common\Cache\VoidCache

console:
    name: Testproject
    version: '1.0'
    catchExceptions: false
    autoExit: false
    url: https://testproject.dev
    lazy: false

nettrine.migrations:
  directory: %appDir%/sql_migrations

services:
	router: App\Router\RouterFactory::createRouter

local.neon

parameters:

nettrine.dbal:
	connection:
		host: 127.0.0.1
		user: root
		password: toor
		dbname: testproject

Isiel som podla manualu: https://github.com/…cs/README.md#…

Viete mi prosim poradit co mi chyba v configu? Diky

kocourPB
Člen | 47
+
0
-

Vyriesene.

Upraveny common.neon

parameters:

application:
    errorPresenter: Error
    mapping:
        *: App\*Module\Presenters\*Presenter

session:
    expiration: 14 days

extensions:
    # Dbal
    dbal: Nettrine\DBAL\DI\DbalExtension
    dbal.console: Nettrine\DBAL\DI\DbalConsoleExtension

    # Orm
    orm: Nettrine\ORM\DI\OrmExtension
    orm.cache: Nettrine\ORM\DI\OrmCacheExtension
    orm.console: Nettrine\ORM\DI\OrmConsoleExtension
    orm.annotations: Nettrine\ORM\DI\OrmAnnotationsExtension

    nettrine.annotations: Nettrine\Annotations\DI\AnnotationsExtension
    nettrine.cache: Nettrine\Cache\DI\CacheExtension

    console: Contributte\Console\DI\ConsoleExtension(%consoleMode%)
    migrations: Nettrine\Migrations\DI\MigrationsExtension

dbal:
    debug:
        panel: %debugMode%
    connection:
        driver: %database.driver%
        host: %database.host%
        user: %database.user%
        password: %database.password%
        dbname: %database.dbname%

orm:
    configuration:
        autoGenerateProxyClasses: %debugMode%

orm.annotations:
    paths:
        - %appDir%/model

orm.cache:
    defaultDriver: Doctrine\Common\Cache\VoidCache

migrations:
    table: doctrine_migrations
    column: version
    directory: %appDir%/../sql_migrations
    namespace: Migrations
    versionsOrganization: null

services:
    router: App\Router\RouterFactory::createRouter

local.neon

parameters:
    database:
        driver: mysqli
        host: 127.0.0.1
        user: root
        password: toor
        dbname: testproject
Felix
Nette Core | 1245
+
0
-

Doporucuju sledovat ukazky konfigurace Nettrine v jednom z predpripravenych skeletonu. Clovek si tak usetri problemy pri konfiguraci.

https://github.com/…ne-skeleton/