Skip to content

Commit 2a63f2a

Browse files
committed
Update to PHP 8.2+
* Centralised GHA Workflows * Migrate from Dependabot to Renovate * Raise minimum PHP version to 8.2
1 parent ee5e35a commit 2a63f2a

23 files changed

+3505
-2072
lines changed

.editorconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,14 @@ trim_trailing_whitespace = true
1010
[*.json]
1111
indent_size = 2
1212

13+
[*.yml]
14+
indent_size = 2
15+
16+
[*.yaml]
17+
indent_size = 2
18+
1319
[Makefile]
1420
indent_style = tab
21+
22+
[*.neon]
23+
indent_style = tab

.gitattributes

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
# Ignoring files for distribution archieves
2-
examples/ export-ignore
2+
.github/ export-ignore
3+
etc/ export-ignore
34
tests/ export-ignore
4-
.travis.yml export-ignore
5-
.gitignore export-ignore
5+
var/ export-ignore
6+
.devcontainer.json export-ignore
7+
.editorconfig export-ignore
68
.gitattributes export-ignore
7-
.scrutinizer.yml export-ignore
8-
phpunit.xml.dist export-ignore
9+
.gitignore export-ignore
10+
CONTRIBUTING.md export-ignore
11+
infection.json.dist export-ignore
12+
Makefile export-ignore
13+
README.md export-ignore

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github: WyriHaximus
1+
github: WyriHaximus

.github/dependabot.yml

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

.github/renovate.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
3+
"extends": [
4+
"github>WyriHaximus/renovate-config:php-package"
5+
]
6+
}

.github/workflows/ci.yml

