Skip to content

Commit 773d5cb

Browse files
committed
Pre-Release Cleanup for v1.0.0
1 parent 1c749d5 commit 773d5cb

31 files changed

+1147
-976
lines changed

.dockerignore

Lines changed: 53 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,56 @@
1-
.github
2-
build
1+
# Ignore IDE, AI, & GitHub Directories
2+
/.cursor
3+
/.idea
4+
/.junie
5+
/.phpstorm.meta.php
6+
/.run
7+
/.vscode
8+
9+
# Ignore GitHub Actions and CI/CD Directories
10+
/.github
11+
12+
# Ignore Local, Build, Test and Vendor Directories
13+
/.local
14+
/build
15+
/deploy
16+
/database/dump/
17+
/infrastructure
18+
/public/local
19+
/public/phpunit
20+
/tests
21+
/vendor
22+
*.terraform
23+
24+
# Ignore /storage, except for ".gitignore" files to preserve directory structure
325
storage
4-
vendor
26+
!storage/**/.gitignore
27+
28+
# Ignore environment files, except for the default distribution file
29+
.env
30+
.env.*
31+
*.private.env.json
32+
!.env.dist
33+
34+
# Ignore boilerplate and development tooling files
35+
*.http
36+
.editorconfig
37+
.gitattributes
38+
.gitignore
39+
.prettierignore
40+
Dockerfile
41+
Makefile
42+
README.md
43+
behat.yml
544
docker-compose.override.yml
6-
phpunit.xml
45+
docker-compose.yml
46+
http-client.env.json
47+
phpcs.xml
48+
phpstan-baseline.*.neon
49+
phpstan-baseline.*.php
50+
phpstan-baseline.neon
51+
phpstan-baseline.php
52+
phpstan.dist.neon
753
phpstan.neon
54+
phpunit.dist.xml
55+
phpunit.xml
56+
rector.php

.editorconfig

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,5 +12,12 @@ charset = utf-8
1212
indent_style = space
1313
indent_size = 4
1414

15-
[*.{yml,yaml}]
15+
[Makefile]
16+
indent_style = tab
17+
18+
[*.http]
19+
end_of_line = crlf
20+
21+
[*.{yml,yaml,json}]
1622
indent_size = 2
23+
max_line_length = unset

.env.dist

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
##------------------------------------------------------------------------------
2+
# Container/Runtime Configuration
3+
##------------------------------------------------------------------------------
4+
5+
# GitHub Token to Increase API Rate Limit and Enable Composer Authentication
6+
GITHUB_TOKEN=
7+
8+
# XDebug Mode (https://xdebug.org/docs/all_settings#mode)
9+
XDEBUG_MODE=debug
10+
11+
# XDebug Configuration (https://xdebug.org/docs/all_settings#XDEBUG_CONFIG)
12+
XDEBUG_CONFIG="client_host=host.docker.internal start_with_request=trigger idekey=PHPSTORM output_dir=/var/www/build/xdebug"

.gitattributes

Lines changed: 19 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,17 @@
1+
/.aiignore export-ignore
12
/.allowed-licenses export-ignore
3+
/.cursor export-ignore
4+
/.dockerignore export-ignore
25
/.editorconfig export-ignore
36
/.env export-ignore
4-
/.env.example export-ignore
7+
/.env.dist export-ignore
58
/.gitattributes export-ignore
6-
/.github/ export-ignore
9+
/.github export-ignore
710
/.gitignore export-ignore
811
/.idea export-ignore
12+
/.junie export-ignore
13+
/.prettierignore export-ignore
14+
/.psysh.php export-ignore
915
/CHANGELOG.md export-ignore
1016
/CODE_OF_CONDUCT.md export-ignore
1117
/CONTRIBUTING.md export-ignore
@@ -15,22 +21,31 @@
1521
/benchmarks/ export-ignore
1622
/bin/ export-ignore
1723
/build/ export-ignore
24+
/caddy/ export-ignore
1825
/captainhook.json export-ignore
1926
/codecov.yml export-ignore
27+
/compose.yaml export-ignore
28+
/compose.yml export-ignore
2029
/composer.lock export-ignore
2130
/conventional-commits.json export-ignore
31+
/docker-compose.yaml export-ignore
2232
/docker-compose.yml export-ignore
2333
/docs/ export-ignore
34+
/php-development.ini export-ignore
35+
/php-production.ini export-ignore
2436
/phpbench.json export-ignore
2537
/phpcs.xml export-ignore
2638
/phpcs.xml.dist export-ignore
39+
/phpstan.dist.neon export-ignore
2740
/phpstan.neon export-ignore
28-
/phpstan.neon.dist export-ignore
41+
/phpunit.dist.xml export-ignore
2942
/phpunit.xml export-ignore
30-
/phpunit.xml.dist export-ignore
3143
/psalm-baseline.xml export-ignore
3244
/psalm.xml export-ignore
45+
/public/ export-ignore
3346
/rector.php export-ignore
3447
/resources/ export-ignore
48+
/resources/ export-ignore
3549
/settings.ini export-ignore
50+
/storage/ export-ignore
3651
/tests/ export-ignore

