Skip to content

Commit

Permalink
Prepare for 0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyholm committed Mar 6, 2016
1 parent a47bd8b commit ec1c720
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 15 deletions.
32 changes: 20 additions & 12 deletions Upgrade.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Upgrade from 0.6 to dev-master
# Upgrade

## Changes
This document explains how you upgrade from one version to another.

## Upgrade from 0.7 to dev-master


## Upgrade from 0.6 to 0.7

### Changes

* Introduced PHP-HTTP and PSR-7 messages
* Added constructor argument for responseDataType
Expand All @@ -10,10 +17,10 @@
To make sure you can upgrade you need to install a HTTP adapter.

```bash
php composer.phar require php-http/guzzle5-adapter:dev-master
php composer.phar require php-http/guzzle6-adapter
```

## BC breaks
### BC breaks

* Removed `LinkedIn::setRequest` in favor of `LinkedIn::setHttpAdapter`
* Removed `LinkedIn::getAppSecret` and `LinkedIn::getAppId`
Expand All @@ -22,23 +29,23 @@ php composer.phar require php-http/guzzle5-adapter:dev-master
* Removed `LinkedIn::getLastHeaders` in favor of `LinkedIn::getLastResponse`
* Made the public functions `LinkedIn::getResponseDataType` and `LinkedIn::getFormat` protected

# Upgrade from 0.5 to 0.6
## Upgrade from 0.5 to 0.6

## Changes
### Changes

* When exchanging the code for an access token we are now using the post body instead of query parameters
* Better error handling when exchange from code to access token fails

## BC breaks
### BC breaks

There are a few minor BC breaks. We removed the functions below:

* `LinkedIn::getUserId`, use `LinkedIn::getUser` instead
* `AccessToken::constructFromJson`, Use the constructor instead.

# Upgrade from 0.4 to 0.5
## Upgrade from 0.4 to 0.5

## Changed signature of `LinkedIn::api`
### Changed signature of `LinkedIn::api`

The signature of `LinkedIn::api` has changed to be more easy to work with.
```php
Expand All @@ -57,7 +64,8 @@ $linkedIn->api('POST', $resource, $options)
```
See the Readme about more options to the API function.

## Must inject IlluminateSessionStorage
### Must inject IlluminateSessionStorage

We have removed the protected `LinkedIn::init` function. That means if you were using `IlluminateSessionStorage` you have
to make a minor adjustment to your code.

Expand All @@ -72,10 +80,10 @@ $linkedIn->setStorage(new IlluminateSessionStorage());

If you don't know about `IlluminateSessionStorage` you are probably good ignoring this.

## Default format
### Default format

The default format when communicating with LinkedIn API is changed to json.

## Updated RequestInterface
### Updated RequestInterface

The `RequestInterface::send` was updated with a new signature. We did also introduce `RequestInterface::getHeadersFromLastResponse`.
5 changes: 2 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,8 @@
"email": "[email protected]"
}
],
"minimum-stability": "beta",
"require": {
"php": ">=5.4",
"php": "^5.4|^7.0",
"php-http/client-implementation": "^1.0",
"php-http/httplug": "^1.0",
"php-http/message": "^1.0",
Expand All @@ -31,7 +30,7 @@
},
"extra": {
"branch-alias": {
"dev-master": "0.7.x-dev"
"dev-master": "0.8.x-dev"
}
}
}

0 comments on commit ec1c720

Please sign in to comment.