Dexterity \ Utf8 \ Bootup causes problems with Laravel 4

My project worked fine until recently, when I ran sudo composer self-update . The composer was successfully updated, but I could no longer migrate ( php artisan migrate ). This is the error I get:

 PHP Fatal error: Class 'Patchwork\Utf8\Bootup' not found in /Applications/MAMP/htdocs/ThumbsUp/bootstrap/autoload.php on line 46 

I performed composer update and composer install , and this error persists. Why not find this class after self-update ?

+6
source share
4 answers

I had the same problem, I ran composer dump-autoload or php composer.phar dump-autoload depending on your configuration, ran the linker again, and it worked.

+5
source

I had a similar problem when trying to start a composer update, and none of the solutions above worked. Turns out I had 2 sections in my composer.json, which is actually wrong.

 "require": { "laravel/framework": "4.1.*" }, "config": { "preferred-install": "dist" }, "minimum-stability": "stable", "require": { "barryvdh/laravel-ide-helper": "1.*", "zizaco/confide": "3.2.x", "laravelbook/ardent": "dev-master", "zizaco/entrust": "dev-master" }, "require-dev": { "way/generators": "2.*", "fzaninotto/faker": "1.3.*@dev" } 

Combining the two as shown below solved my problem.

 "require": { "laravel/framework": "4.1.*", "barryvdh/laravel-ide-helper": "1.*", "zizaco/confide": "3.2.x", "laravelbook/ardent": "dev-master", "zizaco/entrust": "dev-master" }, 

If you still have a problem, try deleting the composer.lock directory and the vendor directory and run

 mv ~/.composer/cache ~/.composer/cache.bak 

To clear the composer's cache and finally run

 sudo composer install 

This should solve the problem.

+9
source

Keeping track of this problem, I found that this is due to this in my composer.json:

"pre-update-cmd": [ "php artisan clear-compiled" ],

My theory is that "clear-compiled" cannot work because the composer has not been updated. By removing this and then calling composer update and then re-adding it fixed my problem.

+8
source

I just deleted the composer.lock file and then ran composer update And that worked.

0
source

All Articles