Error when trying to serve Laravel application - php

I'm trying to serve (php artisan serve) a Laravel application but for some reason I'm getting this fatal error:
PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key) should either be compatible with ArrayAccess::offsetExists(mixed $offset): bool, or the #[\ReturnTypeWillChange] attribute should be used to temporarily suppress the notice in C:\Program Files\Ampps\www\emotions\vendor\laravel\framework\src\Illuminate\Support\Collection.php:1338
Stack trace:
#1 C:\Program Files\Ampps\www\emotions\vendor\composer\ClassLoader.php(444): include('...')
#2 C:\Program Files\Ampps\www\emotions\vendor\composer\ClassLoader.php(322): Composer\Autoload\includeFile()
#3 C:\Program Files\Ampps\www\emotions\vendor\laravel\framework\src\Illuminate\Support\helpers.php(110): Composer\Autoload\ClassLoader->loadClass()
#4 C:\Program Files\Ampps\www\emotions\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(89): collect()
#5 C:\Program Files\Ampps\www\emotions\vendor\laravel\framework\src\Illuminate\Foundation\PackageManifest.php(78): Illuminate\Foundation\PackageManifest->config()
#6 C:\Program Files\Ampps\www\emotions\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases()
#7 C:\Program Files\Ampps\www\emotions\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(230): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap()
#8 C:\Program Files\Ampps\www\emotions\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(310): Illuminate\Foundation\Application->bootstrapWith()
#9 C:\Program Files\Ampps\www\emotions\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(127): Illuminate\Foundation\Console\Kernel->bootstrap()
#10 C:\Program Files\Ampps\www\emotions\artisan(37): Illuminate\Foundation\Console\Kernel->handle()
#11 {main}
Does anyone know what is going on? I've tried upgrading the PHP version the project is using in the composer.json (project is using ^7.2.5 and I'm using 8.1.2) but nothing has worked.

Update composer.json on your laravel project.
like this
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^7.2|^8.0",
"fideloper/proxy": "^4.4",
"fruitcake/laravel-cors": "^2.0",
"guzzlehttp/guzzle": "^7.0.1",
"laravel/framework": "^8.40",
"laravel/tinker": "^2.5"
},

Related

phpcode sniffer unable to run in magento module

I am trying to install phpcodesniffer in my magento module project. Below is my composer.json
{
"name": "test/myModule",
"description": "testin",
"type": "magento2-module",
"version": "1.0.0",
"require": {
"php": "^8.1"
},
"require-dev": {
"squizlabs/php_codesniffer": "3.*",
"magento/magento-coding-standard": "^31.0"
},
"autoload": {
"files": [ "registration.php" ],
"psr-4": {
"Test\\Module\\": ""
}
}
}
Now I can successfully run composer update/install in my folder. However when I run the command vendor/bin/phpcs --standard=Magento2 ./ I get an error like below
PHP Fatal error: Uncaught Error: Class "Magento\Framework\Component\ComponentRegistrar" not found in /home/cloudpanel/htdocs/magento2.mgt/app/code/Test/Module/registration.php:2
Stack trace:
#0 /home/cloudpanel/htdocs/magento2.mgt/app/code/Test/Module/vendor/composer/autoload_real.php(55): require()
#1 /home/cloudpanel/htdocs/magento2.mgt/app/code/Test/Module/vendor/composer/autoload_real.php(38): composerRequireabd7530303d7978f314768d362cfeb3f()
#2 /home/cloudpanel/htdocs/magento2.mgt/app/code/Test/Module/vendor/autoload.php(25): ComposerAutoloaderInitabd7530303d7978f314768d362cfeb3f::getLoader()
#3 /home/cloudpanel/htdocs/magento2.mgt/app/code/Test/Module/vendor/squizlabs/php_codesniffer/autoload.php(79): include('...')
#4 /home/cloudpanel/htdocs/magento2.mgt/app/code/Test/Module/vendor/squizlabs/php_codesniffer/bin/phpcs(17): PHP_CodeSniffer\Autoload::load()
#5 /home/cloudpanel/htdocs/magento2.mgt/app/code/Test/Module/vendor/bin/phpcs(120): include('...')
#6 {main}
thrown in /home/cloudpanel/htdocs/magento2.mgt/app/code/Test/Module/registration.php on line 2
How can I run the php codesniffer here?

Composer require fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters

