Skip to content

Commit efd5f85

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

File tree

5 files changed

+18
-18
lines changed

5 files changed

+18
-18
lines changed

.github/workflows/continuous-integration.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@ jobs:
1313
strategy:
1414
matrix:
1515
php-version:
16-
- "7.1"
17-
- "7.2"
18-
- "7.3"
1916
- "7.4"
2017
- "8.0"
2118
- "8.1"
19+
- "8.2"
20+
- "8.3"
21+
- "8.4"
2222

2323
steps:
2424
- uses: actions/checkout@v2
@@ -34,7 +34,7 @@ jobs:
3434

3535
- name: Cache Composer packages
3636
id: composer-cache
37-
uses: actions/cache@v2
37+
uses: actions/cache@v4
3838
with:
3939
path: vendor
4040
key: ${{ runner.os }}-php-composer-${{ matrix.php-version }}-${{ hashFiles('**/composer.lock') }}
@@ -102,4 +102,4 @@ jobs:
102102
run: composer check-style
103103

104104
- name: Run static analyse
105-
run: composer psalm
105+
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": ">=7.4",
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)