Uninstall FOSHttpCacheBundle - php

I installed FOSHttpCacheBundle and decided to try to remove it afterwards.
I ran the composer remove (my composer.json does not contain the FOSHttp line anymore)
I removed the line in the AppKernel.php
I removed the corresponding lines in config.yml
Yet now, in production mode, I get the following error:
Fatal error: Class 'FOS\HttpCacheBundle\EventListener\CacheControlSubscriber' not found in C:\wamp\www\Symfony\vendor\symfony\symfony\src\Symfony\Component\EventDispatcher\ContainerAwareEventDispatcher.php on line 145
It stacks up from the bootstrap.php file which I rebuilt using composer install.
Should I re-install FOSHttpCacheBundle?

Related

Uncaught Error: Class 'ComposerAutoloaderInit' not found

After attempting to remove and reinstall a package I'm getting this new error when I try to include('vendor/autoload.php');
Fatal error: Uncaught Error: Class >'ComposerAutoloaderInit7b3c839efeba468a3d595a365ceb8e89' not found in >mypath\vendor\autoload.php:7 Stack trace: #0 mypath\mypage.php(2): include() >#1 {main} thrown in mypath\vendor\autoload.php on line 7
I've tried running composer clearcache before and after reinstalling the package. I deleted C:/Users/MyUsername/AppData/Roaming/Composer and even completely uninstalled Composer. After I reinstalled composer and then reinstalled the package, the error message remains.
What am I missing? I feel like it has a hidden cache somewhere that's breaking this.
Your autoloader seems to be on an unfit state.
Just regenerate it.
composer dump-autoload
If this doesn't work (although it should), simply remove the whole vendor directory, and run composer install again.
Clearing composer's cache has no effect on this, since this is only the one used by composer to avoid downloading files all over again, not a project level cache.

Class 'League\Glide\ServerFactory' is not found [duplicate]

After attempting to remove and reinstall a package I'm getting this new error when I try to include('vendor/autoload.php');
Fatal error: Uncaught Error: Class >'ComposerAutoloaderInit7b3c839efeba468a3d595a365ceb8e89' not found in >mypath\vendor\autoload.php:7 Stack trace: #0 mypath\mypage.php(2): include() >#1 {main} thrown in mypath\vendor\autoload.php on line 7
I've tried running composer clearcache before and after reinstalling the package. I deleted C:/Users/MyUsername/AppData/Roaming/Composer and even completely uninstalled Composer. After I reinstalled composer and then reinstalled the package, the error message remains.
What am I missing? I feel like it has a hidden cache somewhere that's breaking this.
Your autoloader seems to be on an unfit state.
Just regenerate it.
composer dump-autoload
If this doesn't work (although it should), simply remove the whole vendor directory, and run composer install again.
Clearing composer's cache has no effect on this, since this is only the one used by composer to avoid downloading files all over again, not a project level cache.

Valet Install On Mac - Cannot Redeclare

I'm installing Valet on my MacBook Pro - El Capitan.
I installed PHP and MySQL with Homebrew as suggested on the Valet documentation page.
However, when I try to install Valet, I get the error:
PHP Fatal error: Cannot redeclare resolve() (previously declared in /Users/marc/.composer/vendor/hoa/core/Protocol.php:1140) in /Users/marc/.composer/vendor/laravel/valet/cli/includes/helpers.php on line 57
Fatal error: Cannot redeclare resolve() (previously declared in /Users/marc/.composer/vendor/hoa/core/Protocol.php:1140) in /Users/marc/.composer/vendor/laravel/valet/cli/includes/helpers.php on line 57
My composer.json file looks like this:
{
"require": {
"phpunit/phpunit": "~4.2",
"phpmetrics/phpmetrics": "^1.10",
"laravel/valet": "^1.1"
}
}
I have tried deleting composer.lock and deleted the vendor directory, then composer install, but nothing changes. Any one have any advice here?
I ran into this recently and I was able to resolve it by uninstalling / reinstalling valet:
composer global remove laravel/valet
then
composer global require laravel/valet
Basically there are 2 methods called the same thing, one in
/Users/marc/.composer/vendor/hoa/core/Protocol.php line 1140
and the other in /Users/marc/.composer/vendor/laravel/valet/cli/includes/helpers.php on line 57.
A quick fix would be to remove the phpmetrics/phpmetrics dependency and run composer install again
Good thing is that in both places they check if the function exists, so you can declare it yourself.
If declare your own version before the vendor/autoload.php file is loaded, if you have control over this. So you could declare it to do what it currently does in Laravels helpers.php
I see you solved your issue, but for posterity:
You may have ran: composer global require "laravel/laravel"
Then ran: composer global require "laravel/installer"
Run: composer global remove "laravel/laravel" to get rid of the duplication.

Interface 'Symfony\Component\HttpKernel\HttpKernelInterface' not found

After upgrading from Symfony 2.3 to 2.8 I get the following error:
Fatal error: Interface
'Symfony\Component\HttpKernel\HttpKernelInterface' not found in
app/bootstrap.php.cache on line 2629
Already tried removing the vendor folder and doing a composer install.
Any ideas?
Have you tried removing cached code? It seems like you've procompiled your application into one file bootstrap.php.cache. Have you tried removing it.
Otherwise it is always a good idea to do two of the following commands:
php composer.phar dump-autoload - update autolod file
php app/console cache:clear - removes cache
I had to add the following line to web/app.php and web/app_dev.php:
$loader = require __DIR__.'/../app/autoload.php';
And also update app/console.
Found this by comparing my files with a fresh install of Symfony 2.8

phpseclib\aes not found after composer.phar update using FUELPHP

I just up updated composer.phar in my local environment.
Now, I get an error that says
Fatal error: Class 'phpseclib\Crypt\AES' not found in /var/www/html/tms2/fuel/core/classes/crypt.php on line 213
How can I fix this?
Do you use 1.8/develop?
Recently it has switched to the composer version.
https://github.com/fuel/fuel/commit/87c1a6feb5deaff63dfa2cb561035ea6c51b724b
Check your composer.json and update it, then do composer update again.

Categories