Fabien,

Maybe you should pull Brandon's branch. I'm still figuring out how git
(especially rebase) works. I deleted my branch from github so nobody
can mistakenly use that.

Martijn

On 13 jul, 07:57, Fabien Potencier <fabien.potenc...@symfony-
project.com> wrote:
> On 7/10/10 2:24 PM, Martijn wrote:
>
> > Brandon,
>
> > Thanks. The changes are now pushed to my github account.
>
> > Bye the way, was it a bad idea to merge ticket_8824 with master (it
> > was, wasn't it)? Can I revert the merge somehow?
>
> The ticket_8824 branch is not really useful as you merged my master on
> top of some changes. For a topical branch, you should force rebase
> instead, so that your changes are on top of the branch (as explained
> here:http://symfony-reloaded.org/contributing/Code/Patches). It makes
> it easier for me to review the different changes.
>
> Thanks,
> Fabien
>
>
>
> > Martijn
>
> > On 9 jul, 18:12, Brandon Turner<[email protected]>  wrote:
> >> Martijn,
>
> >> I just sent you a pull request via Github for:
> >>     git://github.com/blt04/symfony.git ticket_8824
>
> >> It looks like you did find a bug in DoctrineExtension when using
> >> multiple connections.  There's a potential fix in the pull request
> >> (commit c93ca88a199e305036d1) but I'm not sure if the problem is with
> >> XMLFileLoader.  Essentially when multiple elements exist (multiple
> >> connection elements) XMLFileLoader produces an array like:
>
> >> array('connection' =>  array(
> >>     0 =>  array('id' =>  'multiple1' ....),
> >>     1 =>  array('id' =>  'multiple2' ....),
> >>     2 =>  array('id' =>  'multiple3' ....),
> >> ))
>
> >> whereas when a single element exists, XMLFileLoader produces an array like:
>
> >> array('connection' =>  array('id' =>  'myid' ...))
>
> >> You can see where this is confusing.
>
> >> Would you like to rebase all of our commits with Fabien latest changes
> >> (a lot in the past few hours) and resubmit the patch to the list?  If
> >> not I'm happy to do it.
>
> >> Brandon
>
> >> On 7/9/10 6:49 AM, Martijn wrote:
>
> >>> Thanks for the feedback. And no, I'm not going to ignore you ;)
>
> >>> The reason I wrote this was because I needed the unix_socket option
> >>> for mysql. Which was included in the array and worked, but the schema
> >>> validation routines didn't approved it because it was missing from the
> >>> schema. So I found your issue on the bug tracker and decided to
> >>> include it.
>
> >>> With your feedback I decided to extended the unit test with additional
> >>> connections for sqlite and oracle. Unfortunately I found that multiple
> >>> connections won't work because the $config argument in
> >>> DoctrineExtension::dbalLoad looks like this:
>
> >>> array(1) {
> >>>     ["connections"]=>
> >>>     array(1) {
> >>>       ["connection"]=>
> >>>       array(7) {
> >>>         ["id"]=>
> >>>         string(7) "default"
> >>>         ["dbname"]=>
> >>>         string(10) "myWebapp"
> >>>         ["user"]=>
> >>>         string(10) "myWebapp_user"
> >>>         ["password"]=>
> >>>         string(16) "myWebapp_passwd"
> >>>         ["unix_socket"]=>
> >>>         string(27) "/var/run/mysqld/mysqld.sock"
> >>>         [0]=>
> >>>         array(6) {
> >>>           ["id"]=>
> >>>           string(6) "sqlite"
> >>>           ["driver"]=>
> >>>           string(9) "PDOSqlite"
> >>>           ["dbname"]=>
> >>>           string(8) "sqlit_db"
> >>>           ["user"]=>
> >>>           string(11) "sqlite_user"
> >>>           ["password"]=>
> >>>           string(13) "sqlite_s3cr3t"
> >>>           ["memory"]=>
> >>>           bool(true)
> >>>         }
> >>>         [1]=>
> >>>         array(6) {
> >>>           ["id"]=>
> >>>           string(3) "oci"
> >>>           ["driver"]=>
> >>>           string(4) "OCI8"
> >>>           ["dbname"]=>
> >>>           string(9) "oracle_db"
> >>>           ["user"]=>
> >>>           string(11) "oracle_user"
> >>>           ["password"]=>
> >>>           string(13) "oracle_s3cr3t"
> >>>           ["charset"]=>
> >>>           string(4) "utf8"
> >>>         }
> >>>       }
> >>>     }
> >>> }
>
> >>> Which I guess is wrong (see the array structure). Apparently each
> >>> connection is put in the connections array which can only contain one
> >>> key with the name "connection". The supplied DI configuration in XML
> >>> looks like this and is valid according the schema:
>
> >>>       <doctrine:dbal>
> >>>         <doctrine:connections>
> >>>           <doctrine:connection
> >>>               id="default"
> >>>               dbname="myWebapp"
> >>>               user="myWebapp_user"
> >>>               password="myWebapp_passwd"
> >>>               unix_socket="/var/run/mysqld/mysqld.sock" />
> >>>           <doctrine:connection
> >>>               id="sqlite"
> >>>               driver="PDOSqlite"
> >>>               dbname="sqlit_db"
> >>>               user="sqlite_user"
> >>>               password="sqlite_s3cr3t"
> >>>               memory="true" />
> >>>           <doctrine:connection
> >>>               id="oci"
> >>>               driver="OCI8"
> >>>               dbname="oracle_db"
> >>>               user="oracle_user"
> >>>               password="oracle_s3cr3t"
> >>>               charset="utf8" />
> >>>         </doctrine:connections>
> >>>       </doctrine:dbal>
>
> >>> Am I missing something or is this a bug in the DI implementation?
>
> >>> Martijn
>
> >>> On 8 jul, 21:51, Brandon Turner<[email protected]>   wrote:
>
> >>>> Martijn,
>
> >>>> I'm not a Symfony dev so feel free to ignore my comments.  I think your
> >>>> unit test looks good, however it doesn't actually test the change made
> >>>> (added support for memory and charset options).  Your unit test is still
> >>>> good and serves a purpose, but perhaps it should be moved to another
> >>>> patch/branch?
>
> >>>> Again, I'm not a Symfony dev so please ignore my two cents ;)
>
> >>>> Brandon (aka bltcoder)
>
> >>>> On 7/8/10 11:09 AM, Martijn wrote:
>
> >>>>> Ticket:http://trac.symfony-project.org/ticket/8824
> >>>>> Patch:http://github.com/martijn4evers/symfony/tree/ticket_8824
>
> >>>>> This was a great way to lean git so i hope everything went well.
>
> >>>>> I've used the patch provided by bltcoder for the DoctrineExtension and
> >>>>> added these options in the schema for XML DI configuration validation
> >>>>> ( Resource/config/schema/doctrine-1.0.xsd ). There is also an
> >>>>> additional unit test to verify these options are allowed in the XML DI
> >>>>> configuration using the schema. This was my first unit test so I hope
> >>>>> nothing is wrong, maybe someone can double check?

-- 
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 developers" 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-devs?hl=en

Reply via email to