Lines changed: 8 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -6,178 +6,12 @@ on:
66
- 'master'
77
- 'refs/heads/v[0-9]+.[0-9]+.[0-9]+'
88
pull_request:
9+
## This workflow needs the `pull-request` permissions to work for the package diffing
10+
## Refs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions
11+
permissions:
12+
pull-requests: write
13+
contents: read
914
jobs:
10-
supported-versions-matrix:
11-
name: Supported Versions Matrix
12-
runs-on: ubuntu-latest
13-
needs:
14-
- lint-yaml
15-
- lint-json
16-
outputs:
17-
version: ${{ steps.supported-versions-matrix.outputs.version }}
18-
steps:
19-
- uses: actions/checkout@v1
20-
- id: supported-versions-matrix
21-
uses: WyriHaximus/github-action-composer-php-versions-in-range@v1
22-
supported-checks-matrix:
23-
name: Supported Checks Matrix
24-
runs-on: ubuntu-latest
25-
needs:
26-
- lint-yaml
27-
- composer-install
28-
outputs:
29-
check: ${{ steps.supported-checks-matrix.outputs.check }}
30-
steps:
31-
- uses: actions/checkout@v1
32-
- id: supported-checks-matrix
33-
name: Generate check
34-
run: |
35-
printf "Checks found: %s\r\n" $(make task-list-ci)
36-
printf "::set-output name=check::%s" $(make task-list-ci)
37-
composer-install:
38-
strategy:
39-
fail-fast: false
40-
matrix:
41-
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
42-
composer: [lowest, current, highest]
43-
needs:
44-
- lint-yaml
45-
- lint-json
46-
- supported-versions-matrix
47-
runs-on: ubuntu-latest
48-
container:
49-
image: ghcr.io/wyrihaximusnet/php:${{ matrix.php }}-nts-buster-dev-root
50-
steps:
51-
- uses: actions/checkout@v1
52-
- name: Cache composer packages
53-
uses: actions/cache@v1
54-
with:
55-
path: ./vendor/
56-
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
57-
- name: Install Dependencies
58-
run: composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
59-
if: matrix.composer == 'lowest'
60-
- name: Install Dependencies
61-
run: composer install --ansi --no-progress --no-interaction --prefer-dist -o
62-
if: matrix.composer == 'current'
63-
- name: Install Dependencies
64-
run: composer update --ansi --no-progress --no-interaction --prefer-dist -o
65-
if: matrix.composer == 'highest'
66-
qa:
67-
name: Run ${{ matrix.check }} on PHP ${{ matrix.php }} with ${{ matrix.composer }} dependency preference (Linux)
68-
strategy:
69-
fail-fast: false
70-
matrix:
71-
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
72-
composer: [lowest, current, highest]
73-
check: ${{ fromJson(needs.supported-checks-matrix.outputs.check) }}
74-
needs:
75-
- lint-yaml
76-
- lint-json
77-
- composer-install
78-
- supported-checks-matrix
79-
- supported-versions-matrix
80-
runs-on: ubuntu-latest
81-
container:
82-
image: ghcr.io/wyrihaximusnet/php:${{ matrix.php }}-nts-buster-dev-root
83-
steps:
84-
- uses: actions/checkout@v1
85-
- name: Cache composer packages
86-
uses: actions/cache@v1
87-
with:
88-
path: ./vendor/
89-
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
90-
- name: Install Dependencies
91-
run: (test -f vendor && true ) || composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
92-
if: matrix.composer == 'lowest'
93-
- name: Install Dependencies
94-
run: (test -f vendor && true ) || composer install --ansi --no-progress --no-interaction --prefer-dist -o
95-
if: matrix.composer == 'current'
96-
- name: Install Dependencies
97-
run: (test -f vendor && true ) || composer update --ansi --no-progress --no-interaction --prefer-dist -o
98-
if: matrix.composer == 'highest'
99-
- name: Fetch Tags
100-
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
101-
if: matrix.check == 'backward-compatibility-check'
102-
- run: make ${{ matrix.check }}
103-
env:
104-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
105-
COVERALLS_RUN_LOCALLY: ${{ secrets.COVERALLS_RUN_LOCALLY }}
106-
unittests-directly-on-os:
107-
name: Run unit tests on PHP ${{ matrix.php }} with ${{ matrix.composer }} dependency preference (${{ matrix.os }})
108-
strategy:
109-
fail-fast: false
110-
matrix:
111-
os: [ubuntu-latest, windows-latest, macos-latest]
112-
php: ${{ fromJson(needs.supported-versions-matrix.outputs.version) }}
113-
composer: [lowest, current, highest]
114-
needs:
115-
- lint-yaml
116-
- lint-json
117-
- composer-install
118-
- supported-versions-matrix
119-
runs-on: ${{ matrix.os }}
120-
steps:
121-
- uses: actions/checkout@v1
122-
- name: Setup PHP, extensions and composer with shivammathur/setup-php
123-
uses: shivammathur/setup-php@v2
124-
with:
125-
php-version: ${{ matrix.php }}
126-
coverage: xdebug, pcov
127-
- name: Cache composer packages
128-
uses: actions/cache@v1
129-
with:
130-
path: ./vendor/
131-
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
132-
- name: Install Dependencies
133-
run: (test -f vendor && true ) || composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
134-
if: matrix.composer == 'lowest'
135-
- name: Install Dependencies
136-
run: (test -f vendor && true ) || composer install --ansi --no-progress --no-interaction --prefer-dist -o
137-
if: matrix.composer == 'current'
138-
- name: Install Dependencies
139-
run: (test -f vendor && true ) || composer update --ansi --no-progress --no-interaction --prefer-dist -o
140-
if: matrix.composer == 'highest'
141-
- name: Fetch Tags
142-
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
143-
if: matrix.check == 'backward-compatibility-check'
144-
- run: |
145-
./vendor/bin/phpunit -c ./etc/qa/phpunit.xml
146-
env:
147-
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
148-
COVERALLS_RUN_LOCALLY: ${{ secrets.COVERALLS_RUN_LOCALLY }}
149-
lint-yaml:
150-
name: Lint YAML
151-
runs-on: ubuntu-latest
152-
steps:
153-
- uses: actions/checkout@v1
154-
- name: yaml-lint
155-
uses: ibiqlik/action-yamllint@v3
156-
with:
157-
config_data: |
158-
extends: default
159-
ignore: |
160-
/.git/
161-
rules:
162-
line-length: disable
163-
document-start: disable
164-
truthy: disable
165-
lint-json:
166-
name: Lint JSON
167-
runs-on: ubuntu-latest
168-
steps:
169-
- uses: actions/checkout@v1
170-
- name: json-syntax-check
171-
uses: limitusus/json-syntax-check@v1
172-
with:
173-
pattern: "\\.json$"
174-
check-mark:
175-
name: ✔️
176-
needs:
177-
- lint-yaml
178-
- lint-json
179-
- qa
180-
- unittests-directly-on-os
181-
runs-on: ubuntu-latest
182-
steps:
183-
- run: echo "✔️"
15+
ci:
16+
name: Continuous Integration
17+
uses: WyriHaximus/github-workflows/.github/workflows/package.yaml@main

.github/workflows/craft-release.yaml

Lines changed: 0 additions & 56 deletions
This file was deleted.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release Management
2+
on:
3+
pull_request:
4+
types:
5+
- opened
6+
- labeled
7+
- unlabeled
8+
- synchronize
9+
- reopened
10+
milestone:
11+
types:
12+
- closed
13+
permissions:
14+
contents: write
15+
issues: write
16+
pull-requests: write
17+
jobs:
18+
release-managment:
19+
name: Create Release
20+
uses: WyriHaximus/github-workflows/.github/workflows/package-release-managment.yaml@main
21+
with:
22+
milestone: ${{ github.event.milestone.title }}
23+
description: ${{ github.event.milestone.title }}

0 commit comments

Comments
 (0)