Skip to content

Commit

Permalink
PHP 8.2+
Browse files Browse the repository at this point in the history
  • Loading branch information
WyriHaximus committed Dec 11, 2023
1 parent 08b45eb commit 353eea6
Show file tree
Hide file tree
Showing 24 changed files with 4,517 additions and 2,577 deletions.
23 changes: 23 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
root = true

[*]
charset = utf-8
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.json]
indent_size = 2

[*.yml]
indent_size = 2

[*.yaml]
indent_size = 2

[Makefile]
indent_style = tab

[*.neon]
indent_style = tab
15 changes: 11 additions & 4 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
.travis.yml export-ignore
.gitignore export-ignore
# Ignoring files for distribution archieves
.github/ export-ignore
etc/ export-ignore
tests/ export-ignore
var/ export-ignore
.devcontainer.json export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.scrutinizer.yml export-ignore
phpunit.xml.dist export-ignore
.gitignore export-ignore
CONTRIBUTING.md export-ignore
infection.json.dist export-ignore
Makefile export-ignore
README.md export-ignore
11 changes: 0 additions & 11 deletions .github/dependabot.yml

This file was deleted.

6 changes: 6 additions & 0 deletions .github/renovate.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"github>WyriHaximus/renovate-config:php-package"
]
}
120 changes: 12 additions & 108 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,113 +1,17 @@
name: Continuous Integration
on:
push:
branches:
- 'main'
- 'master'
- 'refs/heads/v[0-9]+.[0-9]+.[0-9]+'
pull_request:
## This workflow needs the `pull-request` permissions to work for the package diffing
## Refs: https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#permissions
permissions:
pull-requests: write
contents: read
jobs:
generate-checks-strategy:
name: Generate Checks
runs-on: ubuntu-latest
outputs:
check: ${{ steps.generate-checks-strategy.outputs.check }}
steps:
- uses: actions/checkout@v1
- id: generate-checks-strategy
name: Generate check
run: |
printf "Checks found: %s\r\n" $(make task-list-ci)
printf "::set-output name=check::%s" $(make task-list-ci)
lint:
runs-on: ubuntu-latest
steps:
- name: Lint Code Base
uses: docker://github/super-linter:v2.2.0
composer-install:
strategy:
fail-fast: false
matrix:
php: [7.4]
composer: [lowest, current, highest]
needs: lint
runs-on: ubuntu-latest
container:
image: ghcr.io/wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.12-dev-root
steps:
- uses: actions/checkout@v1
- name: Cache composer packages
uses: actions/cache@v1
with:
path: ./vendor/
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
- name: Install Dependencies
run: composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
if: matrix.composer == 'lowest'
- name: Install Dependencies
run: composer install --ansi --no-progress --no-interaction --prefer-dist -o
if: matrix.composer == 'current'
- name: Install Dependencies
run: composer update --ansi --no-progress --no-interaction --prefer-dist -o
if: matrix.composer == 'highest'
examples:
strategy:
fail-fast: false
matrix:
php: [7.4]
composer: [lowest, current, highest]
example: [echo, exception, json, sleep, versions]
needs: composer-install
runs-on: ubuntu-latest
container:
image: wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.12-dev-root
steps:
- uses: actions/checkout@v1
- name: Cache composer packages
uses: actions/cache@v1.0.1
with:
path: ./vendor/
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
- name: Install Dependencies
run: (test -f vendor && true ) || composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
if: matrix.composer == 'lowest'
- name: Install Dependencies
run: (test -f vendor && true ) || composer install --ansi --no-progress --no-interaction --prefer-dist -o
if: matrix.composer == 'current'
- name: Install Dependencies
run: (test -f vendor && true ) || composer update --ansi --no-progress --no-interaction --prefer-dist -o
if: matrix.composer == 'highest'
- name: 'Run Example: ${{ matrix.example }}'
run: php ./examples/${{ matrix.example }}.php
qa:
strategy:
fail-fast: false
matrix:
php: [7.4]
composer: [lowest, current, highest]
check: ${{ fromJson(needs.generate-checks-strategy.outputs.check) }}
needs:
- composer-install
- generate-checks-strategy
runs-on: ubuntu-latest
container:
image: ghcr.io/wyrihaximusnet/php:${{ matrix.php }}-zts-alpine3.12-dev-root
steps:
- uses: actions/checkout@v1
- name: Cache composer packages
uses: actions/cache@v1
with:
path: ./vendor/
key: ${{ matrix.composer }}-${{ matrix.php }}-${{ hashFiles('**/composer.lock') }}
- name: Install Dependencies
run: (test -f vendor && true ) || composer update --prefer-lowest --no-progress --ansi --no-interaction --prefer-dist -o
if: matrix.composer == 'lowest'
- name: Install Dependencies
run: (test -f vendor && true ) || composer install --ansi --no-progress --no-interaction --prefer-dist -o
if: matrix.composer == 'current'
- name: Install Dependencies
run: (test -f vendor && true ) || composer update --ansi --no-progress --no-interaction --prefer-dist -o
if: matrix.composer == 'highest'
- name: Fetch Tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* || true
if: matrix.check == 'backward-compatibility-check'
- run: make ${{ matrix.check }}
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
COVERALLS_RUN_LOCALLY: ${{ secrets.COVERALLS_RUN_LOCALLY }}
ci:
name: Continuous Integration
uses: WyriHaximus/github-workflows/.github/workflows/package.yaml@main
76 changes: 0 additions & 76 deletions .github/workflows/craft-release.yaml

This file was deleted.

18 changes: 0 additions & 18 deletions .github/workflows/label-sponsors.yml

This file was deleted.

23 changes: 23 additions & 0 deletions .github/workflows/release-managment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release Management
on:
pull_request:
types:
- opened
- labeled
- unlabeled
- synchronize
- reopened
milestone:
types:
- closed
permissions:
contents: write
issues: write
pull-requests: write
jobs:
release-managment:
name: Create Release
uses: WyriHaximus/github-workflows/.github/workflows/package-release-managment.yaml@main
with:
milestone: ${{ github.event.milestone.title }}
description: ${{ github.event.milestone.title }}
64 changes: 0 additions & 64 deletions .github/workflows/set-milestone-on-pr.yaml

This file was deleted.

6 changes: 4 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
var
vendor
var/*
!var/.gitkeep
vendor/
etc/qa/.phpunit.result.cache
Loading

0 comments on commit 353eea6

Please sign in to comment.