.github/workflows/code_quality.yml

Lines changed: 10 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,20 @@
1-
name: Code Quality
1+
name: Code Quality Checks
22

33
on:
44
push:
5-
branches:
6-
- master
7-
- develop
85
pull_request:
9-
branches:
10-
- master
11-
- develop
6+
branches: [main]
127

138
jobs:
14-
phpcs:
15-
name: PHP_CodeSniffer
9+
ci:
1610
runs-on: ubuntu-latest
17-
steps:
18-
- name: Checkout Code
19-
uses: actions/checkout@v3
20-
- name: Install PHP and Extensions
21-
uses: shivammathur/setup-php@v2
22-
with:
23-
php-version: 8.3
24-
tools: composer:v2
25-
- name: Install Composer Dependencies
26-
uses: ramsey/composer-install@v2
27-
- name: Run PHP_CodeSniffer
28-
run: vendor/bin/phpcs --no-cache
2911

30-
rector:
31-
name: Rector
32-
runs-on: ubuntu-latest
3312
steps:
34-
- name: Checkout Code
35-
uses: actions/checkout@v3
36-
- name: Install PHP and Extensions
37-
uses: shivammathur/setup-php@v2
38-
with:
39-
php-version: 8.3
40-
tools: composer:v2
41-
- name: Install Composer Dependencies
42-
uses: ramsey/composer-install@v2
43-
- name: Run Rector
44-
run: vendor/bin/rector process --dry-run --no-progress-bar
13+
- name: Checkout code
14+
uses: actions/checkout@v4
4515

46-
phpstan:
47-
name: PHPStan
48-
runs-on: ubuntu-latest
49-
steps:
50-
- name: Checkout Code
51-
uses: actions/checkout@v3
52-
- name: Install PHP and Extensions
53-
uses: shivammathur/setup-php@v2
54-
with:
55-
php-version: 8.3
56-
tools: composer:v2
57-
- name: Install Composer Dependencies
58-
uses: ramsey/composer-install@v2
59-
- name: Run PHPStan
60-
run: vendor/bin/phpstan --no-progress --no-ansi
61-
62-
phpunit:
63-
name: PHPUnit (PHP ${{ matrix.php }} - ${{ matrix.dependency-versions }})
64-
runs-on: ubuntu-latest
65-
strategy:
66-
matrix:
67-
php: [ '8.2', '8.3' ]
68-
dependency-versions: [ 'locked', 'highest', 'lowest' ]
69-
steps:
70-
- name: Checkout Code
71-
uses: actions/checkout@v3
72-
- name: Install PHP and Extensions
73-
uses: shivammathur/setup-php@v2
74-
with:
75-
php-version: ${{ matrix.php }}
76-
coverage: xdebug
77-
tools: composer:v2
78-
- name: Install Composer Dependencies
79-
uses: ramsey/composer-install@v2
80-
with:
81-
dependency-versions: ${{ matrix.dependency-versions }}
82-
- name: Run PHPUnit
83-
run: vendor/bin/phpunit --no-progress --coverage-text
16+
- name: Run Code Quality Checks
17+
run: |
18+
cp .env.dist .env;
19+
sed -i "s/^GITHUB_TOKEN=.*/GITHUB_TOKEN=${{ secrets.GITHUB_TOKEN }}/" ".env";
20+
make -j && make ci;

.gitignore

Lines changed: 36 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,40 @@
1-
.idea/
1+
# Ignore IDE, & AI Directories
2+
/.aiignore
3+
/.cursor
4+
/.idea
5+
/.junie
6+
/.phpstorm.meta.php
7+
/.run
8+
/.vscode
9+
10+
# Ignore Local, Build, Test and Vendor Directories
11+
/.local
12+
/build
13+
/public/local
14+
/public/phpunit
15+
/vendor
16+
*.terraform
17+
18+
# Ignore environment files, except for the default distribution file
219
.env
3-
.phpunit.result.cache
20+
.env.*
21+
*.private.env.json
22+
!.env.dist
23+
24+
# Ignore boilerplate and development tooling files
425
docker-compose.override.yml
26+
docker-compose.override.yaml
27+
compose.override.yml
28+
compose.override.yaml
29+
phpstan-baseline.*.neon
30+
phpstan-baseline.*.php
31+
phpstan-baseline.neon
32+
phpstan-baseline.php
533
phpstan.neon
634
phpunit.xml
7-
vendor/
8-
build/
35+
36+
# Ignore INI Files
37+
*.ini
38+
!php-development.ini
39+
!php-production.ini
40+

CONTRIBUTING.md

