Skip to content

Commit 4556655

Browse files
committed
:octocat: dependency & CI updates
1 parent 35c7dc3 commit 4556655

File tree

6 files changed

+55
-54
lines changed

6 files changed

+55
-54
lines changed

.github/workflows/ci.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,17 @@ jobs:
4343
- "8.2"
4444
- "8.3"
4545
- "8.4"
46+
- "8.5"
4647

4748
steps:
4849
- name: "Checkout"
49-
uses: actions/checkout@v4
50+
uses: actions/checkout@v5
5051

5152
- name: "Install PHP"
5253
uses: shivammathur/setup-php@v2
5354
with:
5455
php-version: ${{ matrix.php-version }}
55-
extensions: ast, ${{ env.PHP_EXTENSIONS }}
56+
extensions: ast-1.1.3, var_representation, ${{ env.PHP_EXTENSIONS }}
5657
ini-values: ${{ env.PHP_INI_VALUES }}
5758
coverage: none
5859

@@ -85,10 +86,11 @@ jobs:
8586
- "8.2"
8687
- "8.3"
8788
- "8.4"
89+
- "8.5"
8890

8991
steps:
9092
- name: "Checkout"
91-
uses: actions/checkout@v4
93+
uses: actions/checkout@v5
9294

9395
- name: "Install PHP with extensions"
9496
uses: shivammathur/setup-php@v2
@@ -108,7 +110,7 @@ jobs:
108110
run: php vendor/phpunit/phpunit/phpunit --configuration=phpunit.xml.dist
109111

110112
- name: "Send code coverage report to Codecov.io"
111-
uses: codecov/codecov-action@v4
113+
uses: codecov/codecov-action@v5
112114
with:
113115
token: ${{ secrets.CODECOV_TOKEN }}
114116
files: .build/coverage/clover.xml
@@ -127,12 +129,12 @@ jobs:
127129

128130
steps:
129131
- name: "Checkout sources"
130-
uses: actions/checkout@v4
132+
uses: actions/checkout@v5
131133

132134
- name: "Install PHP"
133135
uses: shivammathur/setup-php@v2
134136
with:
135-
php-version: "8.3"
137+
php-version: "8.4"
136138
extensions: ${{ env.PHP_EXTENSIONS }}
137139
ini-values: ${{ env.PHP_INI_VALUES }}
138140
coverage: none
@@ -156,12 +158,12 @@ jobs:
156158

157159
steps:
158160
- name: "Checkout sources"
159-
uses: actions/checkout@v4
161+
uses: actions/checkout@v5
160162

161163
- name: "Install PHP"
162164
uses: shivammathur/setup-php@v2
163165
with:
164-
php-version: "8.3"
166+
php-version: "8.4"
165167
extensions: ${{ env.PHP_EXTENSIONS }}
166168
ini-values: ${{ env.PHP_INI_VALUES }}
167169
coverage: none

.idea/codeStyles/Project.xml

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer.json

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@
4949
"require-dev": {
5050
"chillerlan/php-dotenv": "^3.0",
5151
"chillerlan/phpunit-http": "^1.0",
52-
"guzzlehttp/guzzle": "^7.9",
52+
"guzzlehttp/guzzle": "^7.10",
5353
"monolog/monolog": "^3.7",
54-
"phan/phan": "^5.5.0",
54+
"phan/phan": "^5.5.2",
5555
"phpmd/phpmd": "^2.15",
56-
"phpstan/phpstan": "^2.1.18",
56+
"phpstan/phpstan": "^2.1.32",
5757
"phpstan/phpstan-deprecation-rules": "^2.0.3",
5858
"phpunit/phpunit": "^10.5",
59-
"slevomat/coding-standard": "^8.19",
60-
"squizlabs/php_codesniffer": "^3.10"
59+
"slevomat/coding-standard": "^8.22",
60+
"squizlabs/php_codesniffer": "^4.0"
6161
},
6262
"suggest": {
6363
"chillerlan/php-httpinterface": "^6.0 - an alternative PSR-18 HTTP Client"

examples/Providers/LastFM/topalbum-patchwork.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,13 +118,11 @@
118118
imagesy($img),
119119
);
120120

121-
imagedestroy($img);
122121
}
123122
}
124123

125124
// save the image into a file
126125
imagejpeg($patchwork, $imagefile, 85);
127-
imagedestroy($patchwork);
128126

