Coder Social home page Coder Social logo

Comments (4)

magnetik avatar magnetik commented on May 27, 2024 1

And I just tried with doctrine/orm 2.6.4, and the loadFixtures() fails with Unknown database error because it tries to select it as soon as the connection is started, so before the createDatgabaseIfNotExists() call of the bundle.

from liiptestfixturesbundle.

alexislefebvre avatar alexislefebvre commented on May 27, 2024

Thanks for your test, so it worked with doctrine/orm 2.6.3?

doctrine/orm:^2.6 is already required in require-dev of composer.json of the 2.x branch, so internal tests use latest version while users can use an older one.

(using a lower ORM version may explain liip/LiipFunctionalTestBundle#470 and/or liip/LiipFunctionalTestBundle#423 and why I wasn't able to reproduce the errors, it needs further investigation)

from liiptestfixturesbundle.

magnetik avatar magnetik commented on May 27, 2024

My bad I was testing with doctrine 2.6.3.

BUT good news, I think I have it !

I was using a database URL with the database name inside (mysql://[email protected]:3306/bar).
The ORMDatabaseTools removes the dbname from the params but not from the URL, hence it's trying to do a connection to the database to create the database.

I'll see if I can come up with a not-so-bad PR.

from liiptestfixturesbundle.

magnetik avatar magnetik commented on May 27, 2024

Well I'm not that clever.

Maybe we can just remove the path of the URL with some parse_url, but I fear that this would lead to some breakage with sqlite.

It seems very dirty to try to handle the URL has good as doctrine DriverManager does, and all it's methods are private so we cannot really rely on it.

Maybe we can just issue a warning stating that the URL should not be used?

from liiptestfixturesbundle.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.