Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid Connection error when calling ClassMetadataFactor::getAllMetadata() #1294

Merged

Commits on Jan 29, 2015

  1. Only getting the target platform when it's *actually* needed to avoid…

    … errors
    
    initialize() is called sometimes, even when the following code doesn't need
    the targetPlatform property. Specifically, in AbstractClassMetadataFactory::getAllMetadata().
    
    But as of DBAL 2.5.0, calling Connection::getDatabasePlatform() will make a
    connection to the database, which means that sometimes it may fail (e.g. you
    haven't configured your database yet). As a result, calling a method like
    AbstractClassMetadataFactory::getAllMetadata() - which does not need the
    targetPlatform - will fail, because determining the targetPlatform requires
    a connection, which fails.
    
    This avoids that - we only get the targetPlatform *when* we need it, which
    are cases where we're doing things that do indeed need a connection.
    weaverryan committed Jan 29, 2015
    Configuration menu
    Copy the full SHA
    b30d1dd View commit details
    Browse the repository at this point in the history

Commits on Feb 4, 2015

  1. Configuration menu
    Copy the full SHA
    75bb3a0 View commit details
    Browse the repository at this point in the history
  2. Adding docblock

    weaverryan committed Feb 4, 2015
    Configuration menu
    Copy the full SHA
    0e08633 View commit details
    Browse the repository at this point in the history