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

[DV-8390] Made package PHP ^8.2 and Symfony ^6.4|^7.0 compatible. #4

Merged
merged 6 commits into from
Apr 22, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
33 changes: 33 additions & 0 deletions .github/workflows/quality-assurance.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
on:
pull_request:
types:
- opened
- synchronize
- reopened
branches:
- '*'

jobs:
qa:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.2'

- name: Install dependencies
run: composer install --prefer-dist --no-progress

- name: Run tests
run: composer test

- name: Check PHPCS
run: composer check-code-style

- name: Check PHPStan
run: composer check-phpstan
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/vendor/
*.cache
composer.lock
57 changes: 57 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
<?php

declare(strict_types=1);

use PhpCsFixer\Config;
use PhpCsFixer\Finder;

$finder = Finder::create()
->in(__DIR__)
->exclude([
'vendor',
]);

return (new Config())
kkevindev marked this conversation as resolved.
Show resolved Hide resolved
->setRules([
'@Symfony' => true,
'@PSR12' => true,
'array_syntax' => [
'syntax' => 'short',
],
'phpdoc_to_comment' => false,
'declare_strict_types' => true,
'global_namespace_import' => [
'import_classes' => true,
],
'phpdoc_separation' => false,
'multiline_whitespace_before_semicolons' => true,
'trailing_comma_in_multiline' => [
'elements' => [
'arrays',
'parameters',
'match',
],
],
'no_unused_imports' => true,
'ordered_class_elements' => [
'order' => [
'use_trait',
'constant_public',
'constant_protected',
'constant_private',
'case',
'property',
'construct',
'destruct',
'magic',
'phpunit',
'method_public',
'method_protected',
'method_private',
],
],
'ordered_imports' => true,
'yoda_style' => false,
'nullable_type_declaration_for_default_null_value' => false,
])
->setFinder($finder);
13 changes: 0 additions & 13 deletions .php_cs.dist

This file was deleted.

57 changes: 0 additions & 57 deletions .scrutinizer.yml

This file was deleted.

12 changes: 1 addition & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@

[![Latest version on Packagist][ico-version]][link-version]
[![Software License][ico-license]][link-license]
[![Build Status][ico-build]][link-build]
[![Coverage Status][ico-coverage]][link-coverage]
[![Code Quality][ico-code-quality]][link-code-quality]

Increased verbosity of error messages in the Symfony HTTP client.

Expand Down Expand Up @@ -32,17 +29,10 @@ $response = $verboseErrorHttpClient->request('GET', 'https://superbrave.nl/api')
```

## License
The Verbose error HTTP client is licensed under the MIT License. Please see the [LICENSE file][link-license]
for details.
The Verbose error HTTP client is licensed under the MIT License. Please see the [LICENSE file][link-license] for details.

[ico-version]: https://img.shields.io/packagist/v/superbrave/verbose-error-http-client
[ico-license]: https://img.shields.io/packagist/l/superbrave/verbose-error-http-client
[ico-build]: https://scrutinizer-ci.com/g/superbrave/verbose-error-http-client/badges/build.png?b=master
[ico-coverage]: https://scrutinizer-ci.com/g/superbrave/verbose-error-http-client/badges/coverage.png?b=master
[ico-code-quality]: https://scrutinizer-ci.com/g/superbrave/verbose-error-http-client/badges/quality-score.png?b=master

[link-version]: https://packagist.org/packages/superbrave/verbose-error-http-client
[link-license]: LICENSE
[link-build]: https://scrutinizer-ci.com/g/superbrave/verbose-error-http-client/build-status/master
[link-coverage]: https://scrutinizer-ci.com/g/superbrave/verbose-error-http-client/build-status/master
[link-code-quality]: https://scrutinizer-ci.com/g/superbrave/verbose-error-http-client/build-status/master
17 changes: 12 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,14 @@
}
],
"require": {
"php": "^7.2",
"symfony/http-client-contracts": "^1.1 || ^2.0"
"php": "^8.2",
"symfony/http-client-contracts": "^3.4"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^2.15",
"phpunit/phpunit": "^8.3",
"symfony/http-client": "^4.4 || ^5.1"
"friendsofphp/php-cs-fixer": "^3.54",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.6",
"symfony/http-client": "^6.4|^7.0"
},
"suggest": {
"symfony/http-client": "This package requires an actual Symfony HTTP client implementation to decorate."
Expand All @@ -36,5 +37,11 @@
},
"config": {
"sort-packages": true
},
"scripts": {
"check-phpstan": "vendor/bin/phpstan analyse",
"check-code-style": "vendor/bin/php-cs-fixer fix --allow-risky=yes --dry-run -v",
"fix-code-style": "vendor/bin/php-cs-fixer fix --allow-risky=yes",
"test": "phpunit"
}
}
Loading
Loading