Skip to content

Commit 03ddbe0

Browse files
authored
Merge pull request #179 from phpDocumentor/cleanup
Cleanup
2 parents 8fcadfe + 043df2c commit 03ddbe0

Some content is hidden

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

83 files changed

+2250
-1606
lines changed

.github/workflows/push.yml

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,196 @@
1+
on: push
2+
name: Qa workflow
3+
jobs:
4+
setup:
5+
runs-on: ubuntu-latest
6+
steps:
7+
- uses: actions/checkout@master
8+
- name: Restore/cache vendor folder
9+
uses: actions/cache@v1
10+
with:
11+
path: vendor
12+
key: all-build-${{ hashFiles('**/composer.lock') }}
13+
restore-keys: |
14+
all-build-${{ hashFiles('**/composer.lock') }}
15+
all-build-
16+
- name: Restore/cache tools folder
17+
uses: actions/cache@v1
18+
with:
19+
path: tools
20+
key: all-tools-${{ github.sha }}
21+
restore-keys: |
22+
all-tools-${{ github.sha }}-
23+
all-tools-
24+
- name: composer
25+
uses: docker://composer
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
with:
29+
args: install --no-interaction --prefer-dist --optimize-autoloader
30+
- name: composer-require-checker
31+
uses: docker://phpga/composer-require-checker-ga
32+
env:
33+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34+
with:
35+
args: check --config-file ./composer-require-config.json composer.json
36+
- name: Install phive
37+
run: make install-phive
38+
- name: Install PHAR dependencies
39+
run: tools/phive.phar --no-progress install --copy --trust-gpg-keys 4AA394086372C20A,D2CCAC42F6295E7D,E82B2FB314E9906E,8E730BA25823D8B5 --force-accept-unsigned
40+
41+
phpunit-with-coverage:
42+
runs-on: ubuntu-latest
43+
name: Unit tests
44+
needs: setup
45+
steps:
46+
- uses: actions/checkout@master
47+
- name: Restore/cache vendor folder
48+
uses: actions/cache@v1
49+
with:
50+
path: vendor
51+
key: all-build-${{ hashFiles('**/composer.lock') }}
52+
restore-keys: |
53+
all-build-${{ hashFiles('**/composer.lock') }}
54+
all-build-
55+
- name: Restore/cache tools folder
56+
uses: actions/cache@v1
57+
with:
58+
path: tools
59+
key: all-tools-${{ github.sha }}
60+
restore-keys: |
61+
all-tools-${{ github.sha }}-
62+
all-tools-
63+
- name: Setup PHP
64+
uses: shivammathur/setup-php@master
65+
with:
66+
php-version: 7.2
67+
extension-csv: mbstring, intl, iconv, libxml, dom, json, simplexml, zlib
68+
ini-values-csv: memory_limit=2G, display_errors=On, error_reporting=-1
69+
coverage: xdebug
70+
pecl: false
71+
- name: Run PHPUnit
72+
run: php tools/phpunit
73+
74+
phpunit:
75+
runs-on: ${{ matrix.operating-system }}
76+
strategy:
77+
matrix:
78+
operating-system:
79+
- ubuntu-latest
80+
- windows-latest
81+
- macOS-latest
82+
php-versions: ['7.2', '7.3', '7.4']
83+
name: Unit tests for PHP version ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
84+
needs:
85+
- setup
86+
- phpunit-with-coverage
87+
steps:
88+
- uses: actions/checkout@master
89+
- name: Restore/cache vendor folder
90+
uses: actions/cache@v1
91+
with:
92+
path: vendor
93+
key: all-build-${{ hashFiles('**/composer.lock') }}
94+
restore-keys: |
95+
all-build-${{ hashFiles('**/composer.lock') }}
96+
all-build-
97+
- name: Restore/cache tools folder
98+
uses: actions/cache@v1
99+
with:
100+
path: tools
101+
key: all-tools-${{ github.sha }}
102+
restore-keys: |
103+
all-tools-${{ github.sha }}-
104+
all-tools-
105+
- name: Setup PHP
106+
uses: shivammathur/setup-php@master
107+
with:
108+
php-version: ${{ matrix.php-versions }}
109+
extension-csv: mbstring, intl, iconv, libxml, dom, json, simplexml, zlib
110+
ini-values-csv: memory_limit=2G, display_errors=On, error_reporting=-1
111+
pecl: false
112+
- name: Run PHPUnit
113+
continue-on-error: true
114+
run: php tools/phpunit
115+
116+
codestyle:
117+
runs-on: ubuntu-latest
118+
needs: [setup, phpunit]
119+
steps:
120+
- uses: actions/checkout@master
121+
- name: Restore/cache vendor folder
122+
uses: actions/cache@v1
123+
with:
124+
path: vendor
125+
key: all-build-${{ hashFiles('**/composer.lock') }}
126+
restore-keys: |
127+
all-build-${{ hashFiles('**/composer.lock') }}
128+
all-build-
129+
- name: Restore/cache tools folder
130+
uses: actions/cache@v1
131+
with:
132+
path: tools
133+
key: all-tools-${{ github.sha }}
134+
restore-keys: |
135+
all-tools-${{ github.sha }}-
136+
all-tools-
137+
- name: Code style check
138+
uses: docker://phpdoc/phpcs-ga:latest
139+
env:
140+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141+
with:
142+
args: -d memory_limit=1024M
143+
144+
phpstan:
145+
runs-on: ubuntu-latest
146+
needs: [setup, phpunit]
147+
steps:
148+
- uses: actions/checkout@master
149+
- name: Restore/cache vendor folder
150+
uses: actions/cache@v1
151+
with:
152+
path: vendor
153+
key: all-build-${{ hashFiles('**/composer.lock') }}
154+
restore-keys: |
155+
all-build-${{ hashFiles('**/composer.lock') }}
156+
all-build-
157+
- name: Restore/cache tools folder
158+
uses: actions/cache@v1
159+
with:
160+
path: tools
161+
key: all-tools-${{ github.sha }}
162+
restore-keys: |
163+
all-tools-${{ github.sha }}-
164+
all-tools-
165+
- name: PHPStan
166+
uses: docker://phpdoc/phpstan-ga:latest
167+
env:
168+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
169+
with:
170+
args: analyse src --level max --configuration phpstan.neon
171+
172+
psalm:
173+
runs-on: ubuntu-latest
174+
needs: [setup, phpunit]
175+
steps:
176+
- uses: actions/checkout@master
177+
- name: Restore/cache vendor folder
178+
uses: actions/cache@v1
179+
with:
180+
path: vendor
181+
key: all-build-${{ hashFiles('**/composer.lock') }}
182+
restore-keys: |
183+
all-build-${{ hashFiles('**/composer.lock') }}
184+
all-build-
185+
- name: Restore/cache tools folder
186+
uses: actions/cache@v1
187+
with:
188+
path: tools
189+
key: all-tools-${{ github.sha }}
190+
restore-keys: |
191+
all-tools-${{ github.sha }}-
192+
all-tools-
193+
- name: Psalm
194+
uses: docker://mickaelandrieu/psalm-ga
195+
env:
196+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.travis.yml