I'm trying to add authentification to my laravel app. As make:auth has been deprecated, I have tried both ui:auth and breeze.
Is it possible that I have to upgrade my composer? It came with version 1.10.1. when I installed it using the command line installation, even though the latest version is 2.5.1.
However, both
composer require laravel/breeze:1.9.2
composer require laravel/ui
produce the following error:
Warning from https://repo.packagist.org: Support for Composer 1 is deprecated and some packages will not be available. You should upgrade to Composer 2. See https://blog.packagist.com/deprecating-composer-1-support/
Info from https://repo.packagist.org: #StandWithUkraine
Using version ^4.1 for laravel/ui
./composer.json has been updated
PHP Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in /usr/share/php/Composer/DependencyResolver/DefaultPolicy.php:84
Stack trace:
#0 [internal function]: array_merge()
#1 /usr/share/php/Composer/DependencyResolver/DefaultPolicy.php(84): call_user_func_array()
#2 /usr/share/php/Composer/DependencyResolver/Solver.php(387): Composer\DependencyResolver\DefaultPolicy->selectPreferredPackages()
#3 /usr/share/php/Composer/DependencyResolver/Solver.php(740): Composer\DependencyResolver\Solver->selectAndInstall()
#4 /usr/share/php/Composer/DependencyResolver/Solver.php(231): Composer\DependencyResolver\Solver->runSat()
#5 /usr/share/php/Composer/Installer.php(489): Composer\DependencyResolver\Solver->solve()
#6 /usr/share/php/Composer/Installer.php(232): Composer\Installer->doInstall()
#7 /usr/share/php/Composer/Command/RequireCommand.php(248): Composer\Installer->run()
#8 /usr/share/php/Composer/Command/RequireCommand.php(205): Composer\Command\RequireCommand->doUpdate()
#9 /usr/share/php/Symfony/Component/Console/Command/Command.php(255): Composer\Command\RequireCommand->execute()
#10 /usr/share/php/Symfony/Component/Console/Application.php(934): Symfony\Component\Console\Command\Command->run()
#11 /usr/share/php/Symfony/Component/Console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#12 /usr/share/php/Composer/Console/Application.php(281): Symfony\Component\Console\Application->doRun()
#13 /usr/share/php/Symfony/Component/Console/Application.php(149): Composer\Console\Application->doRun()
#14 /usr/share/php/Composer/Console/Application.php(113): Symfony\Component\Console\Application->run()
#15 /usr/bin/composer(62): Composer\Console\Application->run()
#16 {main}
thrown in /usr/share/php/Composer/DependencyResolver/DefaultPolicy.php on line 84
Fatal error: Uncaught ArgumentCountError: array_merge() does not accept unknown named parameters in /usr/share/php/Composer/DependencyResolver/DefaultPolicy.php:84
Stack trace:
#0 [internal function]: array_merge()
#1 /usr/share/php/Composer/DependencyResolver/DefaultPolicy.php(84): call_user_func_array()
#2 /usr/share/php/Composer/DependencyResolver/Solver.php(387): Composer\DependencyResolver\DefaultPolicy->selectPreferredPackages()
#3 /usr/share/php/Composer/DependencyResolver/Solver.php(740): Composer\DependencyResolver\Solver->selectAndInstall()
#4 /usr/share/php/Composer/DependencyResolver/Solver.php(231): Composer\DependencyResolver\Solver->runSat()
#5 /usr/share/php/Composer/Installer.php(489): Composer\DependencyResolver\Solver->solve()
#6 /usr/share/php/Composer/Installer.php(232): Composer\Installer->doInstall()
#7 /usr/share/php/Composer/Command/RequireCommand.php(248): Composer\Installer->run()
#8 /usr/share/php/Composer/Command/RequireCommand.php(205): Composer\Command\RequireCommand->doUpdate()
#9 /usr/share/php/Symfony/Component/Console/Command/Command.php(255): Composer\Command\RequireCommand->execute()
#10 /usr/share/php/Symfony/Component/Console/Application.php(934): Symfony\Component\Console\Command\Command->run()
#11 /usr/share/php/Symfony/Component/Console/Application.php(273): Symfony\Component\Console\Application->doRunCommand()
#12 /usr/share/php/Composer/Console/Application.php(281): Symfony\Component\Console\Application->doRun()
#13 /usr/share/php/Symfony/Component/Console/Application.php(149): Composer\Console\Application->doRun()
#14 /usr/share/php/Composer/Console/Application.php(113): Symfony\Component\Console\Application->run()
#15 /usr/bin/composer(62): Composer\Console\Application->run()
#16 {main}
thrown in /usr/share/php/Composer/DependencyResolver/DefaultPolicy.php on line 84
Here is my composer.json
{
"name": "laravel/laravel",
"type": "project",
"description": "The Laravel Framework.",
"keywords": ["framework", "laravel"],
"license": "MIT",
"require": {
"php": "^8.0.2",
"guzzlehttp/guzzle": "^7.2",
"laravel/breeze": "1.9.2",
"laravel/framework": "^9.19",
"laravel/sanctum": "^3.0",
"laravel/tinker": "^2.7",
"laravel/ui": "^4.1"
},
"require-dev": {
"fakerphp/faker": "^1.9.1",
"laravel/pint": "^1.0",
"laravel/sail": "^1.0.1",
"mockery/mockery": "^1.4.4",
"nunomaduro/collision": "^6.1",
"phpunit/phpunit": "^9.5.10",
"spatie/laravel-ignition": "^1.0"
},
"autoload": {
"psr-4": {
"App\": "app/",
"Database\Factories\": "database/factories/",
"Database\Seeders\": "database/seeders/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
}
},
"scripts": {
"post-autoload-dump": [
"Illuminate\Foundation\ComposerScripts::postAutoloadDump",
"#php artisan package:discover --ansi"
],
"post-update-cmd": [
"#php artisan vendor:publish --tag=laravel-assets --ansi --force"
],
"post-root-package-install": [
"#php -r "file_exists('.env') || copy('.env.example', '.env');""
],
"post-create-project-cmd": [
"#php artisan key:generate --ansi"
]
},
"extra": {
"laravel": {
"dont-discover": []
}
},
"config": {
"optimize-autoloader": true,
"preferred-install": "dist",
"sort-packages": true,
"allow-plugins": {
"pestphp/pest-plugin": true
}
},
"minimum-stability": "dev",
"prefer-stable": true
}
There was an issue with composer and php 8.0, as stated in this issue ticket #9097 and fixed in the newer version pull #9076
Basically, update your composer.
Try updating composer with composer self-update if you still have the same error you will need to manually update it.
If you are not familiar with the manual method, ask someone that knows to help you.
sudo apt install wget php-cli php-zip unzip
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
HASH="$(wget -q -O - https://composer.github.io/installer.sig)"
php -r "if (hash_file('SHA384', 'composer-setup.php') === '$HASH') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"
Installer verified
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
All settings correct for using Composer
Downloading...
Composer (version 2.0.14) successfully installed to:
/usr/local/bin/composer
Use it: php /usr/local/bin/composer

