I have updated my system to PHP 8.1 (XAMPP).
Now I have the problem that when I enter the command "php artisan serve" I get the following error message:
OpisClosureSerializableClosure implements the Serializable interface, which is deprecated.
Implement __serialize() and __unserialize() instead
(or in addition, if support for old PHP versions is necessary).
Can you help me what I can do to make it work again?
3
Answers
You need to update laravel dependencies. Simply go to your project root directory and use composer to update dependencies using command prompt.
Command should be:
Just delete
composer.lock.json
, with me resolve and after runcomposer install
composer upgrade laravel/framework --with-all-dependencies
You would need to update
laravel/framework
with it’s dependencies. Instead of runningcomposer upgrade
which upgrades all packages, you could just runcomposer upgrade laravel/framework --with-all-dependencies
, shorthand is-W
.From the composer command help
-W Update also dependencies of packages in the argument list, including those which are root requirements.