Skip to content

Commit

Permalink
[feature] Update composer improve-composer-dependencies
Browse files Browse the repository at this point in the history
psr/http-client-implementation
psr/http-factory-implementation
psr/http-message-implementation
  • Loading branch information
Jasper-MultiSafepay authored Sep 11, 2020
1 parent f6b694d commit ae4910f
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 8 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Removed dependency on `league/iso3166`
- Removed dependency on `ext-bcmath`

### Changed
- Added dependency on `psr/http-client-implementation`
- Added dependency on `psr/http-message-implementation`
- Added dependency on `psr/http-factory-implementation`

## [3.0.2] - 2020-09-03
### Fixed
- Fix bug where issuers wouldn't be able to load because of wrong issuer code type (int instead of string)
Expand Down
17 changes: 15 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,26 @@ To install the SDK, use the following composer command:
composer require multisafepay/php-sdk
```

WARNING: This PHP SDK does not have a direct dependency on Guzzle or cURL. Instead, it uses the [PSR-18](https://www.php-fig.org/psr/psr-18/) client abstraction. This will give you the flexibility to choose whatever [PSR-7 implementation and HTTP client](https://packagist.org/providers/php-http/client-implementation) you want to use. All clients can be replaced without any side effects.
WARNING: This PHP SDK does not have a direct dependency on Guzzle or cURL.
Instead, it uses the [PSR-18](https://www.php-fig.org/psr/psr-18/) client abstraction and [PSR-17](https://www.php-fig.org/psr/psr-18/) factory abstraction.
This will give you the flexibility to choose whatever [PSR-7 implementation and HTTP client](https://packagist.org/providers/psr/http-client-implementation) you want to use.
All clients can be replaced without any side effects.

If you don't have a client yet, use the following:
If you don't have any client implementation installed, use the following:
```bash
composer require php-http/guzzle6-adapter guzzlehttp/psr7
```

If you don't have any factory implementation installed, use the following:
```bash
composer require http-interop/http-factory-guzzle
```

In short, you need to have installed:
- [PSR-18 client implementation](https://packagist.org/providers/psr/http-client-implementation)
- [PSR-17 factory implementation](https://packagist.org/providers/psr/http-factory-implementation)
- [PSR-7 message implementation](https://packagist.org/providers/psr/http-message-implementation)

## Getting started
Use Composer autoloader to automatically load class dependencies:

Expand Down
10 changes: 4 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@
"require": {
"php": "^7.1",
"ext-json": "*",
"psr/http-message": "^1.0",
"php-http/client-implementation": "^1.0",
"php-http/httplug": "^2.0",
"php-http/discovery": "^1.0",
"php-http/message": "^1.7",
"psr/http-factory": "^1.0"
"psr/http-client-implementation": "^1.0",
"psr/http-message-implementation": "^1.0",
"psr/http-factory-implementation": "^1.0",
"php-http/discovery": "^1.0"
},
"require-dev": {
"phpunit/phpunit": "^7.5 || ^6.5",
Expand Down

0 comments on commit ae4910f

Please sign in to comment.