关于Laravel项目的Ran Composer更新,我在<body>标签的开头出现了乱码

I'm working on a Laravel 5.2 project and needed to ran "composer update" to install and update some dependencies. It seemed to run fine, but at the very end the CLI output:

> Illuminate\Foundation\ComposerScripts::postUpdate
> php artisan optimize
Bu1Scompapplg1Scomp+?appmoDDdutcӪ.'
                                   @? @ @ @
                                           E?DSDB ` @ @ @Generating optimized class loader

Now when I load any page (locally using MAMP), the body tag begins with a similar piece of garbled text to the above. If I remove my highest level layout completely, it's literally the only visible thing rendered on the page.

<body>
    Bud1�1Scompapplg1Scomp+�appmoDDdutcӪ.' @� @� @� @E�DSDB `� @� @� 
</body>

I can see it on any page loaded and as far as a search goes, it doesn't appear to be in any of the views. I've tried a search of the whole project for small pieces of the string but it returns nothing. Any idea where this might be being generated and why? Thanks in advance.

Update: it actually seems to be to do with running any artisan commands as it's the first thing output by the command. If I run just php artisan then it's the first thing output before it shows all the possible commands.

My Solution: was unable to find the root cause so I simply reverted the project to its previous state and manually installed the packages I needed.

Try grep -R compapp . It should show corrupted file, then you can pin version of broken package in your composer.json. It's hard to say something more certain without seeing your composer.json.