Home > Software design >  how to revert back an update in laravel
how to revert back an update in laravel

Time:02-09

i have updated a http client package to the latest version.but after the update the i start getting errors on my system.how can i revert back to the previous version before the update.my laravel version of my project is 5.8 while the http client package is in the latest version (7.4.1)..

                 $body = array(
                'name' => $data['product_name'], 
                'prdcategory_id' => $data['category'], 
                'prdsubcategory_id' => $data['subcategory'],
                'prdprdcategory_id' => $data['prdcategory'],
                'brand_id' => $data['prdbrand'],
                'description' => $data['description']);
                $response = Http::post($url, $body);
                $jsonResponse = $response->object();

here is the versions i have edited in the composer.json where i have changed to version 5.8,

the vesrion is still 7.4.1 even after composer installthe version is still 7.4.1 after composer install

CodePudding user response:

To revert back an update of a package go to composer.json, and find your package there. Change the version, and run composer install.

In your case:

"http client package name": "5.8"

Dont forget to remove this char in the beginning of the version: ^. With the character it means at least version 5.8, but it will update to latest

  •  Tags:  
  • Related