Skip to content

Commit 9c75484

Browse files
Merge branch '10.0' into 10.1
2 parents 8fae41a + de88ca6 commit 9c75484

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+494
-450
lines changed

.github/workflows/static.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
command: composer bin psalm update --no-interaction --no-progress
6868

6969
- name: Execute Psalm
70-
run: vendor/bin/psalm --no-progress --output-format=github
70+
run: vendor/bin/psalm.phar --no-progress --output-format=github
7171

7272
rector:
7373
name: Rector

.styleci.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
preset: symfony
22

3+
risky: true
4+
35
enabled:
46
- align_phpdoc
57
- alpha_ordered_imports
68
- array_indentation
79
- const_visibility_required
10+
- native_constant_invocation
11+
- native_function_invocation
812
- phpdoc_order
13+
- void_return
914

1015
disabled:
16+
- native_constant_invocation_symfony
17+
- native_function_invocation_symfony
1118
- no_superfluous_phpdoc_tags_symfony
1219
- phpdoc_to_comment
1320
- phpdoc_var_without_name

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@ CHANGE LOG
22
==========
33

44

5+
## 10.0.0 (UPCOMING)
6+
7+
* No changes since RC2
8+
9+
510
## 10.0.0-RC2 (23/07/2020)
611

712
* Restored 9.x behaviour for empty JSON responses

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,13 @@ phpstan-baseline:
1212
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan --rm registry.gitlab.com/grahamcampbell/php:7.4-cli analyze --generate-baseline
1313

1414
psalm-analyze:
15-
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm --rm registry.gitlab.com/grahamcampbell/php:7.4-cli
15+
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm.phar --rm registry.gitlab.com/grahamcampbell/php:7.4-cli
1616

1717
psalm-baseline:
18-
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm --rm registry.gitlab.com/grahamcampbell/php:7.4-cli --set-baseline=psalm-baseline.xml
18+
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm.phar --rm registry.gitlab.com/grahamcampbell/php:7.4-cli --set-baseline=psalm-baseline.xml
1919

2020
psalm-show-info:
21-
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm --rm registry.gitlab.com/grahamcampbell/php:7.4-cli --show-info=true
21+
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm.phar --rm registry.gitlab.com/grahamcampbell/php:7.4-cli --show-info=true
2222

2323
rector-dry-run:
2424
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/rector --rm registry.gitlab.com/grahamcampbell/php:7.4-cli process --dry-run

phpstan-baseline.neon

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
parameters:
22
ignoreErrors:
3+
-
4+
message: "#^Parameter \\#1 \\$error_handler of function set_error_handler expects \\(callable\\(int, string, string, int, array\\)\\: bool\\)\\|null, Closure\\(\\)\\: void given\\.$#"
5+
count: 1
6+
path: src/Api/AbstractApi.php
7+
38
-
49
message: "#^Return type \\(Gitlab\\\\Model\\\\Issue\\) of method Gitlab\\\\Model\\\\Issue\\:\\:close\\(\\) should be covariant with return type \\(static\\(Gitlab\\\\Model\\\\Stateful\\)\\) of method Gitlab\\\\Model\\\\Stateful\\:\\:close\\(\\)$#"
510
count: 1

phpunit.xml.dist

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@
2020
<directory suffix="Test.php">./tests</directory>
2121
</testsuite>
2222
</testsuites>
23-
<filter>
24-
<whitelist processUncoveredFilesFromWhitelist="true">
23+
<coverage processUncoveredFiles="true">
24+
<include>
2525
<directory suffix=".php">./src</directory>
26-
</whitelist>
27-
</filter>
26+
</include>
27+
</coverage>
2828
</phpunit>

psalm-baseline.xml

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="3.12.2@7c7ebd068f8acaba211d4a2c707c4ba90874fa26">
2+
<files psalm-version="3.13.1@afd8874a9e4562eac42a02de90e42e430c3a1db1">
3+
<file src="src/Api/AbstractApi.php">
4+
<InvalidArgument occurrences="1"/>
5+
</file>
6+
<file src="src/HttpClient/Util/JsonArray.php">
7+
<UndefinedFunction occurrences="1">
8+
<code>\get_debug_type($data)</code>
9+
</UndefinedFunction>
10+
</file>
311
</files>

src/Api/AbstractApi.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ private static function addJsonContentType(array $headers)
357357
private static function tryFopen(string $filename, string $mode)
358358
{
359359
$ex = null;
360-
\set_error_handler(function () use ($filename, $mode, &$ex) {
360+
\set_error_handler(function () use ($filename, $mode, &$ex): void {
361361
$ex = new RuntimeException(\sprintf(
362362
'Unable to open %s using mode %s: %s',
363363
$filename,
@@ -390,7 +390,7 @@ private static function guessFileContentType(string $file)
390390
return ResponseMediator::STREAM_CONTENT_TYPE;
391391
}
392392

393-
$finfo = new \finfo(FILEINFO_MIME_TYPE);
393+
$finfo = new \finfo(\FILEINFO_MIME_TYPE);
394394
$type = $finfo->file($file);
395395

396396
return false !== $type ? $type : ResponseMediator::STREAM_CONTENT_TYPE;

src/Api/Issues.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,18 @@ public function update($project_id, int $issue_iid, array $params)
9090
return $this->put($this->getProjectPath($project_id, 'issues/'.self::encodePath($issue_iid)), $params);
9191
}
9292

93+
/**
94+
* @param int|string $project_id
95+
* @param int $issue_iid
96+
* @param array $params
97+
*
98+
* @return mixed
99+
*/
100+
public function reorder($project_id, int $issue_iid, array $params)
101+
{
102+
return $this->put($this->getProjectPath($project_id, 'issues/'.self::encodePath($issue_iid)).'/reorder', $params);
103+
}
104+
93105
/**
94106
* @param int|string $project_id
95107
* @param int $issue_iid

src/HttpClient/Builder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ public function getUriFactory()
159159
*
160160
* @return void
161161
*/
162-
public function addPlugin(Plugin $plugin)
162+
public function addPlugin(Plugin $plugin): void
163163
{
164164
$this->plugins[] = $plugin;
165165
$this->pluginClient = null;
@@ -172,7 +172,7 @@ public function addPlugin(Plugin $plugin)
172172
*
173173
* @return void
174174
*/
175-
public function removePlugin(string $fqcn)
175+
public function removePlugin(string $fqcn): void
176176
{
177177
foreach ($this->plugins as $idx => $plugin) {
178178
if ($plugin instanceof $fqcn) {
@@ -190,7 +190,7 @@ public function removePlugin(string $fqcn)
190190
*
191191
* @return void
192192
*/
193-
public function addCache(CacheItemPoolInterface $cachePool, array $config = [])
193+
public function addCache(CacheItemPoolInterface $cachePool, array $config = []): void
194194
{
195195
if (!isset($config['cache_key_generator'])) {
196196
$config['cache_key_generator'] = new HeaderCacheKeyGenerator(['Authorization', 'Cookie', 'Accept', 'Content-type']);
@@ -205,7 +205,7 @@ public function addCache(CacheItemPoolInterface $cachePool, array $config = [])
205205
*
206206
* @return void
207207
*/
208-
public function removeCache()
208+
public function removeCache(): void
209209
{
210210
$this->cachePlugin = null;
211211
$this->pluginClient = null;

0 commit comments

Comments
 (0)