从 laravel 7 更新到 laravel 8 后所有测试均失败 [英] All test failing after update from laravel 7 to laravel 8

查看:126
本文介绍了从 laravel 7 更新到 laravel 8 后所有测试均失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

从laravel 7更新到版本8后,所有测试均失败,并出现相同的错误:

After update from laravel 7 to version 8 all test failing with same error:

Illuminate\Database\QueryException: SQLSTATE[HY000]: General error: 1 no such index: IDX_426EF39216FE72E1 (SQL: DROP INDEX IDX_426EF39216FE72E1)

我也在使用 legacy-factories 包进行旧工厂处理

I am also using legacy-factories package for old factories approach

推荐答案

我最终使用laravel shift解决了这个问题,因为升级后还有很多事情要做,并且在我的情况下,列表很大,因为我使用了自定义命名空间,并且必须在 AppServiceProvider 中进行处理.Shift还可以重构我拥有的所有矿山工厂

I finally solve this problem using laravel shift because there is lot of things to be done after upgrade and list in my case is huge because I use custom namespace and I must handle that in AppServiceProvider. Shift also refactor all of mine factories that I have

这篇关于从 laravel 7 更新到 laravel 8 后所有测试均失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