Skip to content

Commit 13afcb9

Browse files
committed
feat!: upgrade for php 8.5
Signed-off-by: Emilien Escalle <emilien.escalle@escemi.com>
1 parent db0bf55 commit 13afcb9

File tree

12 files changed

+111
-85
lines changed

12 files changed

+111
-85
lines changed

.devcontainer/devcontainer.json

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"name": "Debian",
3+
"image": "mcr.microsoft.com/devcontainers/base:bullseye",
4+
"features": {
5+
"ghcr.io/devcontainers/features/docker-in-docker:2": {},
6+
"ghcr.io/devcontainers/features/github-cli:1": {}
7+
},
8+
"remoteEnv": {
9+
"GITHUB_TOKEN": "${localEnv:GITHUB_TOKEN}"
10+
},
11+
"customizations": {
12+
"vscode": {
13+
"extensions": [
14+
"eamodio.gitlens",
15+
"github.copilot",
16+
"github.copilot-chat",
17+
"github.vscode-github-actions",
18+
"ms-vscode.makefile-tools",
19+
"bmewburn.vscode-intelephense-client",
20+
"calebporzio.better-phpunit"
21+
],
22+
"settings": {
23+
"terminal.integrated.defaultProfile.linux": "zsh"
24+
},
25+
"mcp": {
26+
"servers": {}
27+
}
28+
}
29+
}
30+
}

.github/dependabot.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,18 @@ updates:
1313
dev-dependencies:
1414
dependency-type: development
1515

16+
- package-ecosystem: "docker"
17+
open-pull-requests-limit: 20
18+
directory: "/"
19+
schedule:
20+
interval: "weekly"
21+
day: friday
22+
time: "04:00"
23+
groups:
24+
docker-dependencies:
25+
patterns:
26+
- "*"
27+
1628
- package-ecosystem: github-actions
1729
directory: "/"
1830
schedule:
@@ -23,3 +35,11 @@ updates:
2335
github-actions-dependencies:
2436
patterns:
2537
- "*"
38+
39+
- package-ecosystem: "devcontainers"
40+
open-pull-requests-limit: 20
41+
directory: "/"
42+
schedule:
43+
interval: weekly
44+
day: friday
45+
time: "04:00"

.github/workflows/__shared-ci.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,18 @@ permissions: {}
77

88
jobs:
99
checks:
10+
runs-on: ubuntu-latest
1011
permissions:
1112
contents: read
1213
id-token: write
13-
1414
strategy:
1515
matrix:
1616
include:
17-
- php-versions: "8.1"
1817
- php-versions: "8.2"
1918
- php-versions: "8.3"
2019
- php-versions: "8.4"
20+
- php-versions: "8.5"
2121
stable: true
22-
23-
runs-on: ubuntu-latest
2422
steps:
2523
- name: Checkout
2624
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1

.github/workflows/greetings.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions: {}
1010

1111
jobs:
1212
greetings:
13-
uses: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml@666b7b6eb000db3e8614647871fa60c9f1eb7179 # 0.31.4
13+
uses: hoverkraft-tech/ci-github-common/.github/workflows/greetings.yml@b17226e57c8ef31f860719766656ebb6df017218 # 0.31.6
1414
permissions:
1515
contents: read
1616
issues: write

.github/workflows/main-ci.yml

Lines changed: 24 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -20,73 +20,32 @@ jobs:
2020
id-token: write
2121
secrets: inherit
2222

