diff --git a/UPGRADE.md b/UPGRADE.md index 7a3ed6a..ee407bd 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -2,9 +2,48 @@ This document describes the changes needed when upgrading from one version to another. +## Upgrading From 7.x to 8.0 + +### Step 1: upgrade PHP and Symfony + +Minimum required PHP version was raised to 7.1 and Symfony to 4.0. +[Rector](https://github.com/rectorphp/rector) can help you with migration. + +### Step 2: remove usage of GuzzleEventListenerInterface + +The interface `GuzzleEventListenerInterface` was removed. +Please read the [documentation](https://github.com/8p/EightPointsGuzzleBundle#listening-to-events) in case you want to listen pre/post translation events for specific client. + +### Step 3: follow strict typing rules + +If your classes are overriding some classes from bundle, then check that all methods are following arguments and return types. + +### Step 4: replace usage of EightPointsGuzzleBundlePlugin interface + +before: +```php +use EightPoints\Bundle\GuzzleBundle\EightPointsGuzzleBundlePlugin; + +class Foo implements EightPointsGuzzleBundlePlugin +{ + +} +``` + +after: +```php +use EightPoints\Bundle\GuzzleBundle\PluginInterface; + +class Foo implements PluginInterface +{ + +} +``` + ## Upgrading From 6.x to 7.0 ### Step 1: change namespace in AppKernel + before: ```php public function registerBundles() @@ -30,6 +69,7 @@ public function registerBundles() ``` ### Step 2: change config key in app/config/config.yml + before: ```yaml guzzle: @@ -47,6 +87,7 @@ eight_points_guzzle: ``` ### Step 3: move headers key under options config + before: ```yaml guzzle: @@ -69,6 +110,7 @@ eight_points_guzzle: ``` ### Step 4: client call + before: ```php $this->get('guzzle.client.api_crm'); @@ -80,6 +122,7 @@ $this->get('eight_points_guzzle.client.api_crm'); ``` ### Step 5: event listeners definition + before: ```xml @@ -95,6 +138,7 @@ after: ``` ### Step 6: if you have created any services, you should change name + before: ```xml