Skip to content

Commit 8d76d1b

Browse files
committed
Cleanup code to match new standards of phpdoc
1 parent daa29e6 commit 8d76d1b

35 files changed

+636
-1347
lines changed

.github/workflows/push.yml

Lines changed: 199 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,199 @@
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+
coverage: xdebug
68+
pecl: false
69+
- name: Run PHPUnit
70+
run: php tools/phpunit
71+
72+
codestyle:
73+
runs-on: ubuntu-latest
74+
needs: setup
75+
steps:
76+
- uses: actions/checkout@master
77+
- name: Restore/cache vendor folder
78+
uses: actions/cache@v1
79+
with:
80+
path: vendor
81+
key: all-build-${{ hashFiles('**/composer.lock') }}
82+
restore-keys: |
83+
all-build-${{ hashFiles('**/composer.lock') }}
84+
all-build-
85+
- name: Restore/cache tools folder
86+
uses: actions/cache@v1
87+
with:
88+
path: tools
89+
key: all-tools-${{ github.sha }}
90+
restore-keys: |
91+
all-tools-${{ github.sha }}-
92+
all-tools-
93+
- name: Code style check
94+
uses: docker://phpdoc/phpcs-ga:latest
95+
env:
96+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
97+
with:
98+
args: -d memory_limit=1024M
99+
100+
phpstan:
101+
runs-on: ubuntu-latest
102+
needs: setup
103+
steps:
104+
- uses: actions/checkout@master
105+
- name: Restore/cache vendor folder
106+
uses: actions/cache@v1
107+
with:
108+
path: vendor
109+
key: all-build-${{ hashFiles('**/composer.lock') }}
110+
restore-keys: |
111+
all-build-${{ hashFiles('**/composer.lock') }}
112+
all-build-
113+
- name: Restore/cache tools folder
114+
uses: actions/cache@v1
115+
with:
116+
path: tools
117+
key: all-tools-${{ github.sha }}
118+
restore-keys: |
119+
all-tools-${{ github.sha }}-
120+
all-tools-
121+
- name: PHPStan
122+
uses: docker://phpdoc/phpstan-ga:latest
123+
env:
124+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
125+
with:
126+
args: analyse src --level max --configuration phpstan.neon
127+
128+
psalm:
129+
runs-on: ubuntu-latest
130+
needs: setup
131+
steps:
132+
- uses: actions/checkout@master
133+
- name: Restore/cache vendor folder
134+
uses: actions/cache@v1
135+
with:
136+
path: vendor
137+
key: all-build-${{ hashFiles('**/composer.lock') }}
138+
restore-keys: |
139+
all-build-${{ hashFiles('**/composer.lock') }}
140+
all-build-
141+
- name: Restore/cache tools folder
142+
uses: actions/cache@v1
143+
with:
144+
path: tools
145+
key: all-tools-${{ github.sha }}
146+
restore-keys: |
147+
all-tools-${{ github.sha }}-
148+
all-tools-
149+
- name: Setup PHP
150+
uses: shivammathur/setup-php@master
151+
with:
152+
php-version: 7.2
153+
coverage: xdebug
154+
pecl: false
155+
- name: Run psalm
156+
run: php tools/psalm
157+
158+
159+
phpunit:
160+
runs-on: ${{ matrix.operating-system }}
161+
strategy:
162+
matrix:
163+
operating-system:
164+
- ubuntu-latest
165+
- windows-latest
166+
- macOS-latest
167+
php-versions: ['7.2', '7.3', '7.4']
168+
name: Unit tests for PHP version ${{ matrix.php-versions }} on ${{ matrix.operating-system }}
169+
needs:
170+
- setup
171+
- phpunit-with-coverage
172+
steps:
173+
- uses: actions/checkout@master
174+
- name: Restore/cache vendor folder
175+
uses: actions/cache@v1
176+
with:
177+
path: vendor
178+
key: all-build-${{ hashFiles('**/composer.lock') }}
179+
restore-keys: |
180+
all-build-${{ hashFiles('**/composer.lock') }}
181+
all-build-
182+
- name: Restore/cache tools folder
183+
uses: actions/cache@v1
184+
with:
185+
path: tools
186+
key: all-tools-${{ github.sha }}
187+
restore-keys: |
188+
all-tools-${{ github.sha }}-
189+
all-tools-
190+
- name: Setup PHP
191+
uses: shivammathur/setup-php@master
192+
with:
193+
php-version: ${{ matrix.php-versions }}
194+
extension-csv: mbstring, intl, iconv, libxml, dom, json, simplexml, zlib
195+
ini-values-csv: memory_limit=2G, display_errors=On, error_reporting=-1
196+
pecl: false
197+
- name: Run PHPUnit
198+
continue-on-error: true
199+
run: php tools/phpunit

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ tools/
1212
temp/
1313
vendor/
1414
*.phar
15+
.phpunit.result.cache
1516

1617
# By default the phpunit.xml.dist is provided; you can override this using a local config file
1718
phpunit.xml

.travis.yml

Lines changed: 0 additions & 48 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 php:7.4 tools/psalm
25+
26+
.PHONY: test
27+
test:
28+
docker run -it --rm -v${PWD}:/opt/project -w /opt/project php:7.4-pcov tools/phpunit
29+
30+
.PHONY: pre-commit-test
31+
pre-commit-test: test phpcs phpstan psalm
32+

README.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
2-
[![Travis Status](https://img.shields.io/travis/phpDocumentor/FlyFinder.svg?label=Linux)](https://travis-ci.org/phpDocumentor/FlyFinder)
3-
[![Appveyor Status](https://img.shields.io/appveyor/ci/phpDocumentor/FlyFinder.svg?label=Windows)](https://ci.appveyor.com/project/phpDocumentor/FlyFinder/branch/master)
42
[![Coveralls Coverage](https://img.shields.io/coveralls/github/phpDocumentor/FlyFinder.svg)](https://coveralls.io/github/phpDocumentor/FlyFinder?branch=master)
53
[![Scrutinizer Code Coverage](https://img.shields.io/scrutinizer/coverage/g/phpDocumentor/FlyFinder.svg)](https://scrutinizer-ci.com/g/phpDocumentor/FlyFinder/?branch=master)
64
[![Scrutinizer Code Quality](https://img.shields.io/scrutinizer/g/phpDocumentor/FlyFinder.svg)](https://scrutinizer-ci.com/g/phpDocumentor/FlyFinder/?branch=master)

appveyor.yml

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

composer.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@
1515
}
1616
},
1717
"require": {
18-
"php": ">=7.1",
19-
"league/flysystem": ">=1.0.41"
18+
"php": "^7.2",
19+
"league/flysystem": "^1.0"
2020
},
2121
"minimum-stability": "stable",
2222
"require-dev": {
23-
"mockery/mockery": "~1",
24-
"league/flysystem-memory": "~1",
25-
"phpunit/phpunit": "~6"
23+
"mockery/mockery": "^1.3",
24+
"league/flysystem-memory": "~1"
2625
},
2726
"extra": {
2827
"branch-alias": {

0 commit comments

Comments
 (0)