Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ permissions:
jobs:
composer-normalize:
name: Composer Normalize
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Composer normalize
uses: docker://ergebnis/composer-normalize-action
11 changes: 6 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
jobs:
build-lowest-version:
name: Build lowest version
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Set up PHP
Expand All @@ -23,7 +23,7 @@ jobs:
extensions: mbstring

- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install dependencies
run: composer update --no-interaction --prefer-stable --prefer-lowest --no-progress
Expand All @@ -33,11 +33,12 @@ jobs:

build:
name: Build
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
max-parallel: 10
matrix:
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4']
php: ['7.2', '7.3', '7.4', '8.0', '8.1', '8.2', '8.3', '8.4', '8.5']

steps:
- name: Set up PHP
Expand All @@ -49,7 +50,7 @@ jobs:
extensions: mbstring

- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Install dependencies
run: composer update --no-interaction --no-progress
Expand Down
29 changes: 26 additions & 3 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,44 @@ permissions:
contents: read

jobs:
phpstan:
name: PHPStan
runs-on: ubuntu-24.04

steps:
- name: Checkout code
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.5'
coverage: none
extensions: mbstring

- name: Download dependencies
run: composer update --no-interaction --no-progress

- name: Download PHPStan
run: composer bin phpstan update --no-interaction --no-progress

- name: Execute PHPStan
run: vendor/bin/phpstan analyze --no-progress

php-cs-fixer:
name: PHP-CS-Fixer
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04

steps:
- name: Checkout code
uses: actions/checkout@v4
uses: actions/checkout@v6

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: '7.4'
coverage: none
extensions: mbstring
tools: composer

- name: Download dependencies
run: composer update --no-interaction --no-progress
Expand Down
25 changes: 25 additions & 0 deletions phpstan-baseline.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
parameters:
ignoreErrors:
-
message: '#^If condition is always true\.$#'
identifier: if.alwaysTrue
count: 1
path: src/Command.php

-
message: '#^Callable callable\(Psr\\Http\\Message\\RequestInterface, array\)\: GuzzleHttp\\Promise\\PromiseInterface invoked with 1 parameter, 2 required\.$#'
identifier: arguments.count
count: 1
path: src/ServiceClient.php

-
message: '#^Parameter \#1 of callable callable\(Psr\\Http\\Message\\RequestInterface, array\)\: GuzzleHttp\\Promise\\PromiseInterface expects Psr\\Http\\Message\\RequestInterface, GuzzleHttp\\Command\\CommandInterface given\.$#'
identifier: argument.type
count: 1
path: src/ServiceClient.php

-
message: '#^Ternary operator condition is always true\.$#'
identifier: ternary.alwaysTrue
count: 1
path: src/ServiceClient.php
7 changes: 7 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
includes:
- phpstan-baseline.neon

parameters:
level: 5
paths:
- src
4 changes: 2 additions & 2 deletions src/ServiceClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ public function __call($name, array $args)
$command = $this->getCommand(substr($name, 0, -5), $args);

return $this->executeAsync($command);
} else {
return $this->execute($this->getCommand($name, $args));
}

return $this->execute($this->getCommand($name, $args));
}

/**
Expand Down
4 changes: 2 additions & 2 deletions vendor-bin/php-cs-fixer/composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"require": {
"php": "^7.4 || ^8.0",
"friendsofphp/php-cs-fixer": "3.68.5"
"php": "^7.4",
"friendsofphp/php-cs-fixer": "3.94.2"
},
"config": {
"preferred-install": "dist"
Expand Down
10 changes: 10 additions & 0 deletions vendor-bin/phpstan/composer.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"require": {
"php": "^8.2",
"phpstan/phpstan": "2.1.40",
"phpstan/phpstan-deprecation-rules": "2.0.3"
},
"config": {
"preferred-install": "dist"
}
}