After upgrading php version from 7.3 to 8.1 LaravelGettext not working

Hi after upgrading PHP version 7.3 to 8.1 zerospam/laravel-gettext is not working below is the error:
[Wed Oct 5 10:07:23 2022] PHP Fatal error: Declaration of Xinax\LaravelGettext\FileLoader\Cache\ApcuFileCacheLoader::loadResource($resource) must be compatible with Symfony\Component\Translation\Loader\FileLoader::loadResource(string $resource): array in C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\zerospam\laravel-gettext\src\Xinax\LaravelGettext\FileLoader\Cache\ApcuFileCacheLoader.php on line 40
[Wed Oct 5 10:07:23 2022] PHP Fatal error: Uncaught Error: Class "Xinax\LaravelGettext\FileLoader\Cache\ApcuFileCacheLoader" not found in C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\zerospam\laravel-gettext\src\Xinax\LaravelGettext\Translators\Symfony.php:114
Stack trace:
#0 C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\zerospam\laravel-gettext\src\Xinax\LaravelGettext\Translators\Symfony.php(63): Xinax\LaravelGettext\Translators\Symfony->createTranslator()
#1 C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\zerospam\laravel-gettext\src\Xinax\LaravelGettext\Translators\Symfony.php(77): Xinax\LaravelGettext\Translators\Symfony->getTranslator()
#2 C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\zerospam\laravel-gettext\src\Xinax\LaravelGettext\Translators\Symfony.php(35): Xinax\LaravelGettext\Translators\Symfony->setLocale('en_CA')
#3 C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\zerospam\laravel-gettext\src\Xinax\LaravelGettext\LaravelGettextServiceProvider.php(68): Xinax\LaravelGettext\Translators\Symfony->__construct(Object(Xinax\LaravelGettext\Config\Models\Config), Object(Xinax\LaravelGettext\Adapters\LaravelAdapter), Object(Xinax\LaravelGettext\FileSystem), Object(Xinax\LaravelGettext\Storages\SessionStorage))
#4 C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\laravel\framework\src\Illuminate\Container\Container.php(873): Xinax\LaravelGettext\LaravelGettextServiceProvider->Xinax\LaravelGettext{closure}(Object(Illuminate\Foundation\Application), Array)
#5 C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\laravel\framework\src\Illuminate\Container\Container.php(758): Illuminate\Container\Container->build(Object(Closure))
#6 C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(851): Illuminate\Container\Container->resolve('Xinax\LaravelGe...', Array, true)#7 C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\laravel\framework\src\Illuminate\Container\Container.php(694): Illuminate\Foundation\Application->resolve('Xinax\LaravelGe...', Array)
#8 C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\laravel\framework\src\Illuminate\Foundation\Application.php(836): Illuminate\Container\Container->make('Xinax\LaravelGe...', Array)
#9 C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php(119): Illuminate\Foundation\Application->make('Xinax\LaravelGe...', Array)
#10 C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\zerospam\laravel-gettext\src\Xinax\LaravelGettext\Support\helpers.php(18): app('Xinax\LaravelGe...')
#11 C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\app\Exceptions\Handler.php(152): _i('Details')
#12 C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(196): App\Exceptions\Handler->render(Object(Illuminate\Http\Request), Object(Symfony\Component\ErrorHandler\Error\FatalError))
#13 C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(173): Illuminate\Foundation\Bootstrap\HandleExceptions->renderHttpResponse(Object(Symfony\Component\ErrorHandler\Error\FatalError))
#14 C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\laravel\framework\src\Illuminate\Foundation\Bootstrap\HandleExceptions.php(209): Illuminate\Foundation\Bootstrap\HandleExceptions->handleException(Object(Symfony\Component\ErrorHandler\Error\FatalError))
#15 [internal function]: Illuminate\Foundation\Bootstrap\HandleExceptions->handleShutdown()
#16 {main}
thrown in C:\Users\pragneshc\promis\Promis3.0\promis3.0-laravel\vendor\zerospam\laravel-gettext\src\Xinax\LaravelGettext\Translators\Symfony.php on line 114
and below is the composer.json file
"require": {
"php": "^8.1",
"artisaninweb/laravel-soap": "0.3.0.9",
"barryvdh/laravel-dompdf": "^0.8.5",
"fideloper/proxy": "^4.0",
"laravel/framework": "^8.0",
"laravel/homestead": "^13.2",
"laravel/tinker": "^2.0",
"maatwebsite/excel": "^3.1",
"phpoffice/phpspreadsheet": "^1.10",
"zerospam/laravel-gettext": "^8.0"
},
"require-dev": {
"facade/ignition": "^2.3.6",
"fzaninotto/faker": "^1.4",
"mockery/mockery": "^1.0",
"nunomaduro/collision": "^5.1",
"phpunit/phpunit": "^9.0"
},
Laravel 8 is not suitable with php 8.1, so when you run composer, it throw an error because its package is for php 7.3.
Try downgrading your php or update laravel to Laravel 9.

