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

Test on PHP 8 #39

Merged
merged 8 commits into from
Dec 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
6 changes: 3 additions & 3 deletions .github/workflows/coding-standards.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
strategy:
matrix:
php:
- "7.3"
- "7.4"

steps:
- name: "Checkout"
Expand All @@ -27,7 +27,7 @@ jobs:
with:
coverage: "none"
php-version: "${{ matrix.php }}"
tools: cs2pr, composer:v1
tools: composer:v2
ini-values: "date.timezone=Europe/Paris"
env:
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -36,4 +36,4 @@ jobs:
uses: "ramsey/composer-install@v1"

- name: "Run PHP CS Fixer"
run: "vendor/bin/php-cs-fixer fix --verbose --dry-run --format=checkstyle | cs2pr"
run: "vendor/bin/php-cs-fixer fix --verbose --dry-run"
6 changes: 4 additions & 2 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
- "7.2"
- "7.3"
- "7.4"
- "8.0"
- "8.1"

steps:
- name: "Checkout"
Expand All @@ -37,7 +39,7 @@ jobs:
with:
php-version: "${{ matrix.php }}"
coverage: "none"
tools: composer:v1
tools: composer:v2
extensions: curl
ini-values: "date.timezone=Europe/Paris"
env:
Expand Down Expand Up @@ -69,7 +71,7 @@ jobs:
with:
php-version: "${{ matrix.php }}"
coverage: "pcov"
tools: composer:v1
tools: composer:v2
extensions: curl
ini-values: "date.timezone=Europe/Paris"
env:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ vendor
coverage
build
.php_cs.cache
.php-cs-fixer.cache
.phpunit.result.cache
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.

7 changes: 5 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
"guzzlehttp/guzzle": "^6.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"
j0k3r marked this conversation as resolved.
Show resolved Hide resolved
},
"config": {
"sort-packages": true
}
}
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';
j0k3r marked this conversation as resolved.
Show resolved Hide resolved

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