0
votes

Laravel 4.1

It was working fine, till I reinstalled all the code again.
Did the composer install & it has been failing with the same error.

php artisan {"error":{"type":"Symfony\Component\Debug\Exception\FatalErrorException","message":"Class 'Idocrea8\Theme\Provider\ThemeServiceProvider' not found","file":"/public_html/vendor/laravel/framework/src/Illuminate/Foundation/ProviderRepository.php","line":158}}

The app.config has this provider:

'Idocrea8\Theme\Provider\ThemeServiceProvider',

The workbench directory has a folder named idocrea8 and seems to have all the files.
For example, the composer.json inside this folder : /workbench/idocrea8/theme

{
    "name": "idocrea8/theme",
    "description": "",
    "authors": [
        {
            "name": "iDocrea8",
            "email": "[email protected]"
        }
    ],
    "require": {
        "php": ">=5.3.0",
        "illuminate/support": "4.1.*"
    },
    "autoload": {
        "psr-0": {
            "Idocrea8\\Theme": "src/"
        }
    },
    "minimum-stability": "stable"
}

The workbench/idocrea8 has the following directories:
- theme - menu - image - hook

The actual ThemeServiceProvider.php is in this path - /workbench/idocrea8/theme/src/Idocrea8/Theme/provider

I'm not sure why the file cannot be found where it seems to be present..

1
it seems that the location is falseMattia Dinosaur
can you show the fully qualified name of ThemeServiceProvider?Mattia Dinosaur
First line of ThemeServiceProvider.php says : <?php namespace Idocrea8\Theme\Provider; Is that what you were asking ?PlanetUnknown

1 Answers

0
votes

psr-0 vs psr-4

and here

For Psr-0

Please note namespace declarations should end in \ to make sure the autoloader responds exactly.

may be you can try in composer json:

"autoload": {
        "psr-0": {
            "Idocrea8\\Theme\\": "src/"
        }
    }

or

 "autoload": {
        "psr-4": {
            "Idocrea8\\Theme\\": "src/Idocrea8/theme/"
        }
    }