Skip to content

Commit 4d6111f

Browse files
authored
Merge pull request #225 from php-http/fix-cs
adjust to new cs rules
2 parents c851b61 + b5ec857 commit 4d6111f

File tree

7 files changed

+25
-25
lines changed

7 files changed

+25
-25
lines changed

.github/workflows/.editorconfig

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[*.yml]
2+
indent_size = 2

.github/workflows/static.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: static
33
on:
44
push:
55
branches:
6-
- master
6+
- '*.x'
77
pull_request:
88

99
jobs:
@@ -13,7 +13,7 @@ jobs:
1313

1414
steps:
1515
- name: Checkout code
16-
uses: actions/checkout@v2
16+
uses: actions/checkout@v3
1717

1818
- name: PHPStan
1919
uses: OskarStark/[email protected]
@@ -28,7 +28,7 @@ jobs:
2828

2929
steps:
3030
- name: Checkout code
31-
uses: actions/checkout@v2
31+
uses: actions/checkout@v3
3232

3333
- name: PHP-CS-Fixer
3434
uses: docker://oskarstark/php-cs-fixer-ga

.github/workflows/tests.yml

+15-9
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: tests
33
on:
44
push:
55
branches:
6-
- master
6+
- '*.x'
77
pull_request:
88

99
jobs:
@@ -12,11 +12,11 @@ jobs:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
15-
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1']
15+
php: ['7.1', '7.2', '7.3', '7.4', '8.0', '8.1', '8.2']
1616

1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v2
19+
uses: actions/checkout@v3
2020

2121
- name: Setup PHP
2222
uses: shivammathur/setup-php@v2
@@ -42,11 +42,11 @@ jobs:
4242
runs-on: ubuntu-latest
4343
strategy:
4444
matrix:
45-
php: ['7.1', '7.2', '7.3', '7.4']
45+
php: ['7.1', '7.4', '8.2']
4646

4747
steps:
4848
- name: Checkout code
49-
uses: actions/checkout@v2
49+
uses: actions/checkout@v3
5050

5151
- name: Setup PHP
5252
uses: shivammathur/setup-php@v2
@@ -68,16 +68,22 @@ jobs:
6868
runs-on: ubuntu-latest
6969
strategy:
7070
matrix:
71-
symfony: ['4', '5', '6']
71+
include:
72+
- symfony: '4'
73+
php-version: '7.1'
74+
- symfony: '5'
75+
php-version: '7.4'
76+
- symfony: '6'
77+
php-version: '8.2'
7278

7379
steps:
7480
- name: Checkout code
75-
uses: actions/checkout@v2
81+
uses: actions/checkout@v3
7682

7783
- name: Setup PHP
7884
uses: shivammathur/setup-php@v2
7985
with:
80-
php-version: 7.1
86+
php-version: ${{ matrix.php-version }}
8187
tools: composer:v2
8288
coverage: none
8389

@@ -101,7 +107,7 @@ jobs:
101107

102108
steps:
103109
- name: Checkout code
104-
uses: actions/checkout@v2
110+
uses: actions/checkout@v3
105111

106112
- name: Setup PHP
107113
uses: shivammathur/setup-php@v2

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
[![Latest Version](https://img.shields.io/github/release/php-http/client-common.svg?style=flat-square)](https://github.com/php-http/client-common/releases)
44
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
5-
[![Build Status](https://img.shields.io/travis/php-http/client-common/master.svg?style=flat-square)](https://travis-ci.org/php-http/client-common)
5+
[![Build Status](https://github.com/php-http/client-common/actions/workflows/tests.yml/badge.svg)](https://github.com/php-http/client-common/actions/workflows/tests.yml)
66
[![Code Coverage](https://img.shields.io/scrutinizer/coverage/g/php-http/client-common.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/client-common)
77
[![Quality Score](https://img.shields.io/scrutinizer/g/php-http/client-common.svg?style=flat-square)](https://scrutinizer-ci.com/g/php-http/client-common)
88
[![Total Downloads](https://img.shields.io/packagist/dt/php-http/client-common.svg?style=flat-square)](https://packagist.org/packages/php-http/client-common)

composer.json

+1-6
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
"nyholm/psr7": "^1.2",
2828
"phpspec/phpspec": "^5.1 || ^6.3 || ^7.1",
2929
"phpspec/prophecy": "^1.10.2",
30-
"phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3"
30+
"phpunit/phpunit": "^7.5.20 || ^8.5.33 || ^9.6.7"
3131
},
3232
"suggest": {
3333
"ext-json": "To detect JSON responses with the ContentTypePlugin",
@@ -58,10 +58,5 @@
5858
},
5959
"config": {
6060
"sort-packages": true
61-
},
62-
"extra": {
63-
"branch-alias": {
64-
"dev-master": "2.3.x-dev"
65-
}
6661
}
6762
}

src/PluginChain.php

+1-3
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44

55
namespace Http\Client\Common;
66

7-
use function array_reverse;
8-
97
use Http\Client\Common\Exception\LoopException;
108
use Http\Promise\Promise;
119
use Psr\Http\Message\RequestInterface;
@@ -39,7 +37,7 @@ public function __construct(array $plugins, callable $clientCallable, array $opt
3937
private function createChain(): callable
4038
{
4139
$lastCallable = $this->clientCallable;
42-
$reversedPlugins = array_reverse($this->plugins);
40+
$reversedPlugins = \array_reverse($this->plugins);
4341

4442
foreach ($reversedPlugins as $plugin) {
4543
$lastCallable = function (RequestInterface $request) use ($plugin, $lastCallable) {

tests/PluginClientBuilderTest.php

+2-3
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44

55
namespace tests\Http\Client\Common;
66

7-
use Closure;
87
use Http\Client\Common\Plugin;
98
use Http\Client\Common\PluginClient;
109
use Http\Client\Common\PluginClientBuilder;
@@ -32,7 +31,7 @@ public function testPriority(string $client): void
3231
$client = $this->prophesize($client)->reveal();
3332
$client = $builder->createClient($client);
3433

35-
$closure = Closure::bind(
34+
$closure = \Closure::bind(
3635
function (): array {
3736
return $this->plugins;
3837
},
@@ -58,7 +57,7 @@ public function testOptions(string $client): void
5857
$client = $this->prophesize($client)->reveal();
5958
$client = $builder->createClient($client);
6059

61-
$closure = Closure::bind(
60+
$closure = \Closure::bind(
6261
function (): array {
6362
return $this->options;
6463
},

0 commit comments

Comments
 (0)