Skip to content

Commit c9525c1

Browse files
committed
chore: Summer cleanup and modernizations.
1 parent 9f1310d commit c9525c1

29 files changed

+328
-322
lines changed

.auto-changelog

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
{
2-
"output": "CHANGELOG.md",
3-
"template": "keepachangelog",
4-
"unreleased": true,
5-
"commitLimit": false,
6-
"hideCredit": true,
7-
"sortCommits": "date-desc",
8-
"breakingPattern": "BREAKING CHANGE: yes"
2+
"output": "CHANGELOG.md",
3+
"template": "keepachangelog",
4+
"unreleased": true,
5+
"commitLimit": false,
6+
"hideCredit": true,
7+
"sortCommits": "date-desc",
8+
"breakingPattern": "BREAKING CHANGE: yes"
99
}

.editorconfig

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,17 @@
11
# This file is for unifying the coding style for different editors and IDEs
22
# editorconfig.org
33

4-
# PHP PSR-2 Coding Standards
5-
# http://www.php-fig.org/psr/psr-2/
6-
74
root = true
85

9-
[*.{php,inc,module}]
6+
[*]
107
charset = utf-8
118
end_of_line = lf
9+
indent_size = 4
10+
indent_style = space
1211
insert_final_newline = true
12+
max_line_length = 120
1313
trim_trailing_whitespace = true
14-
indent_style = space
15-
indent_size = 4
1614

17-
[*.{json,json.dist,yml,yml.dist}]
18-
indent_size = 4
15+
[**.md]
16+
indent_size = 2
17+
max_line_length = 80

.envrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
use flake github:loophp/nix-auto-changelog
2+
use flake github:loophp/nix-shell#env-php81-nts --impure

.gitattributes

Lines changed: 18 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
/.github export-ignore
22
/build export-ignore
3-
/docker export-ignore
4-
/docs export-ignore
5-
/spec export-ignore
63
/tests export-ignore
7-
.auto-changelog export-ignore
8-
.editorconfig export-ignore
9-
.gitattributes export-ignore
10-
.gitignore export-ignore
11-
.php-cs-fixer.dist.php export-ignore
12-
.scrutinizer.yml export-ignore
13-
infection.json export-ignore
14-
grumphp.yml export-ignore
15-
phpspec.yml export-ignore
16-
docker-compose.yaml export-ignore
17-
psalm-baseline.xml export-ignore
18-
psalm.xml export-ignore
19-
phpstan-baseline.neon export-ignore
20-
phpstan-docs-baseline.neon export-ignore
21-
phpstan-unsupported-baseline.neon export-ignore
22-
phpstan.neon.dist export-ignore
4+
/.auto-changelog export-ignore
5+
/.editorconfig export-ignore
6+
/.envrc export-ignore
7+
/.gitattributes export-ignore
8+
/.gitignore export-ignore
9+
/.prettierignore export-ignore
10+
/.prettierrc export-ignore
11+
/.scrutinizer.yml export-ignore
12+
/CHANGELOG.md export-ignore
13+
/infection.json export-ignore
14+
/LICENSE export-ignore
15+
/grumphp.yml export-ignore
16+
/phpstan-baseline.neon export-ignore
17+
/phpstan.neon export-ignore
18+
/phpunit.xml export-ignore
19+
/psalm-baseline.xml export-ignore
20+
/psalm.xml export-ignore
21+
/README.md export-ignore

.github/CODE_OF_CONDUCT.md

Lines changed: 47 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,45 +2,74 @@
22

33
## Our Pledge
44

5-
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of
9+
experience, nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
611

712
## Our Standards
813

9-
Examples of behavior that contributes to creating a positive environment include:
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
1016

11-
* Using welcoming and inclusive language
12-
* Being respectful of differing viewpoints and experiences
13-
* Gracefully accepting constructive criticism
14-
* Focusing on what is best for the community
15-
* Showing empathy towards other community members
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
1622

1723
Examples of unacceptable behavior by participants include:
1824

19-
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20-
* Trolling, insulting/derogatory comments, and personal or political attacks
21-
* Public or private harassment
22-
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23-
* Other conduct which could reasonably be considered inappropriate in a professional setting
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
2433

2534
## Our Responsibilities
2635

27-
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
2839

29-
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
40+
Project maintainers have the right and responsibility to remove, edit, or reject
41+
comments, commits, code, wiki edits, issues, and other contributions that are
42+
not aligned to this Code of Conduct, or to ban temporarily or permanently any
43+
contributor for other behaviors that they deem inappropriate, threatening,
44+
offensive, or harmful.
3045

3146
## Scope
3247

33-
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
3454

3555
## Enforcement
3656

37-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. The
59+
project team will review and investigate all complaints, and will respond in a
60+
way that it deems appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an
62+
incident. Further details of specific enforcement policies may be posted
63+
separately.
3864

39-
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
65+
Project maintainers who do not follow or enforce the Code of Conduct in good
66+
faith may face temporary or permanent repercussions as determined by other
67+
members of the project's leadership.
4068

4169
## Attribution
4270

