Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2d915d9
Upgrade to PHP 8.2 minimum, PHPUnit 10, and fix deprecations
rybakit Jul 25, 2026
1655719
Use ^8.2 for PHP constraint
rybakit Jul 25, 2026
9ce1156
Remove PhpUnitCompat completely
rybakit Jul 25, 2026
54a3488
Drop unsupported PHP versions from CI matrix
rybakit Jul 25, 2026
ef8f897
Fix composer repositories for CI
rybakit Jul 25, 2026
6db5877
Use no-api for composer VCS repositories to prevent GitHub rate limits
rybakit Jul 25, 2026
7105451
Fix code style issues for php-cs-fixer 3.0
rybakit Jul 25, 2026
191d2e0
Migrate docblock annotations to PHP attributes
rybakit Jul 26, 2026
f74d6e1
chore: require PHP 8.2 and PHPUnit 10
rybakit Aug 20, 2026
53200a7
ci: fix phpunit 10 migration checks
rybakit Aug 20, 2026
5bbe7cd
chore: migrate tests to stable phpunit extras
rybakit Sep 29, 2026
34bc212
ci: upgrade checkout action to v7
rybakit Sep 29, 2026
0788f27
ci: avoid duplicate QA runs for pull requests
rybakit Sep 29, 2026
49ad3b9
refactor: modernize PHP examples
rybakit Sep 29, 2026
655dcf7
refactor: type test fixtures
rybakit Sep 29, 2026
34a1e62
refactor: add native source types
rybakit Sep 29, 2026
d9bc072
ci: test newer PHP and Tarantool versions
rybakit Sep 29, 2026
5262558
docs: clarify supported Tarantool versions
rybakit Sep 29, 2026
464a5f5
ci: pin runner to Ubuntu 24.04
rybakit Sep 29, 2026
6e2344c
deps: allow Symfony UID 8
rybakit Sep 29, 2026
6ee9b8f
chore: remove Scrutinizer integration
rybakit Sep 29, 2026
b715b63
ci: run transport coverage on default PHP
rybakit Sep 29, 2026
731a45b
ci: align coverage paths with checkout
rybakit Sep 29, 2026
86f66b3
ci: use Cobertura for coverage summaries
rybakit Sep 29, 2026
4d3fcd4
ci: aggregate coverage across test matrix
rybakit Sep 29, 2026
ed49c97
ci: update artifact actions for Node 24
rybakit Sep 29, 2026
5961ada
test: cover firewall and logging middleware
rybakit Sep 29, 2026
6ebdc80
test: fix firewall middleware test
rybakit Sep 29, 2026
2de384a
fix: code style
rybakit Sep 29, 2026
fe043f1
style: preserve fully qualified function calls
rybakit Sep 30, 2026
f9acce0
refactor: declare native property types
rybakit Sep 30, 2026
d938604
style: format Lua heredoc calls
rybakit Sep 30, 2026
dbbcf13
ci: simplify test matrix job names
rybakit Sep 30, 2026
6c4f47d
style: group class properties without blank lines
rybakit Sep 30, 2026
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
1 change: 0 additions & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ tests export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.php-cs-fixer.dist.php export-ignore
.scrutinizer.yml export-ignore
dockerfile.sh export-ignore
phpunit.xml.dist export-ignore
psalm.xml export-ignore
99 changes: 56 additions & 43 deletions .github/workflows/qa.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,32 @@
name: QA
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
schedule:
- cron: '40 2 * * *'

jobs:
tests:
permissions:
actions: read
contents: read
env:
TNT_IMAGE: tarantool/tarantool:3.1
PHP_IMAGE: php:8.3-cli
strategy:
fail-fast: false
matrix:
operating-system: [ubuntu-latest]
operating-system: [ubuntu-24.04]
env:
- TNT_IMAGE: tarantool/tarantool:3.7
- TNT_IMAGE: tarantool/tarantool:3.6
- TNT_IMAGE: tarantool/tarantool:3.5
- TNT_IMAGE: tarantool/tarantool:3.4
- TNT_IMAGE: tarantool/tarantool:3.3
- TNT_IMAGE: tarantool/tarantool:3.2
- TNT_IMAGE: tarantool/tarantool:3.0
- TNT_IMAGE: tarantool/tarantool:2.11
- TNT_IMAGE: tarantool/tarantool:2.10
Expand All @@ -31,55 +42,30 @@ jobs:
- TNT_IMAGE: tarantool/tarantool:1.9
- TNT_IMAGE: tarantool/tarantool:1.7