23-
docs-generate-site:
24-
runs-on: ubuntu-latest
25-
needs: ci
26-
permissions:
27-
contents: read
28-
steps:
29-
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
30-
with:
31-
persist-credentials: false
32-
33-
- run: |
34-
mkdir -p ./_site
35-
36-
echo -e "theme: jekyll-theme-cayman" > ./_site/_config.yml
37-
38-
to_title_case() {
39-
echo "$1" | awk '{
40-
for (i=1; i<=NF; i++) {
41-
$i = toupper(substr($i, 1, 1)) tolower(substr($i, 2))
42-
}
43-
print
44-
}'
45-
}
46-
47-
create_site_page() {
48-
page="$1"
49-
title="$(to_title_case "$2")"
50-
content_path="$3"
51-
echo -e "---\nlayout: default\ntitle: $title\n---\n" > "$page"
52-
echo "$(sed -r s"/(\{%[^%]+%\})/{% raw %}\1{% endraw %}/g" "$content_path")" >> "$page"
53-
}
54-
55-
create_site_page "./_site/index.md" "Home" "./README.md"
56-
57-
for filepath in ./docs/*.md; do
58-
filename=$(basename -- "$filepath")
59-
section="${filename%.*}"
60-
mkdir -p "./_site/$section"
61-
create_site_page "./_site/$section/index.md" "$section" "$filepath"
62-
done
63-
64-
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
65-
with:
66-
name: docs-site
67-
path: ./_site
68-
6923
docs-generate-phpdoc:
7024
runs-on: ubuntu-latest
7125
needs: ci
72-
permissions:
73-
contents: read
26+
container: phpdoc/phpdoc:3
27+
env:
28+
ARTIFACT_PATH: ./_site
29+
outputs:
30+
artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }}
31+
artifact-path: ${{ env.ARTIFACT_PATH }}
7432
steps:
7533
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
7634
with:
7735
persist-credentials: false
7836

7937
- name: 📃 Generate PHP documentation
80-
run: docker run --rm -v $(pwd):/data phpdoc/phpdoc:3 -d ./src -t ./_site/phpdoc
38+
run: phpdoc run -d ./src -t $ARTIFACT_PATH/phpdoc
8139

8240
- uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
41+
id: upload-artifact
8342
with:
8443
name: docs-phpdoc
85-
path: ./_site
44+
path: ${{ env.ARTIFACT_PATH }}
8645

8746
docs-publish:
8847
name: Publish documentation
89-
needs: [docs-generate-site, docs-generate-phpdoc]
48+
needs: docs-generate-phpdoc
9049
runs-on: ubuntu-latest
9150
permissions:
9251
pages: write
@@ -95,24 +54,23 @@ jobs:
9554
name: github-pages
9655
url: ${{ steps.deployment.outputs.page_url }}
9756
steps:
98-
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
57+
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
9958
with:
100-
pattern: "docs-*"
101-
path: ./
102-
merge-multiple: true
103-
104-
- name: ⚙️ Setup Pages
105-
uses: actions/configure-pages@983d7736d9b0ae728b81ab479565c72886d7745b # v5.0.0
59+
persist-credentials: false
10660

107-
- name: Build with Jekyll
108-
uses: actions/jekyll-build-pages@44a6e6beabd48582f863aeeb6cb2151cc1716697 # v1.0.13
61+
- uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
10962
with:
110-
source: ./
111-
destination: ./_site
63+
artifact-ids: ${{ needs.docs-generate-phpdoc.outputs.artifact-id }}
64+
path: ${{ needs.docs-generate-phpdoc.outputs.artifact-path }}
11265

113-
- name: Upload artifact
114-
uses: actions/upload-pages-artifact@7b1f4a764d45c48632c6b24a0339c27f5614fb0b # v4.0.0
66+
- uses: hoverkraft-tech/ci-github-publish/actions/deploy/jekyll@84e8ace407055e7a40ba6670a8c697e1ce2dfafa # 0.20.1
67+
id: build
68+
with:
69+
site-path: ${{ needs.docs-generate-phpdoc.outputs.artifact-path }}
70+
pages: |
71+
./docs/*.md
11572
116-
- name: 🚀 Deploy to GitHub Pages
73+
- uses: hoverkraft-tech/ci-github-publish/actions/deploy/github-pages@84e8ace407055e7a40ba6670a8c697e1ce2dfafa # 0.20.1
11774
id: deployment
118-
uses: actions/deploy-pages@d6db90164ac5ed86f2b6aed7e0febac5b3c0c03e # v4.0.5
75+
with:
76+
build-path: ${{ steps.build.outputs.build-path }}

.github/workflows/need-fix-to-issue.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ permissions: {}
1717

1818
jobs:
1919
main:
20-
uses: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml@666b7b6eb000db3e8614647871fa60c9f1eb7179 # 0.31.4
20+
uses: hoverkraft-tech/ci-github-common/.github/workflows/need-fix-to-issue.yml@0.31.6
2121
permissions:
2222
contents: read
2323
issues: write
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
---
2+
name: "Prepare release"
3+
4+
on:
5+
push:
6+
branches: [main]
7+
pull_request:
8+
types: [opened, reopened, synchronize]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
permissions: {}
15+
16+
jobs:
17+
release:
18+
uses: hoverkraft-tech/ci-github-publish/.github/workflows/prepare-release.yml@84e8ace407055e7a40ba6670a8c697e1ce2dfafa # 0.20.1
19+
permissions:
20+
contents: write
21+
id-token: write
22+
pull-requests: write

.github/workflows/semantic-pull-request.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
---
21
name: "Pull Request - Semantic Lint"
32

43
on:
@@ -12,7 +11,7 @@ permissions: {}
1211

1312
jobs:
1413
main:
15-
uses: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml@666b7b6eb000db3e8614647871fa60c9f1eb7179 # 0.31.4
14+
uses: hoverkraft-tech/ci-github-common/.github/workflows/semantic-pull-request.yml@b17226e57c8ef31f860719766656ebb6df017218 # 0.31.6
1615
permissions:
1716
contents: write
1817
pull-requests: write

.github/workflows/stale.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ permissions: {}
88

99
jobs:
1010
main:
11-
uses: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml@666b7b6eb000db3e8614647871fa60c9f1eb7179 # 0.31.4
11+
uses: hoverkraft-tech/ci-github-common/.github/workflows/stale.yml@0.31.6
1212
permissions:
1313
issues: write
1414
pull-requests: write

Makefile

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
PHP_VERSION=8.4
1+
PHP_VERSION=8.5
22
PROJECT_NAME=$(shell basename $(CURDIR))
33
UID=$(shell id -u)
44
GID=$(shell id -g)
@@ -58,8 +58,7 @@ phpstan: ## Execute PHPStan for given PHP version
5858
@$(call run-php,composer phpstan -- $(filter-out $@,$(MAKECMDGOALS)))
5959

6060
ci: ## Execute CI scripts for given PHP version
61-
$(MAKE) build-php
62-
$(MAKE) install
61+
$(MAKE) setup
6362
@$(call run-php,composer ci -- $(filter-out $@,$(MAKECMDGOALS)))
6463

6564
generate-css-referentials: ## Generate referentials for given PHP version

0 commit comments

Comments
 (0)