Skip to content

Commit fe3a6c8

Browse files
authored
Add support for php8.1 (#3)
1 parent eae6f57 commit fe3a6c8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1704
-3149
lines changed

.editorconfig

100755100644
+2-2
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,5 @@ trim_trailing_whitespace = true
1111
[*.md]
1212
trim_trailing_whitespace = false
1313

14-
[*.yml]
15-
indent_size = 2
14+
[*.{yml,yaml}]
15+
indent_size = 2

.gitattributes

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/.gitattributes export-ignore
2+
/.editorconfig export-ignore
3+
/.gitignore export-ignore
4+
/.travis.yml export-ignore
5+
/composer.lock export-ignore
6+
/CODE_OF_CONDUCT.md export-ignore
7+
/CONTRIBUTING.md export-ignore
8+
/phpunit.xml.dist export-ignore
9+
/docs export-ignore
10+
/tests export-ignore
11+
/.github export-ignore
12+
13+
*.php diff=php

.github/ISSUE_TEMPLATE/bug_report.md

+27
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: ''
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.
+20
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: ''
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/workflows/php.yml

+30-31
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,36 @@
1-
name: PHP Composer
1+
name: Tests
22

3-
on:
4-
push:
5-
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
3+
on: [push, pull_request]
84

95
jobs:
10-
build:
6+
test:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
fail-fast: true
10+
matrix:
11+
os: [ubuntu-latest, windows-latest]
12+
php: [8.1, 8.0, 7.4]
13+
stability: [prefer-stable]
1114

12-
runs-on: ubuntu-latest
15+
name: PHP${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
1316

1417
steps:
15-
- uses: actions/checkout@v2
16-
17-
- name: Validate composer.json and composer.lock
18-
run: composer validate
19-
20-
- name: Cache Composer packages
21-
id: composer-cache
22-
uses: actions/cache@v2
23-
with:
24-
path: vendor
25-
key: ${{ runner.os }}-node-${{ hashFiles('**/composer.lock') }}
26-
restore-keys: |
27-
${{ runner.os }}-node-
28-
29-
- name: Install dependencies
30-
if: steps.composer-cache.outputs.cache-hit != 'true'
31-
run: composer install --prefer-dist --no-progress --no-suggest
32-
33-
# Add a test script to composer.json, for instance: "test": "vendor/bin/phpunit"
34-
# Docs: https://getcomposer.org/doc/articles/scripts.md
35-
36-
- name: Run test suite
37-
run: composer test
18+
- name: Checkout code
19+
uses: actions/checkout@v2
20+
21+
- name: Setup PHP
22+
uses: shivammathur/setup-php@v2
23+
with:
24+
php-version: ${{ matrix.php }}
25+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap
26+
coverage: none
27+
28+
- name: Setup problem matchers
29+
run: |
30+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
31+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
32+
- name: Install dependencies
33+
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
34+
35+
- name: Execute tests
36+
run: vendor/bin/pest

.gitignore

+11-61
Original file line numberDiff line numberDiff line change
@@ -1,62 +1,12 @@
1-
2-
# Created by https://www.gitignore.io/api/linux,windows,composer,visualstudiocode
3-
4-
### Composer ###
5-
composer.phar
6-
/vendor/
7-
8-
# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file
9-
# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file
10-
# composer.lock
11-
12-
### Linux ###
13-
*~
14-
15-
# temporary files which can be created if a process still has a handle open of a deleted file
16-
.fuse_hidden*
17-
18-
# KDE directory preferences
19-
.directory
20-
21-
# Linux trash folder which might appear on any partition or disk
22-
.Trash-*
23-
24-
# .nfs files are created when an open file is removed but is still being accessed
25-
.nfs*
26-
27-
### VisualStudioCode ###
28-
.vscode/*
29-
!.vscode/settings.json
30-
!.vscode/tasks.json
31-
!.vscode/launch.json
32-
!.vscode/extensions.json
33-
.history
34-
35-
### Windows ###
36-
# Windows thumbnail cache files
37-
Thumbs.db
38-
ehthumbs.db
39-
ehthumbs_vista.db
40-
41-
# Folder config file
42-
Desktop.ini
43-
44-
# Recycle Bin used on file shares
45-
$RECYCLE.BIN/
46-
47-
# Windows Installer files
48-
*.cab
49-
*.msi
50-
*.msm
51-
*.msp
52-
53-
# Windows shortcuts
54-
*.lnk
55-
56-
57-
.phpintel/
58-
# End of https://www.gitignore.io/api/linux,windows,composer,visualstudiocode
59-
60-
.env
61-
.phpunit.result.cache
1+
.idea
2+
.php_cs
623
.php_cs.cache
4+
.phpunit.result.cache
5+
build
6+
coverage
7+
psalm.xml
8+
testbench.yaml
9+
vendor
10+
.php-cs-fixer.cache
11+
.phpunit.cache
12+
composer.lock

.travis.yml

-11
This file was deleted.

CODE_OF_CONDUCT.md

+128
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

0 commit comments

Comments
 (0)