Skip to content

Commit cb93ccf

Browse files
committed
Raise minimum PHP version to 7.4
https://www.php.net/releases/7_3_0.php https://www.php.net/releases/7_4_0.php This installed a newer version of CS Fixer - friendsofphp/php-cs-fixer updated from v3.4.0 to v3.72.0 minor See changes: PHP-CS-Fixer/PHP-CS-Fixer@FriendsOfPHP:v3.4.0...PHP-CS-Fixer:v3.72.0 Release notes: https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/releases/tag/v3.72.0 As a result, I had to fix some rules: - Rename `braces` rule. - Disable `phpdoc_to_return_type` since it now tries to move PHPDoc `@return` with a generic argument (e.g. `?T`) to a type hint. - Apply `single_line_comment_spacing` fix.
1 parent 3ddb4af commit cb93ccf

File tree

5 files changed

+11
-7
lines changed

5 files changed

+11
-7
lines changed

.github/workflows/main.yaml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,6 @@ jobs:
2020
- '8.1'
2121
- '8.0'
2222
- '7.4'
23-
- '7.3'
24-
- '7.2'
2523
include:
2624
- php: '7.4'
2725
cs_fixer: true

.php-cs-fixer.php

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,14 @@
99
'@PHP71Migration' => true,
1010
'@PHP71Migration:risky' => true,
1111
// 'phpdoc_to_param_type' => true,
12-
'phpdoc_to_return_type' => true,
12+
// 'phpdoc_to_return_type' => true,
1313
'phpdoc_types_order' => false,
1414

1515
// overwrite some Symfony rules
16-
'braces' => ['position_after_functions_and_oop_constructs' => 'same'],
16+
'braces_position' => [
17+
'functions_opening_brace' => 'same_line',
18+
'classes_opening_brace' => 'same_line',
19+
],
1720
'function_declaration' => ['closure_function_spacing' => 'none'],
1821
'concat_space' => ['spacing' => 'one'],
1922
'phpdoc_align' => false,

NEWS.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# guzzle-transcoder changes
22

3+
## 0.3.1 – unreleased
4+
- Raise minimum PHP version to 7.4.0.
5+
36
## 0.3.0 – 2023-03-06
47
- Raise minimum PHP version to 7.2.5.
58
- Add support for fossar/transcoder 2.0.

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Guzzle plugin that converts responses to UTF-8",
44
"type": "library",
55
"require": {
6-
"php": ">=7.2.5",
6+
"php": ">=7.4.0",
77
"guzzlehttp/guzzle": "^6.3 || ^7.0",
88
"fossar/transcoder": "^1.0 || ^2.0",
99
"guzzlehttp/psr7": "^1.7 || ^2.0"
@@ -29,7 +29,7 @@
2929
],
3030
"config": {
3131
"platform": {
32-
"php": "7.2.5"
32+
"php": "7.4.0"
3333
}
3434
},
3535
"scripts": {

src/Utils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public static function joinHttpHeaderWords(array $headerValues): string {
174174
}
175175
/** @var array<array<string, ?string>> $headerValues */
176176
$spaces = '\\s';
177-
$ctls = '\\x00-\\x1F\\x7F'; //@see http://stackoverflow.com/a/1497928/413531
177+
$ctls = '\\x00-\\x1F\\x7F'; // @see http://stackoverflow.com/a/1497928/413531
178178
$tspecials = '()<>@,;:<>/[\\]?.="\\\\';
179179
$tokenPattern = "#^[^{$spaces}{$ctls}{$tspecials}]+$#";
180180
$result = [];

0 commit comments

Comments
 (0)