LoginSignup
1
1

More than 3 years have passed since last update.

【Laravel】 Symfony\Component\Debug\Exception\FatalThrowableError : Class 'Doctrine\DBAL\Driver\PDOMySql\Driver' not found

Posted at

はじめに

知識を整理するための個人的な備忘録です。

カラム型の変更をした際、

$ composer require doctrine/dbal

のコマンドでdoctrine/dbalを入れてからphp artisan migrateしたのにエラーが出た。

Symfony\Component\Debug\Exception\FatalThrowableError  : Class 'Doctrine\DBAL\Driver\PDOMySql\Driver' not found

解決方法

原因は

・composer require doctrine/dbalだけでインストールすると、今は3.x系が入ってしまう
・3.x系はDriverディレクトリの構成が変わっているので、migrateする時に2.x系にあったPDOMySqlがnotfoundになる

らしい。

$ composer require "doctrine/dbal:2.*"

doctrine/dbal をバージョン指定で入れ直すことで解決。

参考

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1