43-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
71+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
72+
version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
4473

4574
[homepage]: http://contributor-covenant.org
4675
[version]: http://contributor-covenant.org/version/1/4/

.github/CONTRIBUTING.md

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# CONTRIBUTING
22

3-
We're using [GitHub Actions](https://docs.github.com/en/actions) as a continuous integration system.
4-
5-
For details, see the workflows in [.github/workflows](../.github/workflows).
6-
3+
We're using [GitHub Actions](https://docs.github.com/en/actions) as a continuous
4+
integration system.
5+
6+
For details, see the workflows in [.github/workflows](../.github/workflows).
7+
78
## Tests
89

9-
We're using [`grumphp/grumphp`](https://github.com/phpro/grumphp) to drive the development.
10+
We're using [`grumphp/grumphp`](https://github.com/phpro/grumphp) to drive the
11+
development.
1012

1113
Run
1214

@@ -18,7 +20,9 @@ to run all the tests.
1820

1921
## Coding Standards
2022

21-
We are using [`drupol/php-conventions`](https://github.com/drupol/php-conventions) to enforce coding standards.
23+
We are using
24+
[`drupol/php-conventions`](https://github.com/drupol/php-conventions) to enforce
25+
coding standards.
2226

2327
Run
2428

.github/ISSUE_TEMPLATE.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
## Steps required to reproduce the problem
22

3-
1.
4-
2.
5-
3.
3+
1.
4+
2.
5+
3.
66

77
## Expected Result
88

9-
*
9+
-
1010

1111
## Actual Result
1212

13-
*
13+
-

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
11
This PR:
22

3-
* [ ] Fix ...
4-
* [ ] Provide ...
5-
* [ ] It breaks backward compatibility
6-
* [ ] Has unit tests (phpspec)
7-
* [ ] Has static analysis tests (psalm, phpstan)
8-
* [ ] Has documentation
9-
* [ ] Is an experimental thing
3+
- [ ] Fix ...
4+
- [ ] Provide ...
5+
- [ ] It breaks backward compatibility
6+
- [ ] Has unit tests (phpspec)
7+
- [ ] Has static analysis tests (psalm, phpstan)
8+
- [ ] Has documentation
9+
- [ ] Is an experimental thing
1010

11-
Follows #.
12-
Related to #.
13-
Fixes #.
11+
Follows #. Related to #. Fixes #.

.github/dependabot.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
version: 2
22
updates:
3-
- package-ecosystem: composer
4-
directory: "/"
5-
schedule:
6-
interval: daily
7-
open-pull-requests-limit: 10
8-
- package-ecosystem: github-actions
9-
directory: "/"
10-
schedule:
11-
interval: daily
12-
open-pull-requests-limit: 10
3+
- package-ecosystem: composer
4+
directory: "/"
5+
schedule:
6+
interval: daily
7+
open-pull-requests-limit: 10
8+
- package-ecosystem: github-actions
9+
directory: "/"
10+
schedule:
11+
interval: daily
12+
open-pull-requests-limit: 10

.github/stale.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,5 @@ daysUntilClose: 7
55
staleLabel: stale
66

77
markComment: >
8-
This issue has been automatically marked as stale because it has not had
9-
recent activity. It will be closed if no further activity occurs. Thank you
10-
for your contributions.
8+
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no
9+
further activity occurs. Thank you for your contributions.

.github/workflows/code-style.yml

Lines changed: 7 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,11 @@
22

33
on:
44
push:
5-
branches:
6-
- main
5+
paths:
6+
- "**.php"
77
pull_request:
8+
paths:
9+
- "**.php"
810

911
name: "Code style"
1012

@@ -16,7 +18,7 @@ jobs:
1618
fail-fast: false
1719
matrix:
1820
operating-system: [ubuntu-latest]
19-
php-versions: ["7.4", "8.1"]
21+
php-versions: ["8.1"]
2022

2123
steps:
2224
- name: Set git to use LF
@@ -26,29 +28,16 @@ jobs:
2628
2729
- name: Checkout
2830
uses: actions/checkout@v3
29-
with:
30-
fetch-depth: 1
3131

3232
- name: Install PHP
33-
uses: shivammathur/setup-php@2.18.1
33+
uses: shivammathur/setup-php@v2
3434
with:
3535
php-version: ${{ matrix.php-versions }}
3636
extensions: gd,mbstring,pcov
3737
tools: cs2pr
3838

39-
- name: Get Composer Cache Directory
40-
id: composer-cache
41-
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
42-
43-
- name: Cache dependencies
44-
uses: actions/cache@v3
45-
with:
46-
path: ${{ steps.composer-cache.outputs.dir }}
47-
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
48-
restore-keys: ${{ runner.os }}-composer-
49-
5039
- name: Install dependencies
51-
run: composer install --no-progress --prefer-dist --optimize-autoloader
40+
uses: ramsey/composer-install@v2
5241

5342
- name: Run Grumphp
5443
run: vendor/bin/grumphp run --testsuite=cs -n

0 commit comments

Comments
 (0)