Uncaught RuntimeException: A facade root has not been set. in Facade.php:258 when upgrading to Laravel 7

I got the error regarding facade even though I followed the laravel upgrade guide
PHP Fatal error: Uncaught RuntimeException: A facade root has not been set. in D:\Git_Undiksha\legalisir-ijasah-online\vendor\laravel\framework\src\Illuminate\Support\Faca
des\Facade.php:258
Stack trace:
#0 D:\Git_Undiksha\legalisir-ijasah-online\app\Exceptions\Handler.php(39): Illuminate\Support\Facades\Facade::__callStatic('error', Array)
#1 D:\Git_Undiksha\legalisir-ijasah-online\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(366): App\Exceptions\Handler->report(Object(Error))
#2 D:\Git_Undiksha\legalisir-ijasah-online\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(131): Illuminate\Foundation\Console\Kernel->reportException
(Object(Error))
#3 D:\Git_Undiksha\legalisir-ijasah-online\artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Compo
nent\Console\Output\ConsoleOutput))
#4 {main}
thrown in D:\Git_Undiksha\legalisir-ijasah-online\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 258
Fatal error: Uncaught RuntimeException: A facade root has not been set. in D:\Git_Undiksha\legalisir-ijasah-online\vendor\laravel\framework\src\Illuminate\Support\Facades\F
acade.php:258
Stack trace:
#0 D:\Git_Undiksha\legalisir-ijasah-online\app\Exceptions\Handler.php(39): Illuminate\Support\Facades\Facade::__callStatic('error', Array)
#1 D:\Git_Undiksha\legalisir-ijasah-online\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(366): App\Exceptions\Handler->report(Object(Error))
#2 D:\Git_Undiksha\legalisir-ijasah-online\vendor\laravel\framework\src\Illuminate\Foundation\Console\Kernel.php(131): Illuminate\Foundation\Console\Kernel->reportException
(Object(Error))
#3 D:\Git_Undiksha\legalisir-ijasah-online\artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Compo
nent\Console\Output\ConsoleOutput))
#4 {main}
thrown in D:\Git_Undiksha\legalisir-ijasah-online\vendor\laravel\framework\src\Illuminate\Support\Facades\Facade.php on line 258
Facade.php:258
public static function __callStatic($method, $args)
{
$instance = static::getFacadeRoot();
if (! $instance) {
throw new RuntimeException('A facade root has not been set.');
}
return $instance->$method(...$args);
}
Here is my composer.json:
"require": {
"php": ">=7.2.5",
"laravel/framework": "^7.0",
"nunomaduro/collision": "^4.1",
"laravel/tinker": "^2.0",
"facade/ignition": "^2.0"
},
"require-dev": {
"composer/composer": "^1.10",
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "^9.1"
},
I did change the Handler.php Exception to Throwable, session.php secure env from false to null, and set any handle() command return to integer.
How do I solve the facade error and what should I do?
After making a new working Laravel version 7 project, copy the app and config folders to the new one (for testing purpose), renaming a file and then testing with php artisan --version every changes I made (rename each no-numbered files to (1) and (2) files to no-numbered), finally I found out what is the problem: config/excel.php
in excel.php I commented autosize-method and it works!
// 'autosize-method' => PHPExcel_Shared_Font::AUTOSIZE_METHOD_APPROX,