- PHP_IMAGE: php:8.3-cli
TNT_LISTEN_URI: /tmp/tarantool_client.sock
- PHP_IMAGE: php:8.5-cli
- PHP_IMAGE: php:8.4-cli

- PHP_IMAGE: php:8.2-cli
- PHP_IMAGE: php:8.2-cli
TNT_LISTEN_URI: /tmp/tarantool_client.sock

- PHP_IMAGE: php:8.1-cli
- PHP_IMAGE: php:8.1-cli
TNT_LISTEN_URI: /tmp/tarantool_client.sock

- PHP_IMAGE: php:8.0-cli
- PHP_IMAGE: php:8.0-cli
TNT_LISTEN_URI: /tmp/tarantool_client.sock

- PHP_IMAGE: php:7.4-cli
- PHP_IMAGE: php:7.4-cli
TNT_LISTEN_URI: /tmp/tarantool_client.sock

- PHP_IMAGE: php:7.3-cli
QA: 1
- PHP_IMAGE: php:7.3-cli
TNT_LISTEN_URI: /tmp/tarantool_client.sock

- PHP_IMAGE: php:7.2-cli
- PHP_IMAGE: php:7.2-cli
TNT_LISTEN_URI: /tmp/tarantool_client.sock

- COVERAGE_FILE: coverage.clover
# scrutinizer doesn't support PHP 8
PHP_IMAGE: php:7.4-cli
- COVERAGE_FILE: coverage.clover
# scrutinizer doesn't support PHP 8
PHP_IMAGE: php:7.4-cli
- COVERAGE_FILE: coverage.xml
PHP_IMAGE: php:8.3-cli
- COVERAGE_FILE: coverage.xml
PHP_IMAGE: php:8.3-cli
EXT_DISABLE_DECIMAL: true
- COVERAGE_FILE: coverage.clover
# scrutinizer doesn't support PHP 8
PHP_IMAGE: php:7.4-cli
- COVERAGE_FILE: coverage.xml
PHP_IMAGE: php:8.3-cli
TNT_LISTEN_URI: /tmp/tarantool_client.sock
- COVERAGE_FILE: coverage.clover
# scrutinizer doesn't support PHP 8
PHP_IMAGE: php:7.4-cli
- COVERAGE_FILE: coverage.xml
PHP_IMAGE: php:8.3-cli
# some tests are skipped on Tarantool > 2.8
TNT_IMAGE: tarantool/tarantool:2.8

name: ${{ matrix.env.PHP_IMAGE || 'php:8.3-cli' }}, ${{ matrix.env.TNT_IMAGE || 'tarantool/tarantool:3.1' }}${{ matrix.env.QA && ', qa' || '' }}${{ matrix.env.COVERAGE_FILE && ', coverage' || '' }}${{ matrix.env.EXT_DISABLE_DECIMAL && ', decimal disabled' || '' }}${{ matrix.env.TNT_LISTEN_URI && ', unix socket' || '' }}
runs-on: ${{ matrix.operating-system }}
steps:
- name: Checkout
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Build docker image
env: ${{ matrix.env }}
Expand All @@ -91,7 +77,7 @@ jobs:
docker network create tarantool-php
docker run --net=tarantool-php --rm $TNT_IMAGE sh -c "tarantool --version"
docker run --net=tarantool-php -d --name=tarantool -v /tmp:/tmp -v $PWD/tests/Integration/client.lua:/client.lua -e TNT_LISTEN_URI=$TNT_LISTEN_URI $TNT_IMAGE tarantool /client.lua
docker run --net=tarantool-php --rm -v /tmp:/tmp -v $PWD:/client -w /client -e COMPOSER_ROOT_VERSION=dev-master client
docker run --net=tarantool-php --rm -v /tmp:/tmp -v "$GITHUB_WORKSPACE:$GITHUB_WORKSPACE" -w "$GITHUB_WORKSPACE" -e COMPOSER_ROOT_VERSION=dev-master client

