Skip to content

Commit 73f5ec3

Browse files
Upgraded static analyzers
1 parent 45de9d9 commit 73f5ec3

File tree

8 files changed

+27
-29
lines changed

8 files changed

+27
-29
lines changed

.github/workflows/static.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ jobs:
1616
- name: Setup PHP
1717
uses: shivammathur/setup-php@v2
1818
with:
19-
php-version: 7.4
19+
php-version: '8.0'
2020
tools: composer:2.1
2121
coverage: none
2222

@@ -48,7 +48,7 @@ jobs:
4848
- name: Setup PHP
4949
uses: shivammathur/setup-php@v2
5050
with:
51-
php-version: 7.4
51+
php-version: '8.0'
5252
tools: composer:2.1
5353
coverage: none
5454

Makefile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,24 @@
11
install:
2-
@docker run -it -w /data -v ${PWD}:/data:delegated -v ~/.composer:/root/.composer:delegated --entrypoint composer --rm registry.gitlab.com/grahamcampbell/php:7.4-base update
3-
@docker run -it -w /data -v ${PWD}:/data:delegated -v ~/.composer:/root/.composer:delegated --entrypoint composer --rm registry.gitlab.com/grahamcampbell/php:7.4-base bin all update
2+
@docker run -it -w /data -v ${PWD}:/data:delegated -v ~/.composer:/root/.composer:delegated --entrypoint composer --rm registry.gitlab.com/grahamcampbell/php:8.0-base update
3+
@docker run -it -w /data -v ${PWD}:/data:delegated -v ~/.composer:/root/.composer:delegated --entrypoint composer --rm registry.gitlab.com/grahamcampbell/php:8.0-base bin all update
44

55
phpunit:
6-
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit --rm registry.gitlab.com/grahamcampbell/php:7.4-cli
6+
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpunit --rm registry.gitlab.com/grahamcampbell/php:8.0-cli
77

88
phpstan-analyze:
9-
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan --rm registry.gitlab.com/grahamcampbell/php:7.4-cli analyze
9+
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan --rm registry.gitlab.com/grahamcampbell/php:8.0-cli analyze
1010

1111
phpstan-baseline:
12-
@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
12+
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/phpstan --rm registry.gitlab.com/grahamcampbell/php:8.0-cli analyze --generate-baseline
1313

1414
psalm-analyze:
15-
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm.phar --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:8.0-cli
1616

1717
psalm-baseline:
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
18+
@docker run -it -w /data -v ${PWD}:/data:delegated --entrypoint vendor/bin/psalm.phar --rm registry.gitlab.com/grahamcampbell/php:8.0-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.phar --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:8.0-cli --show-info=true
2222

2323
test: phpunit phpstan-analyze psalm-analyze
2424

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: "#^Property Bitbucket\\\\Api\\\\AbstractApi\\:\\:\\$perPage is never written, only read\\.$#"
5+
count: 1
6+
path: src/Api/AbstractApi.php
7+
38
-
49
message: "#^Variable method call on Bitbucket\\\\Api\\\\AbstractApi\\.$#"
510
count: 1

psalm-baseline.xml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
2-
<files psalm-version="4.3.1@2feba22a005a18bf31d4c7b9bdb9252c73897476">
3-
<file src="src/HttpClient/Util/JsonArray.php">
4-
<MixedArgument occurrences="1">
5-
<code>\get_debug_type($data)</code>
6-
</MixedArgument>
7-
<UndefinedFunction occurrences="1">
8-
<code>\get_debug_type($data)</code>
9-
</UndefinedFunction>
10-
</file>
2+
<files psalm-version="4.x-dev@">
113
<file src="src/ResultPager.php">
124
<InaccessibleProperty occurrences="1">
135
<code>$clone-&gt;perPage</code>

src/HttpClient/Util/UriBuilder.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ final class UriBuilder
3333
*/
3434
public static function build(string ...$parts): string
3535
{
36+
/** @var int $index */
3637
foreach ($parts as $index => $part) {
3738
if ('' === $part) {
3839
throw new ValueError(\sprintf('%s::buildUri(): Argument #%d ($parts) must non-empty', self::class, $index + 1));

vendor-bin/phpstan/composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"require": {
3-
"php": "^7.2.5 || ^8.0",
4-
"phpstan/phpstan": "0.12.82",
5-
"phpstan/phpstan-deprecation-rules": "0.12.6",
6-
"phpstan/phpstan-strict-rules": "0.12.9",
7-
"thecodingmachine/phpstan-strict-rules": "0.12.1",
8-
"ergebnis/phpstan-rules": "0.15.3"
3+
"php": "^8.0.2",
4+
"phpstan/phpstan": "1.4.2",
5+
"phpstan/phpstan-deprecation-rules": "1.0.0",
6+
"phpstan/phpstan-strict-rules": "1.1.0",
7+
"thecodingmachine/phpstan-strict-rules": "1.0.0",
8+
"ergebnis/phpstan-rules": "1.0.0"
99
},
1010
"config": {
1111
"preferred-install": "dist"

vendor-bin/phpunit/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"require": {
3-
"php": "^7.2.5 || ^8.0",
4-
"phpunit/phpunit": "^8.5.15 || ^9.5.4"
3+
"php": "^7.2.5 || ^8.0.2",
4+
"phpunit/phpunit": "^8.5.23 || ^9.5.12"
55
},
66
"config": {
77
"preferred-install": "dist"

vendor-bin/psalm/composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"require": {
3-
"php": "^7.2.5 || ^8.0",
4-
"psalm/phar": "4.6.3"
3+
"php": "^8.0.2",
4+
"psalm/phar": "4.18.1"
55
},
66
"config": {
77
"preferred-install": "dist"

0 commit comments

Comments
 (0)