Home > Backend Development > PHP Tutorial > laravel下run phpunit错误

laravel下run phpunit错误

WBOY
Release: 2016-06-06 20:43:33
Original
1186 people have browsed it

错误如下:

<code class="lang-php">PHP Fatal error:  Class 'Doctrine\DBAL\Driver\PDOMySql\Driver' not found in /mnt/hgfs/server_php/vendor/laravel/framework/src/Illuminate/Database/MySqlConnection.php on line 59
</code>
Copy after login
Copy after login

一直都很正常,突然就这样了。。

回复内容:

错误如下:

<code class="lang-php">PHP Fatal error:  Class 'Doctrine\DBAL\Driver\PDOMySql\Driver' not found in /mnt/hgfs/server_php/vendor/laravel/framework/src/Illuminate/Database/MySqlConnection.php on line 59
</code>
Copy after login
Copy after login

一直都很正常,突然就这样了。。

这个问题已经解决。原来是自laravel 4.1后把Doctrine去掉了。需要在composer.json里面手动加上依赖。

<code class="lang-json">"require": {
    ...
    ...
    "doctrine/dbal" : "2.4.*"
}
</code>
Copy after login

具体看这里

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template