composer install fails when unable to see mysql database composer install fails when unable to see mysql database docker docker

composer install fails when unable to see mysql database


Doctrine introduced some code which tried to auto-detect things about the database quite eagerly.

A workaround is simply to tell Doctrine the target server version, e.g.

doctrine:    dbal:        default_connection: default        connections:            default:                dbname:   Symfony2                user:         root                password: null                host:         localhost                driver:       pdo_mysql                server_version: 5.6

See https://github.com/doctrine/DoctrineBundle/issues/351#issuecomment-75456547