Skip to content

Commit e7156ea

Browse files
committed
Merge branch 'new' into development
# Conflicts: # composer.json
2 parents 5efd2aa + b13a3b7 commit e7156ea

File tree

7 files changed

+30
-27
lines changed

7 files changed

+30
-27
lines changed

.github/workflows/tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88

99
jobs:
1010
tests:
11-
runs-on: ubuntu-20.04
11+
runs-on: ubuntu-22.04
1212
timeout-minutes: 10
1313

1414
strategy:
@@ -74,7 +74,7 @@ jobs:
7474
DB_HOST: 127.0.0.1
7575
MEMCACHED_HOST: 127.0.0.1
7676
REDIS_HOST: 127.0.0.1
77-
run: vendor/bin/phpunit --verbose
77+
run: vendor/bin/phpunit
7878

7979
- name: Upload coverage results to Coveralls
8080
env:
@@ -85,8 +85,8 @@ jobs:
8585
composer global require php-coveralls/php-coveralls
8686
php-coveralls --coverage_clover=build/logs/clover.xml -v
8787
88-
tests-last:
89-
runs-on: ubuntu-20.04
88+
tests-latest:
89+
runs-on: ubuntu-22.04
9090
timeout-minutes: 10
9191

9292
strategy:
@@ -114,7 +114,7 @@ jobs:
114114
ports:
115115
- 6379:6379
116116

117-
name: PHP 8.2 - Last
117+
name: PHP Latest
118118

119119
steps:
120120
- name: Checkout
@@ -123,7 +123,7 @@ jobs:
123123
- name: Setup PHP
124124
uses: shivammathur/setup-php@v2
125125
with:
126-
php-version: 8.2
126+
php-version: latest
127127
tools: composer
128128
coverage: xdebug
129129

@@ -136,4 +136,4 @@ jobs:
136136
DB_HOST: 127.0.0.1
137137
MEMCACHED_HOST: 127.0.0.1
138138
REDIS_HOST: 127.0.0.1
139-
run: vendor/bin/phpunit --verbose
139+
run: vendor/bin/phpunit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ build/
44
raw-tests/
55
vendor/
66
.php-cs-fixer.cache
7+
.phpunit.cache
78
.phpunit.result.cache
89
composer.lock
910
composer.phar

.gitlab-ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ test:php:
3737
- build/docs/
3838
coverage: '/^\s*Lines:\s*\d+.\d+\%/'
3939

40-
test:php-last:
41-
image: registry.gitlab.com/aplus-framework/images/base:3
40+
test:php-latest:
41+
image: registry.gitlab.com/aplus-framework/images/base:latest
4242
stage: test
4343
timeout: 10 minutes
4444
cache:

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"jetbrains/phpstorm-attributes": "^1.0",
6969
"phpmd/phpmd": "^2.13",
7070
"phpstan/phpstan": "^1.10",
71-
"phpunit/phpunit": "^9.6"
71+
"phpunit/phpunit": "^10.5"
7272
},
7373
"minimum-stability": "dev",
7474
"prefer-stable": true,

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,9 @@ services:
99
depends_on:
1010
- mariadb
1111
tty: true
12-
package-last:
13-
image: registry.gitlab.com/aplus-framework/images/package:3
14-
container_name: package-mvc-last
12+
package-latest:
13+
image: registry.gitlab.com/aplus-framework/images/package:latest
14+
container_name: package-mvc-latest
1515
working_dir: /package
1616
volumes:
1717
- .:/package

phpunit.xml.dist

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,10 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" backupGlobals="false"
3-
bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true"
4-
convertNoticesToExceptions="true" convertWarningsToExceptions="true" stopOnError="false"
5-
stopOnFailure="false" stopOnIncomplete="false" stopOnSkipped="false"
6-
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
7-
<coverage processUncoveredFiles="true">
8-
<include>
9-
<directory suffix=".php">src</directory>
10-
</include>
3+
bootstrap="vendor/autoload.php" colors="true" stopOnError="false" stopOnFailure="false"
4+
stopOnIncomplete="false" stopOnSkipped="false"
5+
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.5/phpunit.xsd"
6+
cacheDirectory=".phpunit.cache">
7+
<coverage>
118
<report>
129
<clover outputFile="build/coverage/clover.xml"/>
1310
<html outputDirectory="build/coverage"/>
@@ -28,4 +25,9 @@
2825
<env name="REDIS_HOST" value="redis"/>
2926
<env name="XDEBUG_MODE" value="coverage"/>
3027
</php>
28+
<source>
29+
<include>
30+
<directory suffix=".php">src</directory>
31+
</include>
32+
</source>
3133
</phpunit>

tests/LanguagesTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@
1818
*/
1919
final class LanguagesTest extends TestCase
2020
{
21-
protected string $langDir = __DIR__ . '/../src/Languages/';
21+
protected static string $langDir = __DIR__ . '/../src/Languages/';
2222

2323
/**
2424
* @return array<int,string>
2525
*/
2626
protected function getCodes() : array
2727
{
2828
// @phpstan-ignore-next-line
29-
$codes = \array_filter((array) \glob($this->langDir . '*'), 'is_dir');
30-
$length = \strlen($this->langDir);
29+
$codes = \array_filter((array) \glob(self::$langDir . '*'), 'is_dir');
30+
$length = \strlen(self::$langDir);
3131
$result = [];
3232
foreach ($codes as &$dir) {
3333
if ($dir === false) {
@@ -47,7 +47,7 @@ protected function getCodes() : array
4747
public function testKeys(array $rules, string $file) : void
4848
{
4949
foreach ($this->getCodes() as $code) {
50-
$lines = require $this->langDir . $code . '/' . $file . '.php';
50+
$lines = require self::$langDir . $code . '/' . $file . '.php';
5151
$lines = \array_keys($lines);
5252
\sort($lines);
5353
self::assertSame($rules, $lines, 'File: ' . $file . '. Language: ' . $code);
@@ -57,15 +57,15 @@ public function testKeys(array $rules, string $file) : void
5757
/**
5858
* @return array<string,array<mixed>>
5959
*/
60-
public function languageProvider() : array
60+
public static function languageProvider() : array
6161
{
6262
$files = [
6363
'validation',
6464
];
6565
$data = [];
6666
foreach ($files as $file) {
6767
$data[$file] = [
68-
\array_keys(require $this->langDir . 'en/' . $file . '.php'),
68+
\array_keys(require self::$langDir . 'en/' . $file . '.php'),
6969
$file,
7070
];
7171
}

0 commit comments

Comments
 (0)