Skip to content

Commit 461a471

Browse files
committed
Add support for most recent PHP version
1 parent 308acfc commit 461a471

File tree

5 files changed

+20
-22
lines changed

5 files changed

+20
-22
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,10 @@ jobs:
1313
strategy:
1414
matrix:
1515
php-version:
16-
- "7.1"
17-
- "7.2"
18-
- "7.3"
19-
- "7.4"
20-
- "8.0"
2116
- "8.1"
17+
- "8.2"
18+
- "8.3"
19+
- "8.4"
2220

2321
steps:
2422
- uses: actions/checkout@v2
@@ -34,7 +32,7 @@ jobs:
3432

3533
- name: Cache Composer packages
3634
id: composer-cache
37-
uses: actions/cache@v2
35+
uses: actions/cache@v4
3836
with:
3937
path: vendor
4038
key: ${{ runner.os }}-php-composer-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
@@ -60,7 +58,7 @@ jobs:
6058
- name: Setup PHP
6159
uses: shivammathur/setup-php@v2
6260
with:
63-
php-version: "7.4"
61+
php-version: "8.4"
6462
ini-values: post_max_size=256M, max_execution_time=180
6563
coverage: xdebug
6664

@@ -91,7 +89,7 @@ jobs:
9189
- name: Setup PHP
9290
uses: shivammathur/setup-php@v2
9391
with:
94-
php-version: "7.4"
92+
php-version: "8.4"
9593
ini-values: post_max_size=256M, max_execution_time=180
9694

9795
- name: Install dependencies
@@ -102,4 +100,4 @@ jobs:
102100
run: composer check-style
103101

104102
- name: Run static analyse
105-
run: composer psalm
103+
run: composer psalm

composer.json

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,18 @@
99
}
1010
],
1111
"require": {
12-
"php": ">=7.1",
12+
"php": ">=8.1",
1313
"ext-json": "*"
1414
},
1515
"require-dev": {
1616
"ext-gettext": "*",
17+
"php-coveralls/php-coveralls": "^2.7",
18+
"phpmd/phpmd": "^2.15",
19+
"phpunit/phpunit": "^9.6",
1720
"sokil/php-isocodes-db-i18n": "^4.0.0",
18-
"phpunit/phpunit": ">=7.5.20",
19-
"php-coveralls/php-coveralls": "^2.1",
20-
"squizlabs/php_codesniffer": "^3.4",
21-
"phpmd/phpmd" : "@stable",
21+
"squizlabs/php_codesniffer": "^3.11",
2222
"symfony/translation": "^4.4.17|^5.2",
23-
"vimeo/psalm": "^4.3",
24-
"infection/infection": ">=0.11.5"
23+
"vimeo/psalm": "^4.30"
2524
},
2625
"autoload": {
2726
"psr-4": {
@@ -53,6 +52,7 @@
5352
"config": {
5453
"allow-plugins": {
5554
"infection/extension-installer": true
56-
}
55+
},
56+
"sort-packages": true
5757
}
5858
}

src/AbstractDatabase.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ abstract class AbstractDatabase implements \Iterator, \Countable
5050
* @throws \RuntimeException when base directory not specified and directory can not be located automatically
5151
*/
5252
public function __construct(
53-
string $baseDirectory = null,
54-
TranslationDriverInterface $translationDriver = null
53+
?string $baseDirectory = null,
54+
?TranslationDriverInterface $translationDriver = null
5555
) {
5656
if (empty($baseDirectory)) {
5757
// Require external database in "sokil/php-isocodes-db-*" packages

src/IsoCodesFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ class IsoCodesFactory
6161
private $translationDriver;
6262

6363
public function __construct(
64-
string $baseDirectory = null,
65-
TranslationDriverInterface $translationDriver = null
64+
?string $baseDirectory = null,
65+
?TranslationDriverInterface $translationDriver = null
6666
) {
6767
$this->baseDirectory = $baseDirectory;
6868
$this->translationDriver = $translationDriver ?? new GettextExtensionDriver();

tests/docker/docker-php-entrypoint

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ echo "uk_UA.UTF-8 UTF-8" > /etc/locale.gen
1414
locale-gen
1515

1616
# run tests
17-
/php-isocodes/vendor/bin/phpunit -c /php-isocodes/tests/phpunit.xml /php-isocodes/tests
17+
/php-isocodes/vendor/bin/phpunit /php-isocodes/tests

0 commit comments

Comments
 (0)