I think there is no difference between old config format and the one u
posted, from PHP code i see that both formats are supported in same
way.

Atm my config looks like this and works in the same way like in
previous format:

doctrine.dbal:
    charset: UTF-8
    connections:
        default:
            dbname: db1
            user: root
            password:
            host: localhost
            port: ~
        connection:
            id: conn1
            dbname: db1
            user: root
            password:
            host: localhost
            port: ~
        connection:
            id: conn2
            dbname: db2
            user: root
            password:
            host: localhost
            port: ~

I get wierd error when there is no default connection defined tho:

Fatal error: Uncaught exception 'InvalidArgumentException' with
message 'The service definition "doctrine.dbal.default_connection"
does not exist.' in [sandbox_dir]\src\vendor\symfony\src\Symfony
\Component\DependencyInjection\ContainerBuilder.php:618 Stack trace:
#0 [sandbox_dir]\src\vendor\symfony\src\Symfony\Component
\DependencyInjection\Compiler
\ReplaceAliasByActualDefinitionPass.php(21): Symfony\Component
\DependencyInjection\ContainerBuilder-
>getDefinition('doctrine.dbal.d...') #1 [sandbox_dir]\src\vendor
\symfony\src\Symfony\Component\DependencyInjection\Compiler
\ReplaceAliasByActualDefinitionPass.php(35): Symfony\Component
\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass-
>process(Object(Symfony\Component\DependencyInjection
\ContainerBuilder)) #2 [sandbox_dir]\src\vendor\symfony\src\Symfony
\Component\DependencyInjection\Compiler
\ReplaceAliasByActualDefinitionPass.php(35): Symfony\Component
\DependencyInjection\Compiler\ReplaceAliasByActualDefinitionPass->pr
in [sandbox_dir]\src\vendor\symfony\src\Symfony\Component
\DependencyInjection\ContainerBuilder.php on line 618

seems that default connection is required in config.yml

I dont get any error becouse i dont know how to retrieve any of
defined connections, I dont see proper methods in generated container
class in cache...

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-users?hl=en

Reply via email to