Skip to content

Commit 52beda8

Browse files
committed
:octocat: PHP 8.4+
1 parent 1520763 commit 52beda8

20 files changed

Lines changed: 123 additions & 111 deletions

.github/workflows/ci.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,6 @@ jobs:
2626
fail-fast: true
2727
matrix:
2828
php-version:
29-
- "8.1"
30-
- "8.2"
31-
- "8.3"
3229
- "8.4"
3330
- "8.5"
3431

@@ -72,7 +69,7 @@ jobs:
7269
- name: "Install PHP"
7370
uses: shivammathur/setup-php@v2
7471
with:
75-
php-version: "8.1"
72+
php-version: "8.4"
7673
extensions: ${{ env.PHP_EXTENSIONS }}
7774
ini-values: ${{ env.PHP_INI_VALUES }}
7875
coverage: none
@@ -101,9 +98,6 @@ jobs:
10198
- ubuntu-latest
10299
- windows-latest
103100
php-version:
104-
- "8.1"
105-
- "8.2"
106-
- "8.3"
107101
- "8.4"
108102
- "8.5"
109103

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"psr/http-client-implementation": "1.0"
2424
},
2525
"require": {
26-
"php": "^8.1",
26+
"php": "^8.4",
2727
"ext-fileinfo": "*",
2828
"ext-intl": "*",
2929
"ext-json": "*",
@@ -36,13 +36,13 @@
3636
},
3737
"require-dev": {
3838
"ext-curl": "*",
39-
"chillerlan/phpunit-http": "^1.0",
39+
"chillerlan/phpunit-http": "^2.0",
4040
"guzzlehttp/guzzle": "^7.10",
4141
"phan/phan": "^6.0.5",
4242
"phpmd/phpmd": "^2.15",
4343
"phpstan/phpstan": "^2.1.42",
4444
"phpstan/phpstan-deprecation-rules": "^2.0.4",
45-
"phpunit/phpunit": "^10.5",
45+
"phpunit/phpunit": "^13.0",
4646
"slevomat/coding-standard": "^8.28.1",
4747
"squizlabs/php_codesniffer": "^4.0"
4848
},

phpcs.xml.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@
201201
<rule ref="Squiz.PHP.InnerFunctions"/>
202202
<rule ref="Squiz.PHP.LowercasePHPFunctions"/>
203203
<rule ref="Squiz.PHP.NonExecutableCode"/>
204-
<rule ref="Squiz.Scope.MemberVarScope"/>
204+
<!--<rule ref="Squiz.Scope.MemberVarScope"/>-->
205205
<rule ref="Squiz.Scope.MethodScope"/>
206206
<rule ref="Squiz.Scope.StaticThisUsage"/>
207207
<rule ref="Squiz.Strings.DoubleQuoteUsage"/>
@@ -220,7 +220,7 @@
220220

221221

222222
<!--
223-
Configurable built-in https://github.com/squizlabs/PHP_CodeSniffer/wiki/Customisable-Sniff-Properties
223+
Configurable built-in https://github.com/PHPCSStandards/PHP_CodeSniffer/wiki/Customisable-Sniff-Properties
224224
-->
225225

226226
<rule ref="Generic.ControlStructures.InlineControlStructure">

phpstan-baseline.neon

Lines changed: 69 additions & 33 deletions
Large diffs are not rendered by default.

src/Client/URLExtractor.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
class URLExtractor implements ClientInterface{
2727

2828
/** @var \Psr\Http\Message\ResponseInterface[] */
29-
protected array $responses = [];
29+
protected(set) array $responses = [];
3030
protected ClientInterface $http;
3131
protected RequestFactoryInterface $requestFactory;
3232

@@ -83,6 +83,7 @@ public function extract(UriInterface|string $shortURL):string|null{
8383
/**
8484
* @return \Psr\Http\Message\ResponseInterface[]
8585
*/
86+
#[\Deprecated(message: 'Use the property URLExtractor::$responses instead.', since: '3.0.0')]
8687
public function getResponses():array{
8788
return $this->responses;
8889
}

src/Cookie.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@
1919
*/
2020
class Cookie{
2121

22-
public const RESERVED_CHARACTERS = ["\t", "\n", "\v", "\f", "\r", "\x0E", ' ', ',', ';', '='];
22+
/** @var string[] */
23+
public const array RESERVED_CHARACTERS = ["\t", "\n", "\v", "\f", "\r", "\x0E", ' ', ',', ';', '='];
2324

2425
protected string $name;
2526
protected string $value;

src/Emitter/ResponseEmitterAbstract.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ protected function parseContentRange():array|null{
186186
/**
187187
* emits the given buffer
188188
*
189-
* @codeCoverageIgnore (overridden in test)
189+
* @codeCoverageIgnore
190190
*/
191191
protected function emitBuffer(string $buffer):void{
192192
echo $buffer;

src/Emitter/SapiEmitter.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ protected function emitHeaders():void{
7777
/**
7878
* Allow to intercept header calls in tests
7979
*
80-
* @codeCoverageIgnore (overridden in test)
80+
* @codeCoverageIgnore
8181
*/
8282
protected function sendHeader(string $header, bool $replace, int $response_code = 0):void{
8383
header($header, $replace, $response_code);

src/HeaderUtil.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ protected static function normalizeKV(mixed $value):array{
116116
*
117117
* Spaces and tabs ought to be excluded by parsers when extracting the field value from a header field.
118118
*
119-
* header-field = field-name ":" OWS field-value OWS
119+
* header-field = field-name ":" OWS field-value
120120
* OWS = *( SP / HTAB )
121121
*
122122
* @see https://tools.ietf.org/html/rfc7230#section-3.2.4

src/MessageUtil.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ public static function setCookie(
241241
string|null $sameSite = null,
242242
):ResponseInterface{
243243

244-
$cookie = (new Cookie($name, $value))
244+
$cookie = new Cookie($name, $value)
245245
->withExpiry($expiry)
246246
->withDomain($domain)
247247
->withPath($path)

0 commit comments

Comments
 (0)