Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
root = true

[*]
end_of_line = lf
insert_final_newline = true
indent_style = space
indent_size = 4
trim_trailing_whitespace = true

[*.{json,xml,yaml,yml}]
indent_size = 2
35 changes: 35 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: PHPStan

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read

jobs:
phpstan:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Composer Cache
uses: actions/cache@v4
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
- uses: php-actions/composer@v6
- name: Gather PHP Paths
id: gather-php-paths
run: |
# Gather all the directories that contain PHP files and all the root level php files, too.
{
printf 'paths='
git ls-files '*.php' | awk -v ORS=' ' -F / '!$2 { print; next; } !s[$1]++ { print $1 }'
} >> "$GITHUB_OUTPUT"
- uses: php-actions/phpstan@v3
with:
path: ${{ steps.gather-php-paths.outputs.paths }}
23 changes: 23 additions & 0 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: PHPUnit

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
build-test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Composer Cache
uses: actions/cache@v4
with:
path: /tmp/composer-cache
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
- uses: php-actions/composer@v6
- uses: php-actions/phpunit@v3
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/vendor/
.phpunit.result.cache
6 changes: 5 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@
"email": "[email protected]"
}
],
"require": {}
"require-dev": {
"phpstan/phpstan": "^2.1",
"rector/rector": "^2.0",
"phpunit/phpunit": "^12.2"
}
}
Loading
Loading