Skip to content

Commit 455d3bc

Browse files
committed
Merge branch 'refs/heads/2.x' into development
2 parents eb36806 + 6105056 commit 455d3bc

File tree

10 files changed

+26
-26
lines changed

10 files changed

+26
-26
lines changed

.github/workflows/tests.yml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,6 @@ jobs:
1111
runs-on: ubuntu-22.04
1212
timeout-minutes: 10
1313

14-
strategy:
15-
fail-fast: true
16-
1714
services:
1815
mariadb:
1916
image: mariadb
@@ -26,16 +23,16 @@ jobs:
2623
- 3306:3306
2724
options: --health-cmd="healthcheck.sh --su-mysql --connect --innodb_initialized" --health-interval=10s --health-timeout=5s --health-retries=3
2825

29-
name: PHP 8.1 - MariaDB
26+
name: PHP 8.3 - MariaDB
3027

3128
steps:
3229
- name: Checkout
33-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
3431

3532
- name: Setup PHP
3633
uses: shivammathur/setup-php@v2
3734
with:
38-
php-version: 8.1
35+
php-version: 8.3
3936
ini-values: mysqli.allow_local_infile=On
4037
tools: composer
4138
coverage: xdebug
@@ -78,9 +75,6 @@ jobs:
7875
runs-on: ubuntu-22.04
7976
timeout-minutes: 10
8077

81-
strategy:
82-
fail-fast: true
83-
8478
services:
8579
mariadb:
8680
image: mariadb
@@ -97,7 +91,7 @@ jobs:
9791

9892
steps:
9993
- name: Checkout
100-
uses: actions/checkout@v3
94+
uses: actions/checkout@v4
10195

10296
- name: Setup PHP
10397
uses: shivammathur/setup-php@v2

.gitlab-ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
image: registry.gitlab.com/aplus-framework/images/base:2
2+
image: registry.gitlab.com/aplus-framework/images/base:4
33

44
include:
55
- template: Security/SAST.gitlab-ci.yml

