Laravel 4: Fatal error: Class 'Patchwork\Utf8\Bootup' not found in autoload.php

给你一囗甜甜゛ 提交于 2019-12-19 09:55:09

问题


I added "cviebrock/image-validator": "1.0.*" to require section of composer.json. After, I ran composer update, I am getting this Fatal error.

:::ERROR:::

Fatal error: Class 'Patchwork\Utf8\Bootup' not found in F:\xampp\htdocs\project\
bootstrap\autoload.php on line 46
Script php artisan clear-compiled handling the post-update-cmd event returned wi
th an error



  [RuntimeException]
  Error Output:



update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--lock]
 [--no-plugins] [--no-custom-installers] [--no-scripts] [--no-progress] [--with-
dependencies] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [packages1] ... [
packagesN]

:::END of ERROR:::

:::COMPOSER.JSON Require section:::

"require": {
  "intervention/image": "2.*",
  "cviebrock/image-validator": "1.0.*"
},

I need help in rectifying this fatal error.

Thanks & Regards,

Michael Sangma


回答1:


This error seems to me like there is no patchwork/utf8 package installed.

See in your vendor folder whether the package exists or add in the require section in your composer.json file: "patchwork/utf8": "1.1.*" and then do composer update.




回答2:


I was having the same problem because when I run php artisan db:seed --class=PostsTableSeeder

it started to remove laravel, symfony etc. I can't understand why?(may be my composer.json included at that time only "require": { "fzaninotto/faker": "1.3.*@dev" },)

So what I did, I updated my composer.json again and run composer update --dev. composer.json as

"require": {
    "laravel/framework": "4.2.*",
    "way/generators": "~2.0",
    "patchwork/utf8": "1.1.*",
    "fzaninotto/faker": "1.3.*@dev"
},

And that worked because it downloaded again everything.




回答3:


I just commented the 'Patchwork\Utf8\Utf8ServiceProvider' in app.php and it worked




回答4:


I Solved It With composer dump-autoload and then composer update

After that it works But if you encounter more issue try to Delete the vendor folder or just rename it fo backup puporse incase it fails like mv vendor ve then

Delete composer.lock

Run the command composer clearcache (or clear-cache) Run composer install

Your good to go.




回答5:


Dude, you just have to do this:

composer require patchwork/utf8



回答6:


I am most certain you pulled your application from a git? If you take a closer look at your .gitignore file you would see that /vendor is one of the files/folders that git was told to ignore. You need to remove /vendor, composer.lock and composer.phar from .gitignore IF you're in development.

Also if you navigate to the /vendors folder via FTP or ssh, you will see that it only has folders that were outlined in your composer.json file under

"require": {

}

are the ones in the vendor folder.

Once you run composer update and composer install you should be fine.



来源:https://stackoverflow.com/questions/24446883/laravel-4-fatal-error-class-patchwork-utf8-bootup-not-found-in-autoload-php

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