Lines changed: 0 additions & 49 deletions
This file was deleted.

Makefile

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.PHONY: install-phive
2+
install-phive:
3+
mkdir tools; \
4+
wget -O tools/phive.phar https://phar.io/releases/phive.phar; \
5+
wget -O tools/phive.phar.asc https://phar.io/releases/phive.phar.asc; \
6+
gpg --keyserver pool.sks-keyservers.net --recv-keys 0x9D8A98B29B2D5D79; \
7+
gpg --verify tools/phive.phar.asc tools/phive.phar; \
8+
chmod +x tools/phive.phar
9+
10+
.PHONY: setup
11+
setup: install-phive
12+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phar-ga:latest php tools/phive.phar install --force-accept-unsigned
13+
14+
.PHONY: phpcs
15+
phpcs:
16+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpcs-ga:latest -d memory_limit=1024M
17+
18+
.PHONY: phpstan
19+
phpstan:
20+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project phpdoc/phpstan-ga:latest analyse src --no-progress --level max --configuration phpstan.neon
21+
22+
.PHONY: psaml
23+
psalm:
24+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project mickaelandrieu/psalm-ga
25+
26+
.PHONY: test
27+
test:
28+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.2 tools/phpunit
29+
30+
.PHONY: pre-commit-test
31+
pre-commit-test: test phpcs phpstan psalm
32+

appveyor.yml

Lines changed: 0 additions & 54 deletions
This file was deleted.

composer-require-config.json

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"symbol-whitelist" : [
3+
"null", "true", "false",
4+
"static", "self", "parent",
5+
"array", "string", "int", "float", "bool", "iterable", "callable", "void", "object", "XSLTProcessor"
6+
],
7+
"php-core-extensions" : [
8+
"Core",
9+
"pcre",
10+
"Reflection",
11+
"tokenizer",
12+
"SPL",
13+
"standard"
14+
]
15+
}

composer.json

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,18 @@
77
{
88
"name": "Mike van Riel",
99
"email": "[email protected]"
10+
},
11+
{
12+
"name": "Jaap van Otterdijk",
13+
"email": "[email protected]"
1014
}
1115
],
12-
"minimum-stability": "alpha",
1316
"require": {
14-
"php": ">=7.1",
15-
"phpdocumentor/type-resolver": "^0",
16-
"webmozart/assert": "^1"
17+
"php": "^7.2",
18+
"phpdocumentor/type-resolver": "^1.0",
19+
"webmozart/assert": "^1",
20+
"phpdocumentor/reflection-common": "^2.0",
21+
"ext-filter": "^7.1"
1722
},
1823
"require-dev": {
1924
"mockery/mockery": "^1",

0 commit comments

Comments
 (0)