折腾了1个月后,终于成功将13升级到14.1了。这之间我经历了许多小痛苦,有时差点想要放弃flarum了,最终在一次尝试之后终于成功的升级至14.1。以下是我这一个月来遇见的问题以及我的解决方法
flarum的捆绑包出错
[root@cvm-3h5cg5k28a225 bbs.stkey.top]# composer why-not flarum/core v0.1.0-beta.14.1
flarum/core v0.1.0-beta.14.1 requires components/font-awesome (^5.14.0)
flarum/flarum - does not require components/font-awesome (but 5.9.0 is installed)
flarum/core v0.1.0-beta.14.1 requires dflydev/fig-cookies (^2.0.1)
flarum/flarum - does not require dflydev/fig-cookies (but v1.0.2 is installed)
flarum/core v0.1.0-beta.14.1 requires illuminate/bus (^6.0)
flarum/flarum - does not require illuminate/bus (but v5.7.28 is installed)
flarum/core v0.1.0-beta.14.1 requires illuminate/cache (^6.0)
flarum/flarum - does not require illuminate/cache (but v5.7.28 is installed)
flarum/core v0.1.0-beta.14.1 requires illuminate/config (^6.0)
flarum/flarum - does not require illuminate/config (but v5.7.28 is installed)
flarum/core v0.1.0-beta.14.1 requires illuminate/container (^6.0)
flarum/flarum - does not require illuminate/container (but v5.7.28 is installed)
flarum/core v0.1.0-beta.14.1 requires illuminate/contracts (^6.0)
flarum/flarum - does not require illuminate/contracts (but v5.7.28 is installed)
flarum/core v0.1.0-beta.14.1 requires illuminate/database (^6.0)
flarum/flarum - does not require illuminate/database (but v5.7.28 is installed)
flarum/core v0.1.0-beta.14.1 requires illuminate/events (^6.0)
flarum/flarum - does not require illuminate/events (but v5.7.28 is installed)
flarum/core v0.1.0-beta.14.1 requires illuminate/filesystem (^6.0)
flarum/flarum - does not require illuminate/filesystem (but v5.7.28 is installed)
flarum/core v0.1.0-beta.14.1 requires illuminate/hashing (^6.0)
flarum/flarum - does not require illuminate/hashing (but v5.7.28 is installed)
flarum/core v0.1.0-beta.14.1 requires illuminate/mail (^6.0)
flarum/flarum - does not require illuminate/mail (but v5.7.28 is installed)
flarum/core v0.1.0-beta.14.1 requires illuminate/queue (^6.0)
flarum/flarum - does not require illuminate/queue (but v5.7.28 is installed)
flarum/core v0.1.0-beta.14.1 requires illuminate/session (^6.0)
flarum/flarum - does not require illuminate/session (but v5.7.28 is installed)
flarum/core v0.1.0-beta.14.1 requires illuminate/support (^6.0)
flarum/flarum - does not require illuminate/support (but v5.7.28 is installed)
flarum/core v0.1.0-beta.14.1 requires illuminate/validation (^6.0)
flarum/flarum - does not require illuminate/validation (but v5.7.28 is installed)
flarum/core v0.1.0-beta.14.1 requires illuminate/view (^6.0)
flarum/flarum - does not require illuminate/view (but v5.7.28 is installed)
flarum/core v0.1.0-beta.14.1 requires nesbot/carbon (^2.0)
flarum/flarum - does not require nesbot/carbon (but 1.39.1 is installed)
flarum/core v0.1.0-beta.14.1 requires symfony/config (^4.3.4)
flarum/flarum - does not require symfony/config (but v3.4.46 is installed)
flarum/core v0.1.0-beta.14.1 requires symfony/translation (^4.3.4)
flarum/flarum - does not require symfony/translation (but v3.4.46 is installed)
flarum/core v0.1.0-beta.14.1 requires symfony/yaml (^4.3.4)
flarum/flarum - does not require symfony/yaml (but v3.4.46 is installed)
开始是觉得很神奇的,曾经从来没遇见过此类问题。在官方论坛上看了许久,找了个类似
:删除vender
与composer.lock
,接着运行composer install
。
对我而言却并没有起效果。于是放弃。
嗯,最终,我还是重新新建flarum,只要有数据库,那恢复是很顺畅的事情!
安装扩展
刚开始我知道flarum14核心改动很大,大多数扩展不兼容。我先等了2周,迫不急待便开始更新了。删除了composer why-not
上标记的不兼容扩展,求方便地把剩下的扩展以编辑composer.json
方式一并安装在新的flarum上。并没有出什么问题,心里窃喜。页面访问正常。但是执行了迁移数据库后,回到以前熟悉页面,但是有一个大家都遇见的:糟糕,页面加载出错了,》》但是以为只是缓存问题,清楚后无效。打开F12却发现全是js出错!当时很崩溃,不知道从何改起。
这折腾我很久,查看SCDN上文章许久多无果。最终,还是意识到是扩展不兼容问题。但composer并没有告知,这应该是作者标记扩展时出错,默认支持8+吧;额。老老实实地一个一个安装,有问题便好排除。终于找出几个混在兼容扩展里头的小鬼了。
数据库出错
每次升级失败后,我会将备份还原至beta13.但是数据库未动。结果出现很多问题。请注意!!!按时备份数据库是十分重要的事情!!!一个月来我不知回滚至多少次,很难想象,没有备份会发生什么样。😅