129127
if(file_exists($imagefile)){
130128
header('HTTP/1.1 200 OK');

phpstan-baseline.neon

Lines changed: 38 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,183 +1,183 @@
11
parameters:
22
ignoreErrors:
33
-
4-
message: '#^Parameter \#2 \$array of function implode expects array\|null, array\<string\>\|string given\.$#'
4+
rawMessage: 'Parameter #2 $array of function implode expects array, array<string>|string given.'
55
identifier: argument.type
66
count: 2
77
path: src/Core/OAuth1Provider.php
88

99
-
10-
message: '#^Parameter \#1 \$separator of function explode expects non\-empty\-string, string given\.$#'
10+
rawMessage: 'Parameter #1 $separator of function explode expects non-empty-string, string given.'
1111
identifier: argument.type
1212
count: 1
1313
path: src/Core/OAuth2Provider.php
1414

1515
-
16-
message: '#^Method chillerlan\\OAuth\\Core\\OAuthProvider\:\:cleanBodyParams\(\) should return array\<string, string\> but returns array\<int\|string, bool\|float\|int\|string\|null\>\.$#'
16+
rawMessage: 'Method chillerlan\OAuth\Core\OAuthProvider::cleanBodyParams() should return array<string, string> but returns array<int|string, bool|float|int|string|null>.'
1717
identifier: return.type
1818
count: 1
1919
path: src/Core/OAuthProvider.php
2020

2121
-
22-
message: '#^Method chillerlan\\OAuth\\Core\\OAuthProvider\:\:cleanQueryParams\(\) should return array\<string, string\> but returns array\<int\|string, bool\|float\|int\|string\|null\>\.$#'
22+
rawMessage: 'Method chillerlan\OAuth\Core\OAuthProvider::cleanQueryParams() should return array<string, string> but returns array<int|string, bool|float|int|string|null>.'
2323
identifier: return.type
2424
count: 1
2525
path: src/Core/OAuthProvider.php
2626

2727
-
28-
message: '#^Parameter \#1 \$length of function random_bytes expects int\<1, max\>, int given\.$#'
28+
rawMessage: 'Parameter #1 $length of function random_bytes expects int<1, max>, int given.'
2929
identifier: argument.type
3030
count: 1
3131
path: src/Core/OAuthProvider.php
3232

3333
-
34-
message: '#^Parameter \#1 \$objectOrClass of class ReflectionClass constructor expects class\-string\<T of object\>\|T of object, string given\.$#'
34+
rawMessage: 'Parameter #1 $objectOrClass of class ReflectionClass constructor expects class-string<T of object>|T of object, string given.'
3535
identifier: argument.type
3636
count: 1
3737
path: src/Core/Utilities.php
3838

3939
-
40-
message: '#^Method chillerlan\\OAuth\\OAuthProviderFactory\:\:getProvider\(\) should return chillerlan\\OAuth\\Core\\OAuthInterface but returns object\.$#'
40+
rawMessage: 'Method chillerlan\OAuth\OAuthProviderFactory::getProvider() should return chillerlan\OAuth\Core\OAuthInterface but returns object.'
4141
identifier: return.type
4242
count: 1
4343
path: src/OAuthProviderFactory.php
4444

4545
-
46-
message: '#^Access to an undefined property object\:\:\$name\.$#'
46+
rawMessage: Access to an undefined property object::$name.
4747
identifier: property.notFound
4848
count: 1
4949
path: src/Providers/GuildWars2.php
5050

5151
-
52-
message: '#^Access to an undefined property object\:\:\$permissions\.$#'
52+
rawMessage: Access to an undefined property object::$permissions.
5353
identifier: property.notFound
5454
count: 1
5555
path: src/Providers/GuildWars2.php
5656

5757
-
58-
message: '#^Method chillerlan\\OAuth\\Providers\\LastFM\:\:parseTrack\(\) return type has no value type specified in iterable type array\.$#'
58+
rawMessage: 'Method chillerlan\OAuth\Providers\LastFM::parseTrack() return type has no value type specified in iterable type array.'
5959
identifier: missingType.iterableValue
6060
count: 1
6161
path: src/Providers/LastFM.php
6262

6363
-
64-
message: '#^Method chillerlan\\OAuth\\Providers\\LastFM\:\:scrobble\(\) has parameter \$tracks with no value type specified in iterable type array\.$#'
64+
rawMessage: 'Method chillerlan\OAuth\Providers\LastFM::scrobble() has parameter $tracks with no value type specified in iterable type array.'
6565
identifier: missingType.iterableValue
6666
count: 1
6767
path: src/Providers/LastFM.php
6868

6969
-
70-
message: '#^Method chillerlan\\OAuth\\Providers\\LastFM\:\:scrobble\(\) return type has no value type specified in iterable type array\.$#'
70+
rawMessage: 'Method chillerlan\OAuth\Providers\LastFM::scrobble() return type has no value type specified in iterable type array.'
7171
identifier: missingType.iterableValue
7272
count: 1
7373
path: src/Providers/LastFM.php
7474

7575
-
76-
message: '#^Method chillerlan\\OAuth\\Providers\\LastFM\:\:sendScrobbles\(\) return type has no value type specified in iterable type array\.$#'
76+
rawMessage: 'Method chillerlan\OAuth\Providers\LastFM::sendScrobbles() return type has no value type specified in iterable type array.'
7777
identifier: missingType.iterableValue
7878
count: 1
7979
path: src/Providers/LastFM.php
8080

8181
-
82-
message: '#^Parameter \#1 \$body of method chillerlan\\OAuth\\Providers\\LastFM\:\:sendScrobbles\(\) expects array\<string, string\>, array\<string, bool\|float\|int\|string\> given\.$#'
82+
rawMessage: 'Parameter #1 $body of method chillerlan\OAuth\Providers\LastFM::sendScrobbles() expects array<string, string>, array<string, bool|float|int|string> given.'
8383
identifier: argument.type
8484
count: 1
8585
path: src/Providers/LastFM.php
8686

8787
-
88-
message: '#^Property chillerlan\\OAuth\\Core\\AccessToken\:\:\$expires \(int\) does not accept DateInterval\|DateTime\|int\|null\.$#'
88+
rawMessage: 'Property chillerlan\OAuth\Core\AccessToken::$expires (int) does not accept DateInterval|DateTime|int|null.'
8989
identifier: assign.propertyType
9090
count: 1
9191
path: tests/Core/AccessTokenTest.php
9292

9393
-
94-
message: '#^Call to method chillerlan\\OAuth\\Core\\AuthenticatedUser\:\:fromIterable\(\) on a separate line has no effect\.$#'
94+
rawMessage: 'Call to method chillerlan\OAuth\Core\AuthenticatedUser::fromIterable() on a separate line has no effect.'
9595
identifier: method.resultUnused
9696
count: 1
9797
path: tests/Core/AuthenticatedUserTest.php
9898

9999
-
100-
message: '#^Parameter \#1 \$objectOrClass of class ReflectionClass constructor expects class\-string\<T of object\>\|T of object, string given\.$#'
100+
rawMessage: 'Parameter #1 $objectOrClass of class ReflectionClass constructor expects class-string<T of object>|T of object, string given.'
101101
identifier: argument.type
102102
count: 2
103103
path: tests/Core/UtilitiesTest.php
104104

105105
-
106-
message: '#^Parameter \#2 \$string of static method PHPUnit\\Framework\\Assert\:\:assertMatchesRegularExpression\(\) expects string, int\|string given\.$#'
106+
rawMessage: 'Parameter #2 $string of static method PHPUnit\Framework\Assert::assertMatchesRegularExpression() expects string, int|string given.'
107107
identifier: argument.type
108108
count: 1
109109
path: tests/Providers/Live/AmazonAPITest.php
110110

111111
-
112-
message: '#^Access to an undefined property chillerlan\\DotEnv\\DotEnv\:\:\$GW2_TOKEN\.$#'
112+
rawMessage: Access to an undefined property chillerlan\DotEnv\DotEnv::$GW2_TOKEN.
113113
identifier: property.notFound
114114
count: 1
115115
path: tests/Providers/Live/GuildWars2APITest.php
116116

117117
-
118-
message: '#^Access to an undefined property chillerlan\\DotEnv\\DotEnv\:\:\$GW2_TOKEN_NAME\.$#'
118+
rawMessage: Access to an undefined property chillerlan\DotEnv\DotEnv::$GW2_TOKEN_NAME.
119119
identifier: property.notFound
120120
count: 1
121121
path: tests/Providers/Live/GuildWars2APITest.php
122122

123123
-
124-
message: '#^Dead catch \- chillerlan\\OAuth\\Providers\\ProviderException is never thrown in the try block\.$#'
124+
rawMessage: Dead catch - chillerlan\OAuth\Providers\ProviderException is never thrown in the try block.
125125
identifier: catch.neverThrown
126126
count: 1
127127
path: tests/Providers/Live/MusicBrainzAPITest.php
128128

129129
-
130-
message: '''
131-
#^Access to constant on deprecated class chillerlan\\OAuth\\Providers\\OpenStreetmap\:
132-
https\://github\.com/openstreetmap/operations/issues/867$#
130+
rawMessage: '''
131+
Access to constant on deprecated class chillerlan\OAuth\Providers\OpenStreetmap:
132+
https://github.com/openstreetmap/operations/issues/867
133133
'''
134134
identifier: classConstant.deprecatedClass
135135
count: 1
136136
path: tests/Providers/Live/OpenStreetmapAPITest.php
137137

138138
-
139-
message: '''
140-
#^PHPDoc tag @property for \$provider references deprecated class chillerlan\\OAuth\\Providers\\OpenStreetmap\:
141-
https\://github\.com/openstreetmap/operations/issues/867$#
139+
rawMessage: '''
140+
PHPDoc tag @property for $provider references deprecated class chillerlan\OAuth\Providers\OpenStreetmap:
141+
https://github.com/openstreetmap/operations/issues/867
142142
'''
143143
identifier: propertyTag.deprecatedClass
144144
count: 1
145145
path: tests/Providers/Live/OpenStreetmapAPITest.php
146146

147147
-
148-
message: '#^Parameter \#1 \$content of method Psr\\Http\\Message\\StreamFactoryInterface\:\:createStream\(\) expects string, string\|false given\.$#'
148+
rawMessage: 'Parameter #1 $content of method Psr\Http\Message\StreamFactoryInterface::createStream() expects string, string|false given.'
149149
identifier: argument.type
150150
count: 2
151151
path: tests/Providers/Unit/OAuth2ProviderUnitTestAbstract.php
152152

153153
-
154-
message: '#^Parameter \#1 \$expected of static method PHPUnit\\Framework\\Assert\:\:assertInstanceOf\(\) expects class\-string\<object\>, string given\.$#'
154+
rawMessage: 'Parameter #1 $expected of static method PHPUnit\Framework\Assert::assertInstanceOf() expects class-string<object>, string given.'
155155
identifier: argument.type
156156
count: 1
157157
path: tests/Providers/Unit/OAuthProviderUnitTestAbstract.php
158158

159159
-
160-
message: '''
161-
#^PHPDoc tag @property for \$provider references deprecated class chillerlan\\OAuth\\Providers\\OpenStreetmap\:
162-
https\://github\.com/openstreetmap/operations/issues/867$#
160+
rawMessage: '''
161+
PHPDoc tag @property for $provider references deprecated class chillerlan\OAuth\Providers\OpenStreetmap:
162+
https://github.com/openstreetmap/operations/issues/867
163163
'''
164164
identifier: propertyTag.deprecatedClass
165165
count: 1
166166
path: tests/Providers/Unit/OpenStreetmap2Test.php
167167

168168
-
169-
message: '''
170-
#^Access to constant on deprecated class chillerlan\\OAuth\\Providers\\OpenStreetmap\:
171-
https\://github\.com/openstreetmap/operations/issues/867$#
169+
rawMessage: '''
170+
Access to constant on deprecated class chillerlan\OAuth\Providers\OpenStreetmap:
171+
https://github.com/openstreetmap/operations/issues/867
172172
'''
173173
identifier: classConstant.deprecatedClass
174174
count: 1
175175
path: tests/Providers/Unit/OpenStreetmapTest.php
176176

177177
-
178-
message: '''
179-
#^PHPDoc tag @property for \$provider references deprecated class chillerlan\\OAuth\\Providers\\OpenStreetmap\:
180-
https\://github\.com/openstreetmap/operations/issues/867$#
178+
rawMessage: '''
179+
PHPDoc tag @property for $provider references deprecated class chillerlan\OAuth\Providers\OpenStreetmap:
180+
https://github.com/openstreetmap/operations/issues/867
181181
'''
182182
identifier: propertyTag.deprecatedClass
183183
count: 1

src/Core/OAuthProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ final protected function getRequestURL(string $path, array|null $params = null):
254254
* @return array<string, string>
255255
*/
256256
protected function cleanQueryParams(iterable $params):array{
257+
/** @phan-suppress-next-line PhanTypeMismatchReturn */
257258
return QueryUtil::cleanParams($params, QueryUtil::BOOLEANS_AS_INT_STRING, true);
258259
}
259260

@@ -264,6 +265,7 @@ protected function cleanQueryParams(iterable $params):array{
264265
* @return array<string, string>
265266
*/
266267
protected function cleanBodyParams(iterable $params):array{
268+
/** @phan-suppress-next-line PhanTypeMismatchReturn */
267269
return QueryUtil::cleanParams($params, QueryUtil::BOOLEANS_AS_BOOL, true);
268270
}
269271

0 commit comments

Comments
 (0)