composer.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,13 @@
2929
}
3030
],
3131
"require": {
32-
"php": ">=8.1",
33-
"aplus/mvc": "^3.0"
32+
"php": ">=8.3",
33+
"aplus/mvc": "^4.0"
3434
},
3535
"require-dev": {
3636
"ext-xdebug": "*",
3737
"aplus/coding-standard": "^2.1",
38-
"aplus/testing": "^2.0",
38+
"aplus/testing": "^3.0",
3939
"ergebnis/composer-normalize": "^2.26",
4040
"phpmd/phpmd": "^2.12",
4141
"phpstan/phpstan": "^1.7"

docker-compose.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
version: "3"
22
services:
33
package:
4-
image: registry.gitlab.com/aplus-framework/images/package:2
5-
container_name: package-cli-commands
4+
image: registry.gitlab.com/aplus-framework/images/package:4
5+
container_name: package-dev-commands
66
working_dir: /package
77
volumes:
88
- .:/package
@@ -11,7 +11,7 @@ services:
1111
tty: true
1212
package-latest:
1313
image: registry.gitlab.com/aplus-framework/images/package:latest
14-
container_name: package-cli-commands-latest
14+
container_name: package-dev-commands-latest
1515
working_dir: /package
1616
volumes:
1717
- .:/package

src/AbstractMigration.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
abstract class AbstractMigration extends Command
2222
{
2323
protected string $migratorInstance = 'default';
24+
protected string $group = 'Migrations';
2425

2526
protected function runMigration(string $direction, int | string $arg = null) : void
2627
{
@@ -33,16 +34,16 @@ protected function runMigration(string $direction, int | string $arg = null) : v
3334
}
3435
$method = 'migrate' . $direction;
3536
CLI::write(
36-
CLI::style('Migrator Instance:', CLI::FG_YELLOW, formats: [CLI::FM_BOLD])
37+
CLI::style('Migrator Instance:', 'yellow', formats: ['bold'])
3738
. ' ' . $this->migratorInstance
3839
);
3940
CLI::newLine();
4041
$count = 0;
4142
$time = $start = \microtime(true);
4243
// @phpstan-ignore-next-line
4344
foreach (App::migrator($this->migratorInstance)->{$method}($arg) as $item) {
44-
CLI::write('- Migrated to ' . CLI::style($item, CLI::FG_GREEN)
45-
. ' in ' . CLI::style((string) \round(\microtime(true) - $time, 6), CLI::FG_YELLOW) . ' seconds.');
45+
CLI::write('- Migrated to ' . CLI::style($item, 'green')
46+
. ' in ' . CLI::style((string) \round(\microtime(true) - $time, 6), 'yellow') . ' seconds.');
4647
$time = \microtime(true);
4748
$count++;
4849
}

src/DatabaseCommand.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ abstract class DatabaseCommand extends Command
2525
protected array $options = [
2626
'--instance' => 'Database instance name.',
2727
];
28+
protected string $group = 'Database';
2829

2930
public function setDatabase() : static
3031
{

src/MakeRoutes.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ class MakeRoutes extends Command
3030
'-o' => 'Overwrite the file if it exists.',
3131
'-s' => 'Show file contents.',
3232
];
33+
protected string $group = 'Routing';
3334

3435
public function run() : void
3536
{

src/MigrationVersion.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class MigrationVersion extends Command
2222
{
2323
protected string $description = 'Shows last migration version name.';
2424
protected string $migratorInstance = 'default';
25+
protected string $group = 'Migrations';
2526

2627
public function run() : void
2728
{

src/Routes.php

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ class Routes extends Command
2424
protected string $description = 'Shows routes list.';
2525
protected string $usage = 'routes [options]';
2626
protected string $routerInstance = 'default';
27+
protected string $group = 'Routing';
2728

2829
public function run() : void
2930
{
@@ -32,15 +33,15 @@ public function run() : void
3233
$this->routerInstance = $instance;
3334
}
3435
CLI::write(
35-
CLI::style('Router Instance:', CLI::FG_YELLOW, formats: [CLI::FM_BOLD])
36+
CLI::style('Router Instance:', 'yellow', formats: ['bold'])
3637
. ' ' . $this->routerInstance
3738
);
3839
CLI::newLine();
3940
$data = $this->collectData();
4041
$count = \count($data);
4142
$this->showCollectionsSet($count);
4243
foreach ($data as $index => $collection) {
43-
CLI::write(CLI::style('Route Collection ' . ($index + 1), CLI::FG_YELLOW, formats: [CLI::FM_BOLD]));
44+
CLI::write(CLI::style('Route Collection ' . ($index + 1), 'yellow', formats: ['bold']));
4445
$this->writeHeader('Origin', $collection['origin']);
4546
if (isset($collection['name'])) {
4647
$this->writeHeader('Name', $collection['name']);
@@ -64,21 +65,21 @@ public function run() : void
6465
protected function showCollectionsSet(int $count) : void
6566
{
6667
if ($count === 0) {
67-
CLI::write('No Route Collection has been set.', CLI::FG_RED);
68+
CLI::write('No Route Collection has been set.', 'red');
6869
return;
6970
}
7071
$plural = $count > 1;
7172
CLI::write(
7273
'There ' . ($plural ? 'are' : 'is') . ' ' . $count
7374
. ' Route Collection' . ($plural ? 's' : '') . ' set:',
74-
CLI::FG_GREEN
75+
'green'
7576
);
7677
CLI::newLine();
7778
}
7879

7980
protected function writeHeader(string $field, string $value) : void
8081
{
81-
CLI::write(CLI::style($field . ':', formats: [CLI::FM_BOLD]) . ' ' . $value);
82+
CLI::write(CLI::style($field . ':', formats: ['bold']) . ' ' . $value);
8283
}
8384

8485
/**

src/Seed.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,14 @@ class Seed extends Command
2828
protected array $options = [
2929
'--instance' => 'Database instance name.',
3030
];
31+
protected string $group = 'Database';
3132

3233
public function run() : void
3334
{
3435
// @phpstan-ignore-next-line
3536
$this->databaseInstance = $this->getConsole()->getOption('instance') ?? 'default';
3637
CLI::write(
37-
CLI::style('Database Instance:', CLI::FG_YELLOW, formats: [CLI::FM_BOLD])
38+
CLI::style('Database Instance:', 'yellow', formats: ['bold'])
3839
. ' ' . $this->databaseInstance
3940
);
4041
CLI::newLine();

0 commit comments

Comments
 (0)