Skip to content

Commit e669eb8

Browse files
authored
Upgrade CI/CD, fix issues, maintenance (#233)
1 parent 443a4c2 commit e669eb8

26 files changed

Lines changed: 852 additions & 1778 deletions

.github/workflows/codesniffer.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
name: "Codesniffer"
2+
3+
on:
4+
pull_request:
5+
6+
push:
7+
branches: ["*"]
8+
9+
schedule:
10+
- cron: "0 8 * * 1"
11+
12+
jobs:
13+
codesniffer:
14+
name: "Codesniffer"
15+
uses: contributte/.github/.github/workflows/codesniffer.yml@v1
16+
with:
17+
php: "8.4"

.github/workflows/main.yaml

Lines changed: 0 additions & 193 deletions
This file was deleted.

.github/workflows/phpstan.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "Phpstan"
2+
3+
on:
4+
pull_request:
5+
6+
push:
7+
branches: ["*"]
8+
9+
schedule:
10+
- cron: "0 8 * * 1"
11+
12+
jobs:
13+
phpstan:
14+
name: "Phpstan"
15+
uses: contributte/.github/.github/workflows/phpstan.yml@v1
16+
with:
17+
php: "8.4"
18+
make: "init phpstan"

.github/workflows/tests.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: "Tester"
2+
3+
on:
4+
pull_request:
5+
6+
push:
7+
branches: ["*"]
8+
9+
schedule:
10+
- cron: "0 8 * * 1"
11+
12+
jobs:
13+
tester:
14+
name: "Tester"
15+
uses: contributte/.github/.github/workflows/tester.yml@v1
16+
with:
17+
php: "8.4"
18+
make: "init tests"

Makefile

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
############################################################
22
# PROJECT ##################################################
33
############################################################
4-
.PHONY: project install setup clean
4+
.PHONY: project install setup clean init
55

66
project: install setup
77

8+
init: install setup
9+
810
install:
911
composer install
1012

@@ -30,7 +32,7 @@ csf:
3032
vendor/bin/codefixer app tests
3133

3234
phpstan:
33-
vendor/bin/phpstan analyse -c phpstan.neon --memory-limit=512M app tests/toolkit
35+
vendor/bin/phpstan analyse --memory-limit=512M
3436

3537
tests:
3638
vendor/bin/tester -s -p php --colors 1 -C tests

app/Controllers/AbstractController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<?php
2-
3-
declare(strict_types=1);
1+
<?php declare(strict_types = 1);
42

53
namespace App\Controllers;
64

@@ -16,4 +14,5 @@ public function __construct(ApiResponseFormatter $apiResponseFormatter)
1614
{
1715
$this->apiResponseFormatter = $apiResponseFormatter;
1816
}
17+
1918
}

app/Controllers/ErrorController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<?php
2-
3-
declare(strict_types=1);
1+
<?php declare(strict_types = 1);
42

53
namespace App\Controllers;
64

@@ -23,4 +21,5 @@ public function run(Request $request): Response
2321

2422
return new JsonResponse($this->apiResponseFormatter->formatException($exception));
2523
}
24+
2625
}

app/Controllers/LoginController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<?php
2-
3-
declare(strict_types=1);
1+
<?php declare(strict_types = 1);
42

53
namespace App\Controllers;
64

@@ -28,4 +26,5 @@ public function run(Request $request): Response
2826
{
2927
return new JsonResponse($this->apiResponseFormatter->formatMessage('Hello'));
3028
}
29+
3130
}

app/Controllers/PingController.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<?php
2-
3-
declare(strict_types=1);
1+
<?php declare(strict_types = 1);
42

53
namespace App\Controllers;
64

@@ -28,4 +26,5 @@ public function run(Request $request): Response
2826
{
2927
return new TextResponse('pong');
3028
}
29+
3130
}

app/Http/ApiResponseFormatter.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
<?php
2-
3-
declare(strict_types=1);
1+
<?php declare(strict_types = 1);
42

53
namespace App\Http;
64

@@ -45,4 +43,5 @@ public function formatException(Throwable $e): array
4543
'message' => $e->getMessage(),
4644
];
4745
}
46+
4847
}

0 commit comments

Comments
 (0)