Laravel: How to update packages in storage/framework

白昼怎懂夜的黑 提交于 2020-01-07 09:23:00

问题


I have removed a package with composer remove and it's now removed from composer.json and composer.lock files and also removed from vendor directory. But I noticed that it's still listed in these two files: storage/framework/packages.php and storage/framework/services.php. How can I update/rebuild these files?
Also, when I run php artisan in the root of my project, I get this error:

[Symfony\Component\Debug\Exception\FatalThrowableError] Class 'Morilog\Jalali\JalaliServiceProvider' not found

I searched in all the files of the project and found JalaliServiceProvider still listed only in the two above-mentioned files.


回答1:


Remove or comment below line from config/app.php

   Morilog\Jalali\JalaliServiceProvider::class



回答2:


Your package is registered in config/app.php. remove the package Morilog\Jalali\JalaliServiceProvider::class




回答3:


Try to run composer dump-autoload in the terminal once




回答4:


Delete these two files:

bootstrap/cache/packages.php

bootstrap/cache/services.php




回答5:


According to this - https://getcomposer.org/doc/articles/scripts.md there is no post-remove-cmd event, therefore whatever you have in your post-update-cmd or post-install-cmd was not executed.

Which suggests it might be the problem with php artisan optimize.



来源:https://stackoverflow.com/questions/47350272/laravel-how-to-update-packages-in-storage-framework

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!