Skip to content

Commit 1ed3cc7

Browse files
authored
Merge pull request #40 from j0k3r/guzzle-7-php-7
Guzzle 7 and prepare 4.0
2 parents 52ebcfc + 6377172 commit 1ed3cc7

File tree

6 files changed

+40
-61
lines changed

6 files changed

+40
-61
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,6 @@ jobs:
1919
strategy:
2020
matrix:
2121
php:
22-
- "5.6"
23-
- "7.0"
24-
- "7.1"
2522
- "7.2"
2623
- "7.3"
2724
- "7.4"

.php-cs-fixer.php

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
3+
$finder = (new PhpCsFixer\Finder())
4+
->in(__DIR__)
5+
->exclude(['vendor'])
6+
;
7+
8+
return (new PhpCsFixer\Config())
9+
->setRiskyAllowed(true)
10+
->setRules([
11+
'@Symfony' => true,
12+
'@Symfony:risky' => true,
13+
'array_syntax' => ['syntax' => 'short'],
14+
'combine_consecutive_unsets' => true,
15+
'heredoc_to_nowdoc' => true,
16+
'no_extra_blank_lines' => ['tokens' => ['break', 'continue', 'extra', 'return', 'throw', 'use', 'parenthesis_brace_block', 'square_brace_block', 'curly_brace_block']],
17+
'no_unreachable_default_argument_value' => true,
18+
'no_useless_else' => true,
19+
'no_useless_return' => true,
20+
'ordered_class_elements' => true,
21+
'ordered_imports' => true,
22+
'php_unit_strict' => true,
23+
'phpdoc_order' => true,
24+
// 'psr4' => true,
25+
'strict_comparison' => true,
26+
'strict_param' => true,
27+
'concat_space' => ['spacing' => 'one'],
28+
])
29+
->setFinder($finder)
30+
;

.php_cs

Lines changed: 0 additions & 45 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@ Uses [Imgur API v3](https://api.imgur.com/).
1414

1515
* Branch [1.x](https://github.com/j0k3r/php-imgur-api-client/tree/1.x) use Guzzle 3 (but is not maintained)
1616
* Branch [2.x](https://github.com/j0k3r/php-imgur-api-client/tree/2.x) use Guzzle 5 (but is not maintained)
17-
* Branch [master](https://github.com/j0k3r/php-imgur-api-client/tree/master) use Guzzle 6
18-
19-
All actives branches required PHP >= 5.6
17+
* Branch [3.x](https://github.com/j0k3r/php-imgur-api-client/tree/3.x) use Guzzle 6 and PHP >= 5.6
18+
* Branch [master](https://github.com/j0k3r/php-imgur-api-client/tree/master) use Guzzle 7 and PHP >= 7.2.5
2019

2120
## Composer
2221

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

2928
Add the library details to your composer.json
3029

31-
```json
32-
"require": {
33-
"j0k3r/php-imgur-api-client": "^3.0.0"
34-
}
30+
```bash
31+
composer require j0k3r/php-imgur-api-client@^4.0
3532
```
3633

3734
Install the dependency with

composer.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,13 @@
3434
}
3535
},
3636
"require": {
37-
"php": ">=5.6.0",
37+
"php": ">=7.2.5",
3838
"ext-curl": "*",
39-
"guzzlehttp/guzzle": "^6.0"
39+
"guzzlehttp/guzzle": "^7.0"
4040
},
4141
"require-dev": {
42-
"friendsofphp/php-cs-fixer": "^2.0",
43-
"symfony/phpunit-bridge": "^5.0"
42+
"friendsofphp/php-cs-fixer": "^3.0",
43+
"symfony/phpunit-bridge": "^6.0"
4444
},
4545
"config": {
4646
"sort-packages": true

lib/Imgur/Auth/OAuth2.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@
1212
*/
1313
class OAuth2 implements AuthInterface
1414
{
15-
const AUTHORIZATION_ENDPOINT = 'https://api.imgur.com/oauth2/authorize';
16-
const ACCESS_TOKEN_ENDPOINT = 'https://api.imgur.com/oauth2/token';
15+
public const AUTHORIZATION_ENDPOINT = 'https://api.imgur.com/oauth2/authorize';
16+
public const ACCESS_TOKEN_ENDPOINT = 'https://api.imgur.com/oauth2/token';
1717

1818
/**
1919
* Indicates the client that is making the request.

0 commit comments

Comments
 (0)