Skip to content

Commit

Permalink
remove guzzlehttp/guzzle requirement, add guzzlehttp/psr7 requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
Sysix committed Nov 30, 2023
1 parent 258f73b commit 0700ee2
Show file tree
Hide file tree
Showing 7 changed files with 261 additions and 261 deletions.
1 change: 0 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: curl
coverage: none

- name: Install dependencies
Expand Down
13 changes: 10 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@
## Requirements

PHP: >= 8.1
Extensions: [Composer](https://getcomposer.org/), [PHP-JSON](https://www.php.net/manual/en/book.json.php)
Extensions:
- [Composer](https://getcomposer.org/)
- [PHP-JSON](https://www.php.net/manual/en/book.json.php)
- [PSR-18 HTTP-Client](https://packagist.org/providers/psr/http-client-implementation)

## Install

Expand All @@ -16,12 +19,16 @@ composer:

## Usage

Search for the official API Documentation [here](https://developers.lexoffice.io/docs/).
Search for the [official API Documentation](https://developers.lexoffice.io/docs/).
You need an [API Key](https://app.lexoffice.de/addons/public-api) for that.

### Basic
```php
$apiKey = getenv('LEX_OFFICE_API_KEY'); // store keys in .env file
// store keys in .env file
$apiKey = getenv('LEX_OFFICE_API_KEY');

// in this example we are using guzzlehttp/guzzle package, it can be any PSR-18 HTTP Client
// see: https://packagist.org/providers/psr/http-client-implementation
$httpClient = \GuzzleHttp\Client();
$api = new \Sysix\LexOffice\Api($apiKey, $httpClient);
```
Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,13 @@
"require": {
"php": "^8.1",
"ext-json": "*",
"ext-curl": "*",
"guzzlehttp/guzzle": "^6.2 | ^7.0"
"psr/http-client": "^1.0",
"guzzlehttp/psr7": "^2.0"
},
"require-dev": {
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^10.4"
"phpunit/phpunit": "^10.4",
"guzzlehttp/guzzle": "^7.8"
},
"suggest": {
"kevinrob/guzzle-cache-middleware": "*",
Expand Down
Loading

0 comments on commit 0700ee2

Please sign in to comment.