Skip to content
This repository was archived by the owner on Jun 2, 2022. It is now read-only.

Commit 6dab09c

Browse files
committed
feat: rewrite everything for next major version
BREAKING CHANGE
1 parent 90a3ac2 commit 6dab09c

File tree

354 files changed

+23125
-7964
lines changed

Some content is hidden

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

354 files changed

+23125
-7964
lines changed

.apidocrc.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
use spaceonfire\ApiDoc\Config\Processor\BuilderProcessor;
6+
use spaceonfire\ApiDoc\Config\Processor\ProcessorInterface;
7+
8+
return static function (): ProcessorInterface {
9+
return (new BuilderProcessor())
10+
->withProjectName('SpaceOnFire ApiDoc')
11+
->withSourceDirectories([__DIR__ . '/src'])
12+
->withOutputDirectory(__DIR__ . '/docs')
13+
->withBaseNamespace('spaceonfire\ApiDoc');
14+
};

.editorconfig

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,9 @@ root = true
77
charset = utf-8
88
end_of_line = lf
99
indent_size = 4
10-
indent_style = tab
10+
indent_style = space
1111
insert_final_newline = true
1212
trim_trailing_whitespace = true
1313

14-
[**.{js,ts,jsx,tsx,less,css,sass,scss,json,yml}]
14+
[**.{js, ts, jsx, tsx, less, css, sass, scss, json, yml, yaml}]
1515
indent_size = 2
16-
indent_style = space
17-
18-
[**.{md,php}]
19-
indent_style = space
20-
21-
[bin/**]
22-
indent_style = space

.gitattributes

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,17 @@
22
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
33

44
# Ignore all test and documentation with "export-ignore".
5+
/.github export-ignore
6+
/bin/coverage-badge export-ignore
7+
/docs export-ignore
8+
/tests export-ignore
59
/.editorconfig export-ignore
610
/.gitattributes export-ignore
711
/.gitignore export-ignore
8-
/.github export-ignore
9-
/phpcs.xml.dist export-ignore
12+
/CODE_OF_CONDUCT.md export-ignore
13+
/CONTRIBUTING.md export-ignore
14+
/docker-compose.yml export-ignore
15+
/ecs.php export-ignore
16+
/Makefile export-ignore
17+
/phpstan.neon.dist export-ignore
1018
/phpunit.xml.dist export-ignore
11-
/tests export-ignore
12-
/docs export-ignore

.github/FUNDING.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
liberapay: hustlahusky
2+
custom:
3+
- https://www.paypal.me/hustlahusky

.github/ISSUE_TEMPLATE.md

100644100755
Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ Not obligatory, but suggest an idea for implementing addition or change.
2020

2121
Include as many relevant details about the environment you experienced the bug in and how to reproduce it.
2222

23-
* Version used (e.g. PHP 5.6, HHVM 3):
24-
* Operating system and version (e.g. Ubuntu 16.04, Windows 7):
25-
* Link to your project:
26-
* ...
27-
* ...
23+
- Version used (e.g. PHP 5.6, HHVM 3):
24+
- Operating system and version (e.g. Ubuntu 16.04, Windows 7):
25+
- Link to your project:
26+
- ...
27+
- ...

.github/workflows/build.yml

Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
name: Build Pipeline
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
workflow_dispatch:
11+
12+
jobs:
13+
composer:
14+
runs-on: ubuntu-latest
15+
container: spaceonfire/nginx-php-fpm:latest-7.2
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v2
19+
20+
- name: Validate composer.json
21+
run: composer validate
22+
23+
codestyle:
24+
runs-on: ubuntu-latest
25+
container: spaceonfire/nginx-php-fpm:latest-7.2
26+
steps:
27+
- name: Checkout
28+
uses: actions/checkout@v2
29+
30+
- name: Cache Composer packages
31+
id: composer-cache
32+
uses: actions/cache@v2
33+
env:
34+
COMPOSER_CACHE_KEY: 'composer-7.2'
35+
with:
36+
path: vendor
37+
key: ${{ env.COMPOSER_CACHE_KEY }}
38+
restore-keys: ${{ env.COMPOSER_CACHE_KEY }}
39+
40+
- name: Install dependencies
41+
if: steps.composer-cache.outputs.cache-hit != 'true'
42+
run: composer install --prefer-dist --no-progress --no-suggest
43+
44+
- name: Check coding standard
45+
run: vendor/bin/ecs check --no-progress-bar --no-interaction
46+
47+
phpstan:
48+
runs-on: ubuntu-latest
49+
container: spaceonfire/nginx-php-fpm:latest-7.2
50+
steps:
51+
- name: Checkout
52+
uses: actions/checkout@v2
53+
54+
- name: Cache Composer packages
55+
id: composer-cache
56+
uses: actions/cache@v2
57+
env:
58+
COMPOSER_CACHE_KEY: 'composer-7.2'
59+
with:
60+
path: vendor
61+
key: ${{ env.COMPOSER_CACHE_KEY }}
62+
restore-keys: ${{ env.COMPOSER_CACHE_KEY }}
63+
64+
- name: Install dependencies
65+
if: steps.composer-cache.outputs.cache-hit != 'true'
66+
run: composer install --prefer-dist --no-progress --no-suggest
67+
68+
- name: PHPStan
69+
run: vendor/bin/phpstan analyse --no-progress --no-interaction --memory-limit=512M
70+
71+
phpunit:
72+
runs-on: ubuntu-latest
73+
strategy:
74+
matrix:
75+
php-version:
76+
- '7.2'
77+
- '7.3'
78+
- '7.4'
79+
container: spaceonfire/nginx-php-fpm:latest-${{ matrix.php-version }}
80+
steps:
81+
- name: Checkout
82+
uses: actions/checkout@v2
83+
84+
- name: Cache Composer packages
85+
id: composer-cache
86+
uses: actions/cache@v2
87+
env:
88+
COMPOSER_CACHE_KEY: 'composer-${{ matrix.php-version }}'
89+
with:
90+
path: vendor
91+
key: ${{ env.COMPOSER_CACHE_KEY }}
92+
restore-keys: ${{ env.COMPOSER_CACHE_KEY }}
93+
94+
- name: Install dependencies
95+
if: steps.composer-cache.outputs.cache-hit != 'true'
96+
run: composer install --prefer-dist --no-progress --no-suggest
97+
98+
- name: PHPUnit
99+
run: |
100+
apk update
101+
docker-php-ext-enable xdebug
102+
vendor/bin/phpunit --no-interaction
103+
cat build/coverage.txt
104+
105+
- name: PHPUnit Artifacts
106+
uses: actions/upload-artifact@v2
107+
with:
108+
name: phpunit-${{ matrix.php-version }}
109+
path: build/
110+
111+
- name: Generate coverage badge
112+
if: matrix.php-version == '7.2' && github.event_name == 'push' && github.ref == 'refs/heads/master'
113+
run: php bin/coverage-badge ${{ github.repository }}.json ${{ secrets.COVERAGE_GIST_ID }} ${{ secrets.COVERAGE_GIST_TOKEN }}

.gitignore

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,3 @@
1-
# Project folders and files to ignore
2-
build
3-
phpcs.xml
4-
phpunit.xml
5-
vendor
6-
71
# Numerous always-ignore extensions
82
*.diff
93
*.err
@@ -18,11 +12,6 @@ vendor
1812
*.lock
1913
!**/yarn.lock
2014

21-
# Dotenv
22-
.env
23-
.env.*
24-
!.env.example
25-
2615
# OS or Editor folders
2716
.DS_Store
2817
._*
@@ -44,3 +33,19 @@ nbproject
4433
.directory
4534
*.sql
4635
*.tar*
36+
37+
# Dotenv
38+
.env
39+
.env.*
40+
!.env.example
41+
42+
# Project folders and files to ignore
43+
build
44+
vendor
45+
.phpunit.result.cache
46+
phpunit.xml
47+
phpstan.neon
48+
docker-compose.override.yml
49+
box.phar
50+
box.json
51+
php-scoper.phar

CODE_OF_CONDUCT.md

100644100755
Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,22 +14,19 @@ orientation.
1414
Examples of behavior that contributes to creating a positive environment
1515
include:
1616

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
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
2222

2323
Examples of unacceptable behavior by participants include:
2424

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
25+
- The use of sexualized language or imagery and unwelcome sexual attention or advances
26+
- Trolling, insulting/derogatory comments, and personal or political attacks
27+
- Public or private harassment
28+
- Publishing others' private information, such as a physical or electronic address, without explicit permission
29+
- Other conduct which could reasonably be considered inappropriate in a professional setting
3330

3431
## Our Responsibilities
3532

CONTRIBUTING.md

100644100755
Lines changed: 7 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,29 +4,24 @@ Contributions are **welcome** and will be fully **credited**.
44

55
We accept contributions via Pull Requests on [Github](https://github.com/spaceonfire/simple-php-apidoc).
66

7-
87
## Pull Requests
98

10-
- **[PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md)** - Check the code style with ``$ composer check-style`` and fix it with ``$ composer fix-style``.
11-
9+
- **[PSR-12 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-12-extended-coding-style-guide.md)** -
10+
Check the code style with `$ composer codestyle` and fix it with `$ composer codestyle -- --fix`.
1211
- **Add tests!** - Your patch won't be accepted if it doesn't have tests.
13-
1412
- **Document any change in behaviour** - Make sure the `README.md` and any other relevant documentation are kept up-to-date.
15-
1613
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](http://semver.org/). Randomly breaking public APIs is not an option.
17-
1814
- **Create feature branches** - Don't ask us to pull from your master branch.
19-
2015
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests.
21-
22-
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages) before submitting.
23-
16+
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful.
17+
If you had to make multiple intermediate commits while developing,
18+
please [squash them](http://www.git-scm.com/book/en/v2/Git-Tools-Rewriting-History#Changing-Multiple-Commit-Messages)
19+
before submitting.
2420

2521
## Running Tests
2622

27-
``` bash
23+
```bash
2824
$ composer test
2925
```
3026

31-
3227
**Happy coding**!

LICENSE.md

100644100755
File mode changed.

0 commit comments

Comments
 (0)