I do not understand where this error is coming from. I first noted it after installing a third party package, and thought that was the problem. Uninstalling the package made no difference. Reverting to an earlier version of Laravel also had no effect. (So now I'm back to the current version, 4.2.8.)

Here is the full error message in response to $ composer update -- the error is repeated 7 times, right after "Generating autoload files":

PHP Warning: Unexpected character in input: ' in phar:///usr/local/bin/composer/src/Composer/Autoload/ClassMapGenerator.php on line 118 

This appears to refer to a corrupted piece of code in composer itself, rather than a corrupted file in the Laravel tree. My copy of composer lives in /usr/local/bin and the only file in that directory is composer. The warning appears to suggest that composer is a directory, but of course it's not. There is nothing on line 118 in composer itself.

I have no idea how to fix this, or how important it is, or how to find where the problem is. Do I need to reinstall composer?

Thanks for any help.


In response to a comment asking about whether composer.json is the problem, here's my entire composer.json file. I can't identify any errors there:

{ "name": "laravel/laravel", "description": "The Laravel Framework.", "keywords": ["framework", "laravel"], "license": "MIT", "require": { "laravel/framework": "4.2.*" }, "autoload": { "classmap": [ "app/commands", "app/controllers", "app/models", "app/database/migrations", "app/database/seeds", "app/tests/TestCase.php", "app/libraries" ] }, "scripts": { "post-install-cmd": [ "php artisan clear-compiled", "php artisan optimize" ], "post-update-cmd": [ "php artisan clear-compiled", "php artisan optimize" ], "post-create-project-cmd": [ "php artisan key:generate" ] }, "config": { "preferred-install": "dist" }, "minimum-stability": "stable" } 

And here's lines 116-123 from composer.lock -- could the problem be here? :

 "autoload": { "psr-0": { "Whoops": "src/" }, "classmap": [ "src/deprecated" ] }, 

Thanks.

4

1 Answer

Problem solved simply by running

composer self-update 

Thanks much to help from Marwelln and WereWolf.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.