Skip to content

Commit e867b46

Browse files
authored
Merge pull request #48 from voku/copilot/fix-ci-issues
fix CI: align PHP matrix with composer.json requirements and apply best practices
2 parents 5a41c04 + 5d0a7ad commit e867b46

3 files changed

Lines changed: 14 additions & 9 deletions

File tree

.github/workflows/ci.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ jobs:
1717
fail-fast: false
1818
matrix:
1919
php: [
20-
7.3,
21-
7.4,
2220
8.0,
2321
8.1,
2422
8.2,
25-
8.3
23+
8.3,
24+
8.4
2625
]
2726
composer: [basic]
2827
timeout-minutes: 10
@@ -75,18 +74,24 @@ jobs:
7574
php vendor/bin/phpstan analyse
7675
7776
- name: Upload coverage results to Coveralls
77+
if: ${{ matrix.php == '8.3' }}
78+
continue-on-error: true
7879
env:
7980
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8081
run: |
8182
composer global require php-coveralls/php-coveralls
8283
php-coveralls --coverage_clover=build/logs/clover.xml -v
8384
8485
- name: Upload coverage results to Codecov
86+
if: ${{ matrix.php == '8.3' }}
87+
continue-on-error: true
8588
uses: codecov/codecov-action@v4
8689
with:
8790
files: build/logs/clover.xml
8891

8992
- name: Upload coverage results to Scrutinizer
93+
if: ${{ matrix.php == '8.3' }}
94+
continue-on-error: true
9095
uses: sudo-bot/action-scrutinizer@latest
9196
with:
9297
cli-args: "--format=php-clover build/logs/clover.xml"

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"source": "https://github.com/voku/Stringy"
3434
},
3535
"require": {
36-
"php": ">=8.1.0",
36+
"php": ">=8.0.0",
3737
"ext-json": "*",
3838
"defuse/php-encryption": "~2.0",
3939
"voku/arrayy": "~7.8",
@@ -44,7 +44,7 @@
4444
"voku/portable-utf8": "~6.0"
4545
},
4646
"require-dev": {
47-
"phpunit/phpunit": "~6.0 || ~7.0 || ~9.0",
47+
"phpunit/phpunit": "~9.0",
4848
"phpstan/phpstan": "^1.0 || ^2.0"
4949
},
5050
"replace": {

tests/StringyTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5586,9 +5586,9 @@ public function testItCanBeHashedWithBcrypt()
55865586
$bcrypt = $string->bcrypt();
55875587
static::assertInstanceOf(\Stringy\Stringy::class, $bcrypt);
55885588
if (\method_exists(__CLASS__, 'assertMatchesRegularExpression')) {
5589-
static::assertMatchesRegularExpression('/\$2y\$10\$[a-zA-Z0-9+.\/]{53}/', (string) $bcrypt);
5589+
static::assertMatchesRegularExpression('/\$2y\$\d{2}\$[a-zA-Z0-9+.\/]{53}/', (string) $bcrypt);
55905590
} else {
5591-
static::assertRegExp('/\$2y\$10\$[a-zA-Z0-9+.\/]{53}/', (string) $bcrypt);
5591+
static::assertRegExp('/\$2y\$\d{2}\$[a-zA-Z0-9+.\/]{53}/', (string) $bcrypt);
55925592
}
55935593
}
55945594

@@ -5598,9 +5598,9 @@ public function testAMultibyteStringCanBeHashedWithBcrypt()
55985598
$bcrypt = $string->bcrypt([\PASSWORD_BCRYPT_DEFAULT_COST]);
55995599
static::assertInstanceOf(\Stringy\Stringy::class, $bcrypt);
56005600
if (\method_exists(__CLASS__, 'assertMatchesRegularExpression')) {
5601-
static::assertMatchesRegularExpression('/\$2y\$10\$[a-zA-Z0-9+.\/]{53}/', (string) $bcrypt);
5601+
static::assertMatchesRegularExpression('/\$2y\$\d{2}\$[a-zA-Z0-9+.\/]{53}/', (string) $bcrypt);
56025602
} else {
5603-
static::assertRegExp('/\$2y\$10\$[a-zA-Z0-9+.\/]{53}/', (string) $bcrypt);
5603+
static::assertRegExp('/\$2y\$\d{2}\$[a-zA-Z0-9+.\/]{53}/', (string) $bcrypt);
56045604
}
56055605
}
56065606

0 commit comments

Comments
 (0)