Skip to content

Commit 5d87898

Browse files
Update dev dependencies, pipeline and fixed tests
1 parent 064f534 commit 5d87898

7 files changed

Lines changed: 36 additions & 29 deletions

File tree

.github/workflows/build.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
steps:
2828
- name: Checkout
29-
uses: actions/checkout@v2
29+
uses: actions/checkout@v2.3.4
3030

3131
- name: Setup cache environment
3232
id: cache-env
@@ -68,6 +68,9 @@ jobs:
6868
restore-keys: |
6969
php${{ matrix.php }}-composer-
7070
71+
- name: Update composer
72+
run: composer self-update
73+
7174
- name: Install dependencies with composer php 7.4
7275
if: matrix.php == '7.4'
7376
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi

.github/workflows/mutation.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ jobs:
2525

2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@v2
28+
uses: actions/checkout@v2.3.4
2929

30-
- name: Install PHP
30+
- name: Install PHP with extensions
3131
uses: shivammathur/setup-php@v2
3232
with:
3333
php-version: "${{ matrix.php }}"
@@ -47,12 +47,15 @@ jobs:
4747
restore-keys: |
4848
php${{ matrix.php }}-composer-
4949
50+
- name: Update composer
51+
run: composer self-update
52+
5053
- name: Install dependencies with composer
5154
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
5255

5356
- name: Run infection
5457
run: |
5558
git fetch --depth=1 origin $GITHUB_BASE_REF
56-
vendor/bin/infection -j2 --git-diff-filter=A --git-diff-base=origin/$GITHUB_BASE_REF --logger-github --ignore-msi-with-no-mutations --only-covered
59+
vendor/bin/roave-infection-static-analysis-plugin -j2 --git-diff-filter=A --git-diff-base=origin/$GITHUB_BASE_REF --logger-github --ignore-msi-with-no-mutations --only-covered
5760
env:
5861
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }}

.github/workflows/static.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ jobs:
88
mutation:
99
name: PHP ${{ matrix.php }}-${{ matrix.os }}
1010

11-
env:
12-
extensions: dom, json, libxml, mbstring, pdo, pdo_pgsql, tokenizer
13-
1411
runs-on: ${{ matrix.os }}
1512

1613
strategy:
@@ -23,13 +20,12 @@ jobs:
2320

2421
steps:
2522
- name: Checkout
26-
uses: actions/checkout@v2
23+
uses: actions/checkout@v2.3.4
2724

2825
- name: Install PHP
2926
uses: shivammathur/setup-php@v2
3027
with:
3128
php-version: "${{ matrix.php }}"
32-
extensions: ${{ env.extensions }}
3329
tools: composer:v2, cs2pr
3430
coverage: none
3531

@@ -44,8 +40,11 @@ jobs:
4440
restore-keys: |
4541
php${{ matrix.php }}-composer-
4642
43+
- name: Update composer
44+
run: composer self-update
45+
4746
- name: Install dependencies with composer
4847
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
4948

50-
- name: Static analysis with psalm
49+
- name: Static analysis
5150
run: vendor/bin/psalm --shepherd --stats --output-format=checkstyle | cs2pr --graceful-warnings --colorize

.scrutinizer.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
1-
build:
2-
environment:
3-
php: "7.4"
4-
nodes:
5-
analysis:
6-
tests:
7-
override:
8-
- php-scrutinizer-run
1+
checks:
2+
php: true
3+
94
filter:
105
paths:
116
- "src/*"
12-
checks:
13-
php: true
7+
148
tools:
159
php_code_coverage:
1610
enabled: true
17-
external_code_coverage:
18-
timeout: 600
11+
12+
build:
13+
nodes:
14+
analysis:
15+
environment:
16+
php: 7.4.12
17+
18+
tests:
19+
override:
20+
- php-scrutinizer-run

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
"yiisoft/strings": "^1.0"
2727
},
2828
"require-dev": {
29-
"infection/infection": "^0.20.0",
30-
"phpunit/phpunit": "^9.3",
31-
"vimeo/psalm": "^4.0",
29+
"phpunit/phpunit": "^9.4",
30+
"roave/infection-static-analysis-plugin": "^1.3",
31+
"vimeo/psalm": "^4.1",
3232
"yiisoft/aliases": "^1.0",
3333
"yiisoft/log": "^3.0@dev",
3434
"yiisoft/di": "^3.0@dev",

src/Schema.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -482,10 +482,10 @@ protected function loadColumnSchema(array $info): ColumnSchema
482482
public function setTransactionIsolationLevel(string $level): void
483483
{
484484
switch ($level) {
485-
case TransactionInterface::SERIALIZABLE:
485+
case Transaction::SERIALIZABLE:
486486
$this->getDb()->createCommand('PRAGMA read_uncommitted = False;')->execute();
487487
break;
488-
case TransactionInterface::READ_UNCOMMITTED:
488+
case Transaction::READ_UNCOMMITTED:
489489
$this->getDb()->createCommand('PRAGMA read_uncommitted = True;')->execute();
490490
break;
491491
default:

tests/ConnectionTest.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -437,11 +437,11 @@ public function testTransactionIsolation(): void
437437
{
438438
$connection = $this->getConnection(true);
439439

440-
$transaction = $connection->beginTransaction(TransactionInterface::READ_UNCOMMITTED);
440+
$transaction = $connection->beginTransaction(Transaction::READ_UNCOMMITTED);
441441

442442
$transaction->rollBack();
443443

444-
$transaction = $connection->beginTransaction(TransactionInterface::SERIALIZABLE);
444+
$transaction = $connection->beginTransaction(Transaction::SERIALIZABLE);
445445

446446
$transaction->rollBack();
447447

0 commit comments

Comments
 (0)