title: Docker + mysql + php + Symfony, error during connecting to mysql
body: <p>I'm trying to set up my docker with php app (Symfony 3).</p>
  
  <p>Everything seems to be fine but, Symfony can't connect to mysql.</p>
  
  <p>I have the error:</p>
  
  <blockquote>
    <p>Uncaught PHP Exception Doctrine\DBAL\Exception\DriverException: "An exception occurred in driver: could not find driver" </p>
  </blockquote>
  
  <p>My <code>docker-compose.yaml</code> file is:</p>
  
  <pre><code>version: '3'
      services:
        app:
          image: car-rental
          ports: 
            - "8888:80"
          links:
            - php
            - db 
          volumes:
            - ./.code:/var/www/html
          depends_on:
            - db
        php:
          image: php:7.1-fpm
          volumes:
            - ./.code:/var/www/html  
        db:
          image: mysql:5.7
          volumes:
            - mysql-data:/var/lib/mysql
          restart: always
          environment:
            MYSQL_ROOT_PASSWORD: test
            MYSQL_DATABASE: rental
  
      volumes:
        mysql-data:
  </code></pre>