简体   繁体   English

Composer 更新“无法完全删除学说/dbal”,Laravel 4 损坏

[英]Composer update “could not completely remove doctrine/dbal”, Laravel 4 broken

I just did a Composer update on my Laravel 4 project, after which it completely broke down.我刚刚对我的 Laravel 4 项目进行了 Composer 更新,之后它完全崩溃了。 It all started with Composer giving me the error "Could not completely remove doctrine/dbal", after which I tried the update again.这一切都始于 Composer 给我的错误“无法完全删除学说/dbal”,之后我再次尝试更新。

At that point the Artisan command php artisan clear-compiled , set to run before a Composer update, failed, saying the redirectIfTrailingSlash() method (called in bootstrap/start.php) does not exist.那时,Artisan 命令php artisan clear-compiled设置为在 Composer 更新之前运行,失败了,说redirectIfTrailingSlash()方法(在 bootstrap/start.php 中调用)不存在。

So now my app is giving me the white screen of death, and Composer update/install can't fix it.所以现在我的应用程序给了我白屏死机,而 Composer 更新/安装无法修复它。 I've tried removing the lock file and all packages in vendor.我试过删除锁文件和供应商中的所有包。 No dice.没有骰子。

More info:更多信息:

  • I have no compiled.php file in the bootstrap folder.我在 bootstrap 文件夹中没有compiled.php 文件。 Artisan probably removed this before the first update that made everything fail. Artisan 可能在导致一​​切失败的第一次更新之前删除了它。
  • My composer.json works, I have updated without trouble many times before.我的 composer.json 工作正常,我之前已经更新过很多次了。
  • I can run Composer if I use --no-scripts or comment out the redirectIfTrailingSlash() method call.如果我使用 --no-scripts 或注释掉redirectIfTrailingSlash()方法调用,我可以运行 Composer。
  • When I run composer update successfully, I get a lot of suggested packages to install, doctrine/dbal being among those.当我成功运行 composer update 时,我得到了很多建议安装的包,其中包括 dotric/dbal。 A successful composer update doesn't solve my problem, however.然而,成功的作曲家更新并不能解决我的问题。
  • The initial composer update was run from my development VM.最初的 Composer 更新是从我的开发 VM 运行的。 I have no idea why it would have trouble removing packages, though.不过,我不知道为什么它会在删除包时遇到问题。

Any help is welcome.欢迎任何帮助。

Did you try upgrading Laravel as there is no need for redirectIfTrailingSlash() .您是否尝试升级 Laravel,因为不需要redirectIfTrailingSlash() If so read the upgrade process here github.com/laravel/laravel/blob/develop/upgrade.md如果是这样,请阅读此处的升级过程 github.com/laravel/laravel/blob/develop/upgrade.md

If not then the Laravel package is not installing fully/at all.如果没有,则 Laravel 包没有完全/根本没有安装。

Turns out the comment was the solution.原来评论是解决方案。

These commands should help:这些commands应该有帮助:

composer remove doctrine/dbal will solve the problem. composer remove doctrine/dbal将解决问题。

composer remove packagename removes package. composer remove packagename删除包。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM