Browse Source

[DoctrineBundle] Don't mix "user" and "username"
The Doctrine Bundle refered to "username" in some places and to user in others.
Namely the schema and the DoctrineExtension have been updated to use "user".

I chose user rather than username because Doctrine uses that term itself.

Nils Adermann 15 years ago
parent
commit
61f3603a7a

+ 2 - 2
src/Symfony/Framework/DoctrineBundle/DependencyInjection/DoctrineExtension.php

@@ -41,7 +41,7 @@ class DoctrineExtension extends LoaderExtension
    *
    * Usage example:
    *
-   *      <doctrine:dbal dbname="sfweb" username="root" />
+   *      <doctrine:dbal dbname="sfweb" user="root" />
    *
    * @param array $config A configuration array
    *
@@ -54,7 +54,7 @@ class DoctrineExtension extends LoaderExtension
     $loader = new XmlFileLoader(__DIR__.'/../Resources/config');
     $configuration->merge($loader->load($this->resources['dbal']));
 
-    foreach (array('dbname', 'host', 'username', 'password', 'path', 'port') as $key)
+    foreach (array('dbname', 'host', 'user', 'password', 'path', 'port') as $key)
     {
       if (isset($config[$key]))
       {

+ 1 - 1
src/Symfony/Framework/DoctrineBundle/Resources/config/schema/dic/doctrine/doctrine-1.0.xsd

@@ -11,7 +11,7 @@
     <xsd:attribute name="dbname" type="xsd:string" />
     <xsd:attribute name="host" type="xsd:string" />
     <xsd:attribute name="port" type="xsd:integer" />
-    <xsd:attribute name="username" type="xsd:string" />
+    <xsd:attribute name="user" type="xsd:string" />
     <xsd:attribute name="password" type="xsd:string" />
     <xsd:attribute name="driver" type="xsd:string" />
     <xsd:attribute name="options" type="xsd:string" />