Skip to content
Open
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
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
root = true

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

[*.md]
trim_trailing_whitespace = false

[*.{yml,yaml}]
indent_size = 2

[*.{json,neon}]
indent_size = 4
26 changes: 13 additions & 13 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
# Path-based git attributes
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html

# Ignore all test and documentation with "export-ignore".
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.editorconfig export-ignore
/.php_cs.dist.php export-ignore
/.scrutinizer.yml export-ignore
/.styleci.yml export-ignore
/.travis.yml export-ignore
/phpunit.xml.dist export-ignore
/docs export-ignore
/tests export-ignore
/google-drive-service-account.json.example export-ignore
* text=auto eol=lf

# Files & directories excluded from the distributed package ("composer install")
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.editorconfig export-ignore
/phpstan.neon export-ignore
/pint.json export-ignore
/phpunit.xml.dist export-ignore
/tests export-ignore
/CONTRIBUTING.md export-ignore
/google-drive-service-account.json.example export-ignore
12 changes: 12 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
version: 2
updates:
- package-ecosystem: "composer"
directory: "/"
schedule:
interval: "weekly"
open-pull-requests-limit: 10

- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
31 changes: 31 additions & 0 deletions .github/workflows/code-style.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: code style

on:
push:
branches: [ "2.x", "3.x", "master", "main" ]

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"master", "main" ??

those branches do not exist

pull_request:
branches: [ "2.x", "3.x", "master", "main" ]

permissions:
contents: read

jobs:
pint:
runs-on: ubuntu-latest
name: Pint
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
coverage: none
tools: composer:v2

- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress

- name: Check code style (Pint)
run: vendor/bin/pint --test
32 changes: 32 additions & 0 deletions .github/workflows/static-analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: static analysis

on:
push:
branches: [ "2.x", "3.x", "master", "main" ]
pull_request:
branches: [ "2.x", "3.x", "master", "main" ]

permissions:
contents: read

jobs:
phpstan:
runs-on: ubuntu-latest
name: PHPStan
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: "8.3"
extensions: mbstring, fileinfo, json
coverage: none
tools: composer:v2

- name: Install dependencies
run: composer update --prefer-dist --no-interaction --no-progress

- name: Run PHPStan
run: vendor/bin/phpstan analyse --no-progress
51 changes: 51 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: tests

on:
push:
branches: [ "2.x", "3.x", "master", "main" ]
pull_request:
branches: [ "2.x", "3.x", "master", "main" ]

permissions:
contents: read

jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
php: [ "8.2", "8.3", "8.4" ]
dependency-version: [ prefer-lowest, prefer-stable ]

name: PHP ${{ matrix.php }} - ${{ matrix.dependency-version }}

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: mbstring, fileinfo, json
coverage: none
tools: composer:v2

- name: Get composer cache directory
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> "$GITHUB_OUTPUT"

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ matrix.os }}-php-${{ matrix.php }}-${{ matrix.dependency-version }}-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ matrix.os }}-php-${{ matrix.php }}-${{ matrix.dependency-version }}-

- name: Install dependencies
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-progress

- name: Execute tests
run: vendor/bin/phpunit
7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
.settings
.buildpath
.project
.idea
.vscode
composer.lock
composer.phar
google-drive-service-account.json
build
vendor
.phpunit.result.cache
.php_cs.cache
.phpunit.cache
.php-cs-fixer.cache
.pint.cache
.env
137 changes: 0 additions & 137 deletions .scrutinizer.yml

This file was deleted.

13 changes: 0 additions & 13 deletions .styleci.yml

This file was deleted.

15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

Loading