Laravel 5.1.11 Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist'

After doing composer update my project starts to show this error in everywhere in my production environment. But in local is working perfectly.
Fatal error: Uncaught exception 'ReflectionException' with message 'Class log does not exist' in
.../src/Illuminate/Container/Container.php:736 Stack trace: #0
.../src/Illuminate/Container/Container.php(736): ReflectionClass->__construct('log') #1
.../src/Illuminate/Container/Container.php(626): Illuminate\Container\Container->build('log', Array) #2
.../src/Illuminate/Foundation/Application.php(674): Illuminate\Container\Container->make('log', Array) #3
.../src/Illuminate/Container/Container.php(837): Illuminate\Foundation\Application->make('Psr\\Log\\LoggerI...') #4
.../src/Illuminate/Container/Container.php(800): Illuminate\Container\Container->resolveClass(Object(ReflectionParameter)) #5
.../src/Illuminate/Container/Container.php(771): Illuminate\Cont in
.../src/Illuminate/Container/Container.php on line 736
My local environment is OSX 10.10.5 and my production environment is Linux.
I made composer update again but don't fix the error.
My composer.json is look like this:
...
"require": {
"php": ">=5.5.9",
"laravel/framework": "5.1.*",
"folklore/image": "0.2.*",
"illuminate/html": "5.*",
"cartalyst/sentry": "dev-feature/laravel-5"
},
"require-dev": {
"fzaninotto/faker": "~1.4",
"mockery/mockery": "0.9.*",
"phpunit/phpunit": "~4.0",
"phpspec/phpspec": "~2.1",
"laracasts/generators": "~1.1",
"php-console/php-console": "~3.0",
"php-console/laravel-service-provider": "~5.0"
},
...
Thanks guys!
I found the problem.
I removed the packages of my composer.json and works.
"php-console/php-console": "~3.0",
"php-console/laravel-service-provider": "~5.0"
I think that the server does not support the packages because is necessary a .bat file for the packages work.
Most of the times, this error fixing is very simple. Just run
composer dump-autoload
and without any doubt, your error will be fixed.

Categories