Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Guzzle 7 and prepare 4.0 #40

Merged
merged 3 commits into from
Dec 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,6 @@ jobs:
strategy:
matrix:
php:
- "5.6"
- "7.0"
- "7.1"
- "7.2"
- "7.3"
- "7.4"
Expand Down
30 changes: 30 additions & 0 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

$finder = (new PhpCsFixer\Finder())
->in(__DIR__)
->exclude(['vendor'])
;

return (new PhpCsFixer\Config())
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'combine_consecutive_unsets' => true,
'heredoc_to_nowdoc' => true,
'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']],
'no_unreachable_default_argument_value' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_class_elements' => true,
'ordered_imports' => true,
'php_unit_strict' => true,
'phpdoc_order' => true,
// 'psr4' => true,
'strict_comparison' => true,
'strict_param' => true,
'concat_space' => ['spacing' => 'one'],
])
->setFinder($finder)
;
45 changes: 0 additions & 45 deletions .php_cs

This file was deleted.

11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,8 @@ Uses [Imgur API v3](https://api.imgur.com/).

* Branch [1.x](https://github.com/j0k3r/php-imgur-api-client/tree/1.x) use Guzzle 3 (but is not maintained)
* Branch [2.x](https://github.com/j0k3r/php-imgur-api-client/tree/2.x) use Guzzle 5 (but is not maintained)
* Branch [master](https://github.com/j0k3r/php-imgur-api-client/tree/master) use Guzzle 6

All actives branches required PHP >= 5.6
* Branch [3.x](https://github.com/j0k3r/php-imgur-api-client/tree/3.x) use Guzzle 6 and PHP >= 5.6
* Branch [master](https://github.com/j0k3r/php-imgur-api-client/tree/master) use Guzzle 7 and PHP >= 7.2.5

## Composer

Expand All @@ -28,10 +27,8 @@ $ curl -s http://getcomposer.org/installer | php

Add the library details to your composer.json

```json
"require": {
"j0k3r/php-imgur-api-client": "^3.0.0"
}
```bash
composer require j0k3r/php-imgur-api-client@^4.0
```

Install the dependency with
Expand Down
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@
}
},
"require": {
"php": ">=5.6.0",
"php": ">=7.2.5",
"ext-curl": "*",
"guzzlehttp/guzzle": "^6.0"
"guzzlehttp/guzzle": "^7.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.0",
"symfony/phpunit-bridge": "^5.0"
"friendsofphp/php-cs-fixer": "^3.0",
"symfony/phpunit-bridge": "^6.0"
},
"config": {
"sort-packages": true
Expand Down
4 changes: 2 additions & 2 deletions lib/Imgur/Auth/OAuth2.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
*/
class OAuth2 implements AuthInterface
{
const AUTHORIZATION_ENDPOINT = 'https://api.imgur.com/oauth2/authorize';
const ACCESS_TOKEN_ENDPOINT = 'https://api.imgur.com/oauth2/token';
public const AUTHORIZATION_ENDPOINT = 'https://api.imgur.com/oauth2/authorize';
public const ACCESS_TOKEN_ENDPOINT = 'https://api.imgur.com/oauth2/token';

/**
* Indicates the client that is making the request.
Expand Down