Skip to content

Commit 7f13136

Browse files
authored
Initial commit
0 parents  commit 7f13136

23 files changed

+773
-0
lines changed

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
indent_size = 4
6+
indent_style = space
7+
end_of_line = lf
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.md]
12+
trim_trailing_whitespace = false
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2

.gitattributes

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Path-based git attributes
2+
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
4+
# Ignore these folders when installed via composer
5+
/.github export-ignore
6+
/tests export-ignore
7+
/.editorconfig export-ignore
8+
/.gitattributes export-ignore
9+
/.gitignore export-ignore
10+
/phpstan.neon export-ignore
11+
/phpunit.xml.dist export-ignore
12+
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**Additional context**
27+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

.github/dependabot.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Please see the documentation for all configuration options:
2+
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference
3+
4+
version: 2
5+
updates:
6+
7+
- package-ecosystem: "github-actions"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"
11+
labels:
12+
- "dependencies"
13+
14+
- package-ecosystem: "composer"
15+
directory: "/"
16+
schedule:
17+
interval: "weekly"
18+
labels:
19+
- "dependencies"

.github/workflows/php.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: PHP tests
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
build:
11+
12+
strategy:
13+
matrix:
14+
php-versions: ['8,2', '8.3', '8.4']
15+
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
# https://github.com/marketplace/actions/checkout
20+
- name: Checkout
21+
uses: actions/checkout@v5
22+
23+
# https://github.com/marketplace/actions/setup-php-action
24+
- name: Setup PHP
25+
uses: shivammathur/setup-php@v2
26+
with:
27+
php-version: ${{ matrix.php-versions }}
28+
extensions: mbstring, intl
29+
ini-values: post_max_size=256M, max_execution_time=180
30+
tools: composer
31+
32+
- name: Check PHP version
33+
run: php -v
34+
35+
- name: Install dependencies
36+
run: composer install --prefer-dist
37+
38+
# https://github.com/marketplace/actions/check-php-syntax-errors
39+
- name: Check PHP syntax errors
40+
uses: overtrue/phplint@9
41+
42+
- name: Coding standards
43+
run: ./vendor/bin/phpcs
44+
45+
- name: PHPStan
46+
run: ./vendor/bin/phpstan
47+
48+
- name: PHPUnit
49+
run: ./vendor/bin/phpunit

.github/workflows/release.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: release-please
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
permissions:
9+
contents: write
10+
pull-requests: write
11+
12+
jobs:
13+
release-please:
14+
runs-on: ubuntu-latest
15+
steps:
16+
# Uses https://github.com/marketplace/actions/release-please-action
17+
- name: Create release
18+
id: release
19+
uses: google-github-actions/release-please-action@v4
20+
with:
21+
release-type: php

.gitignore

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
##
2+
# Add any project-specific ignore rules here
3+
# e.g. cache, package, build and file upload folders
4+
##
5+
6+
# Composer
7+
composer.lock
8+
/vendor
9+
10+
# CI
11+
.phpunit.result.cache
12+
.phplint.cache

.phpcs.xml.dist

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?xml version="1.0"?>
2+
3+
<!-- see https://github.com/squizlabs/PHP_CodeSniffer/wiki/Annotated-Ruleset -->
4+
<ruleset name="Studio 24">
5+
6+
<!-- One or more files and/or directories to check -->
7+
<file>src</file>
8+
<file>tests</file>
9+
10+
<!-- Ignore files that match this pattern -->
11+
<!-- <exclude-pattern>path/to/*</exclude-pattern> -->
12+
13+
<!-- Command line options -->
14+
<!-- see https://github.com/squizlabs/PHP_CodeSniffer/wiki/Usage -->
15+
<arg name="basepath" value="."/>
16+
<arg name="colors"/>
17+
<arg name="parallel" value="75"/>
18+
<arg value="np"/>
19+
20+
<!-- Coding standards rules to test for -->
21+
<rule ref="PSR12" />
22+
23+
<!-- Require strict types declare statement at top of PHP files -->
24+
<!-- Exclude tests from this rule -->
25+
<!-- see https://www.php.net/language.types.declarations#language.types.declarations.strict -->
26+
<rule ref="Generic.PHP.RequireStrictTypes">
27+
<exclude-pattern>tests/*</exclude-pattern>
28+
</rule>
29+
30+
<!-- Namespaces and classes MUST follow PSR-0.
31+
This means each class is in a file by itself, and is in a namespace of at least one level: a top-level vendor name. -->
32+
<!-- Exclude tests from this rule -->
33+
<rule ref="PSR1.Classes.ClassDeclaration">
34+
<exclude-pattern>tests/*</exclude-pattern>
35+
</rule>
36+
37+
</ruleset>

.phplint.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
path: ./
2+
jobs: 10
3+
extensions:
4+
- php
5+
exclude:
6+
- vendor

0 commit comments

Comments
 (0)