Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

davidbarker's avatar

Artisan giving PHP Fatal error

Hi,

I'm not sure what happened. My app has been fine, and as far as I know I didn't change anything, but when I ran composer update it threw this error:

  - Removing fideloper/proxy (dev-master 5f70b1d)
  - Installing fideloper/proxy (dev-master 30988aa)
    Downloading: 100%         

Writing lock file
Generating autoload files
PHP Fatal error:  Class 'Fideloper\Proxy\ProxyServiceProvider' not found in .../site/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 157

Script php artisan clear-compiled handling the post-install-cmd event returned with an error

Now, if I try to do anything at all with php artisan, I get

PHP Fatal error:  Class 'Fideloper\Proxy\ProxyServiceProvider' not found in .../site/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php on line 157

I also get the error if I try to run composer install or composer update now. No error is thrown if I run composer install --no-scripts or composer update --no-scripts however, but this still doesn't fix Artisan.

I've tried clearing composer's cache, removing "fideloper/proxy": "dev-master" from my composer.json file, and changing "dev-master" to "3.0.0", but I'm still stuck. Any ideas?

Thanks!

My composer.json is as follows:

{
    "name": "laravel/laravel",
    "description": "The Laravel Framework.",
    "keywords": ["framework", "laravel"],
    "license": "MIT",
    "require": {
        "laravel/framework": "4.2.11",
        "fideloper/proxy": "dev-master",
        "barryvdh/laravel-ide-helper": "~1.11"
    },
    "autoload": {
        "classmap": [
            "app/commands",
            "app/controllers",
            "app/models",
            "app/database/migrations",
            "app/database/seeds",
            "app/tests/TestCase.php",
            "app/library"
        ]
    },
    "scripts": {
        "post-install-cmd": [
            "php artisan clear-compiled",
            "php artisan optimize"
        ],
        "post-update-cmd": [
            "php artisan clear-compiled",
            "php artisan ide-helper:generate",
            "php artisan optimize"
        ],
        "post-create-project-cmd": [
            "php artisan key:generate"
        ]
    },
    "config": {
        "preferred-install": "dist"
    },
    "minimum-stability": "stable"
}
0 likes
2 replies
davidbarker's avatar

OK. I just removed 'Fideloper\Proxy\ProxyServiceProvider' from .../site/app/config/app.php and ran composer install and composer update again, and Artisan now seems to be working.

Do you think this is an acceptable solution? Will removing 'Fideloper\Proxy\ProxyServiceProvider' cause problems?

bobbybouwmann's avatar

Remove the dependency for fideloper/proxy and do a composer install. Then add the package again and see if it works ;)

Please or to participate in this conversation.