使用MSSQL

时间:2016-08-24 07:52:31

标签: php laravel laravel-5.3

使用DB时出现

new install laravel错误:select 回溯是

FatalErrorException in SqlServerConnection.php line 13:

Declaration of Illuminate\Database\SqlServerConnection::transaction(Closure $callback) must be compatible with 

Illuminate\Database\ConnectionInterface::transaction(Closure $callback, $attempts = 1)

我的设置是PHP 7.0,laravel 5.3,ubuntu服务器16.04,apache2。

代码就像routes / web.php一样简单:

Route::get('/', function () { DB::select('select @@version'); }); 
是的,他们的工作是5.2。它也成功地在5.2上运行工匠迁移。现在我想将laravel更新为5.3。即使是全新安装也会给我带来同样的错误

1 个答案:

答案 0 :(得分:1)

这是5.3中的已知错误,将在5.3.1中修复 也可以看看: https://github.com/laravel/framework/issues/14992#issuecomment-242006433