Lines changed: 25 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -14,32 +14,32 @@ your bug report._
1414
When submitting a bug report, please include enough information to reproduce the
1515
bug. A good bug report includes the following sections:
1616

17-
* **Description**
17+
- **Description**
1818

19-
Provide a short and clear description of the bug.
19+
Provide a short and clear description of the bug.
2020

21-
* **Steps to reproduce**
21+
- **Steps to reproduce**
2222

23-
Provide steps to reproduce the behavior you are experiencing. Please try to
24-
keep this as short as possible. If able, create a reproducible script outside
25-
of any framework you are using. This will help us to quickly debug the issue.
23+
Provide steps to reproduce the behavior you are experiencing. Please try to
24+
keep this as short as possible. If able, create a reproducible script outside
25+
of any framework you are using. This will help us to quickly debug the issue.
2626

27-
* **Expected behavior**
27+
- **Expected behavior**
2828

29-
Provide a short and clear description of what you expect to happen.
29+
Provide a short and clear description of what you expect to happen.
3030

31-
* **Screenshots or output**
31+
- **Screenshots or output**
3232

33-
If applicable, add screenshots or program output to help explain your problem.
33+
If applicable, add screenshots or program output to help explain your problem.
3434

35-
* **Environment details**
35+
- **Environment details**
3636

37-
Provide details about the system where you're using this package, such as PHP
38-
version and operating system.
37+
Provide details about the system where you're using this package, such as PHP
38+
version and operating system.
3939

40-
* **Additional context**
40+
- **Additional context**
4141

42-
Provide any additional context that may help us debug the problem.
42+
Provide any additional context that may help us debug the problem.
4343

4444
## Fixing Bugs
4545

@@ -60,20 +60,20 @@ your hard work, but some features don't fit with the goals of the project.
6060

6161
When you do begin working on your feature, here are some guidelines to consider:
6262

63-
* Your pull request description should clearly detail the changes you have made.
63+
- Your pull request description should clearly detail the changes you have made.
6464
We will use this description to update the CHANGELOG. If there is no
6565
description, or it does not adequately describe your feature, we may ask you
6666
to update the description.
67-
* `phoneburner/api-handler` follows a superset of **[PSR-12 coding standard][psr-12]**, and all pull requests must
67+
- `phoneburner/api-handler` follows a superset of **[PSR-12 coding standard][psr-12]**, and all pull requests must
6868
comply with the coding standard
6969
Please ensure your code does, too. _Hint: run `make phpcs` to check._
70-
* Please **write tests** for any new features you add.
71-
* Please **ensure that tests pass** before submitting your pull request.
70+
- Please **write tests** for any new features you add.
71+
- Please **ensure that tests pass** before submitting your pull request.
7272
`phoneburner/api-handler` automatically runs tests for pull requests. However,
7373
running the tests locally will help save time. _Hint: run `make phpunit`._
74-
* **Use topic/feature branches.** Please do not ask to pull from your main branch.
75-
* For more information, see "[Understanding the GitHub flow][gh-flow]."
76-
* **Submit one feature per pull request.** If you have multiple features you
74+
- **Use topic/feature branches.** Please do not ask to pull from your main branch.
75+
- For more information, see "[Understanding the GitHub flow][gh-flow]."
76+
- **Submit one feature per pull request.** If you have multiple features you
7777
wish to submit, please break them into separate pull requests.
7878

7979
## Developing
@@ -86,7 +86,7 @@ is used externally from the host environment to run most of the common scripts.
8686

8787
After cloning this repository locally, execute the following commands:
8888

89-
``` bash
89+
```bash
9090
cd /path/to/repository
9191
make
9292
```
@@ -103,7 +103,7 @@ This project uses [PHPStan](https://github.com/phpstan/phpstan) to provide stati
103103
code. You may run static analysis manually across the whole codebase with the
104104
following command:
105105

106-
``` bash
106+
```bash
107107
# Static analysis
108108
make phpstan
109109
```
@@ -114,7 +114,7 @@ This project follows a superset of [PSR-12](https://www.php-fig.org/psr/psr-12/)
114114
coding standards, enforced by [PHP_CodeSniffer](https://github.com/squizlabs/PHP_CodeSniffer).
115115
Rector is also used to enforce code quality and standards
116116

117-
``` bash
117+
```bash
118118
# Run the code standards linter
119119
make phpcs
120120

@@ -139,11 +139,7 @@ make phpunit
139139
```
140140

141141
[github]: https://github.com/PhoneBurnerOpenSource/api-handler
142-
143142
[issues]: https://github.com/PhoneBurnerOpenSource/api-handler/issues
144-
145143
[pull requests]: https://github.com/PhoneBurnerOpenSource/api-handler/pulls
146-
147144
[psr-12]: https://www.php-fig.org/psr/psr-12/
148-
149145
[gh-flow]: https://guides.github.com/introduction/flow/

0 commit comments

Comments
 (0)