Support the ongoing development of Laravel.io →
Installation IOC Packages

I cannot get rid of the following error:

{"error":{"type":"Symfony\\Component\\Debug\\Exception\\FatalErrorException","message":"Class 'Intercom\\IntercomBasicAuthClient' not found","file":"\/www\/htdocs\/laravel\/app\/ACME\/Services\/IntercomService.php","line":26}}

I have tried everything! I even deleted the composer.lock file and the whole vendor directory and did a fresh install via composer install. Nothing helped.

I ran "php artisan clear-compiled", "php artisan dump-autoload" and "php artisan optimize"... nothing helped :(

The class is physically in the right location and it works perfectly fine on my local machine. It just doesn't work on my development and production server and I have no clue what the problem is.

Has anyone any idea or ran into the same issue!?

This is an excerpt of the composer.json:

    "repositories": [
        {
            "type": "vcs",
            "url": "https://github.com/intercom/intercom-php"
        }
    ],
    "require": {
        "laravel/framework": "4.2.*",
        "intercom/intercom-api-client": "dev-master"
    }
Last updated 2 years ago.
0

I have found the solution! The problem was in the Intercom PHP Package. In the src/ folder of the package they were writing the folder of the intercom namespace in lowercase letters like so:

src/intercom/...

Since intercom doesn't match the namespace Intercom it didn't work!

However, on my local Mac it did work, since I guess the Mac is case-insensitive and doesn't care?!

I have been pulling my hair over this one and hope this helps others with this kind of issue...

Make sure that your Namespace matches the folder case in which it resides.

Last updated 2 years ago.
0

This happens on Windows environments as well, and I pulled out a few hairs before I worked that out too.

Last updated 2 years ago.
0

Maybe it's about git, you are pushing changings with some certain case sensitive Folders and Files, but git is changing this therefore it will work on Mac and Windows OSs but not on the server.

just use this command:

git config core.ignorecase false

above command for the current repository and you may add --global just after config keyword for global use.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.