- name: Check code quality
env: ${{ matrix.env }}
Expand All @@ -100,9 +86,36 @@ jobs:
docker run --net=tarantool-php --rm -v $PWD:/client -w /client client php vendor/bin/php-cs-fixer fix --dry-run --diff --verbose .
docker run --net=tarantool-php --rm -v $PWD:/client -w /client client php vendor/bin/psalm

- name: Upload code coverage to Scrutinizer
- name: Upload code coverage report
env: ${{ matrix.env }}
if: ${{ env.COVERAGE_FILE }}
run: |
curl -sSOL https://scrutinizer-ci.com/ocular.phar
docker run --net=tarantool-php --rm -v $PWD:/client -w /client client php ocular.phar code-coverage:upload --format=php-clover "$COVERAGE_FILE"
uses: actions/upload-artifact@v7
with:
name: coverage-${{ strategy.job-index }}
path: ${{ env.COVERAGE_FILE }}

coverage:
needs: tests
runs-on: ubuntu-24.04
permissions:
actions: read
contents: read
statuses: write
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Download coverage reports
uses: actions/download-artifact@v8
with:
pattern: coverage-*
path: coverage-reports

- name: Add combined code coverage report to workflow summary
uses: getsentry/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
directory: coverage-reports
coverage-format: cobertura
enable-tests: false
name: full-test-matrix
2 changes: 1 addition & 1 deletion .github/workflows/reusable_qa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-24.04
steps:
- name: Clone the tarantool-php/client connector
uses: actions/checkout@v4
uses: actions/checkout@v7
with:
repository: tarantool-php/client

Expand Down
31 changes: 25 additions & 6 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,34 @@
namespace Tarantool\Client;

use PhpCsFixer\Config;
use PhpCsFixer\Fixer\ConfigurableFixerInterface;
use PhpCsFixer\Fixer\ConstantNotation\NativeConstantInvocationFixer;
use PhpCsFixer\Fixer\FixerInterface;
use PhpCsFixer\Fixer\FunctionNotation\NativeFunctionInvocationFixer;
use PhpCsFixer\FixerConfiguration\FixerConfigurationResolverInterface;
use PhpCsFixer\FixerDefinition\FixerDefinitionInterface;
use PhpCsFixer\Tokenizer\Tokens;

final class FilterableFixer implements FixerInterface
final class FilterableFixer implements ConfigurableFixerInterface
{
private $fixer;
private $pathRegex;
private ConfigurableFixerInterface $fixer;
private string $pathRegex;

public function __construct(FixerInterface $fixer, string $pathRegex)
public function __construct(ConfigurableFixerInterface $fixer, string $pathRegex)
{
$this->fixer = $fixer;
$this->pathRegex = $pathRegex;
}

public function configure(array $configuration) : void
{
$this->fixer->configure($configuration);
}

public function getConfigurationDefinition() : FixerConfigurationResolverInterface
{
return $this->fixer->getConfigurationDefinition();
}

public function isCandidate(Tokens $tokens) : bool
{
return $this->fixer->isCandidate($tokens);
Expand All @@ -46,6 +58,11 @@ public function getPriority() : int
return $this->fixer->getPriority();
}

public function getDefinition() : FixerDefinitionInterface
{
return $this->fixer->getDefinition();
}

public function supports(\SplFileInfo $file) : bool
{
if (1 !== preg_match($this->pathRegex, $file->getRealPath())) {
Expand Down Expand Up @@ -77,11 +94,13 @@ public function supports(\SplFileInfo $file) : bool
'@Symfony:risky' => true,
'array_syntax' => ['syntax' => 'short'],
'binary_operator_spaces' => ['operators' => ['=' => null, '=>' => null]],
'class_attributes_separation' => ['elements' => ['method' => 'one', 'property' => 'none']],
'declare_strict_types' => true,
'integer_literal_case' => false,
'native_constant_invocation' => false,
'native_function_invocation' => false,
'FilterableFixer/native_constant_invocation' => true,
'FilterableFixer/native_function_invocation' => true,
'FilterableFixer/native_function_invocation' => ['include' => ['@all']],
'no_useless_else' => true,
'no_useless_return' => true,
'ordered_imports' => [
Expand Down
28 changes: 0 additions & 28 deletions .scrutinizer.yml

This file was deleted.

Loading