skip to Main Content

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


  1. 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:

    composer update
    
    Login or Signup to reply.
  2. Just delete composer.lock.json, with me resolve and after run composer install

    Login or Signup to reply.
  3. composer upgrade laravel/framework --with-all-dependencies

    You would need to update laravel/framework with it’s dependencies. Instead of running composer upgrade which upgrades all packages, you could just run composer 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.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search