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

laravel下run phpunit错误

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-06-06 20:43:331188browse

错误如下:

<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>

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

回复内容:

错误如下:

<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>

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

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

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

具体看这里

Statement:
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