PHP Fatal error: During inheritance of ArrayAccess: Uncaught ErrorException: Return type of Illuminate\Support\Collection::offsetExists($key)

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

If you are facing this issue:

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 /opt/lampp/htdocs/devopsschool/ds-company-ms/vendor/laravel/framework/src/Illuminate/Support/Collection.php:1693
Stack trace:
#0 /opt/lampp/htdocs/devopsschool/ds-company-ms/vendor/laravel/framework/src/Illuminate/Support/Collection.php(19): Illuminate\Foundation\Bootstrap\HandleExceptions->handleError()
#1 /opt/lampp/htdocs/devopsschool/ds-company-ms/vendor/composer/ClassLoader.php(480): include('...')
#2 /opt/lampp/htdocs/devopsschool/ds-company-ms/vendor/composer/ClassLoader.php(346): Composer\Autoload\includeFile()
#3 /opt/lampp/htdocs/devopsschool/ds-company-ms/vendor/laravel/framework/src/Illuminate/Support/helpers.php(423): Composer\Autoload\ClassLoader->loadClass()
#4 /opt/lampp/htdocs/devopsschool/ds-company-ms/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(121): collect()
#5 /opt/lampp/htdocs/devopsschool/ds-company-ms/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(97): Illuminate\Foundation\PackageManifest->build()
#6 /opt/lampp/htdocs/devopsschool/ds-company-ms/vendor/laravel/framework/src/Illuminate/Foundation/PackageManifest.php(80): Illuminate\Foundation\PackageManifest->getManifest()
#7 /opt/lampp/htdocs/devopsschool/ds-company-ms/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/RegisterFacades.php(26): Illuminate\Foundation\PackageManifest->aliases()
#8 /opt/lampp/htdocs/devopsschool/ds-company-ms/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(213): Illuminate\Foundation\Bootstrap\RegisterFacades->bootstrap()
#9 /opt/lampp/htdocs/devopsschool/ds-company-ms/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(296): Illuminate\Foundation\Application->bootstrapWith()
#10 /opt/lampp/htdocs/devopsschool/ds-company-ms/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(119): Illuminate\Foundation\Console\Kernel->bootstrap()
#11 /opt/lampp/htdocs/devopsschool/ds-company-ms/artisan(35): Illuminate\Foundation\Console\Kernel->handle()
#12 {main} in /opt/lampp/htdocs/devopsschool/ds-company-ms/vendor/laravel/framework/src/Illuminate/Support/Collection.php on line 19
PHP Fatal error:  Uncaught ErrorException: Method ReflectionParameter::getClass() is deprecated in /opt/lampp/htdocs/devopsschool/ds-company-ms/vendor/laravel/framework/src/Illuminate/Container/Container.php:811
Stack trace:

Solution:-

Step 1:- Go to your project it doesn’t matter in which server you use local/linux.

Step 2:- Upload your vendor file in you project in zip for linux server.

Step 3:- Now Unzip your vendor file in your project using below command.

unzip vendor.zip

Step 4:- now you have to clear cache using below code.

php artisan c:cache

All Issue is Solved.

Senior Software Development Engineer at Cotocus

Related Posts

How We Fixed a Stubborn Laravel MeiliSearch Bulk Indexing Failure (16,000+ Records)

Limited Time Offer! For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly. Master DevOps, SRE, DevSecOps Skills! Enroll Now If…

Read More

Laravel Search Without Docker, Queues, or Horizon

Limited Time Offer! For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly. Master DevOps, SRE, DevSecOps Skills! Enroll Now Modern…

Read More

Laravel Scout with Typesense vs Meilisearch

Limited Time Offer! For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly. Master DevOps, SRE, DevSecOps Skills! Enroll Now Modern…

Read More

SESSION_DRIVER=file vs SESSION_DRIVER=database in Laravel

Limited Time Offer! For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly. Master DevOps, SRE, DevSecOps Skills! Enroll Now Which…

Read More

Laravel Logging: Complete Step-by-Step Guide to Enable, Debug, Verify, and Master Logs in Any Laravel Project

Limited Time Offer! For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly. Master DevOps, SRE, DevSecOps Skills! Enroll Now Logging…

Read More

Complete Tutorial: Setting Up Laravel Telescope Correctly (Windows + XAMPP + Custom Domain)

Limited Time Offer! For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly. Master DevOps, SRE, DevSecOps Skills! Enroll Now This…

Read More
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments