Skip to content

Commit ffb9446

Browse files
authored
Cleanup, update dev dependencies and workflow actions (#38)
* Cleanup .gitignore * Cleanup .gitattributes * Update of workflow actions * Format yml files * Format phpunit.xml.dist * Make test classes final * Update dev dependencies
1 parent 8b5b8e2 commit ffb9446

15 files changed

+184
-193
lines changed

.gitattributes

+12-9
Original file line numberDiff line numberDiff line change
@@ -22,16 +22,19 @@
2222
*.ttf binary
2323

2424
# Ignore some meta files when creating an archive of this repository
25-
/.github export-ignore
26-
/.editorconfig export-ignore
27-
/.gitattributes export-ignore
28-
/.gitignore export-ignore
29-
/.scrutinizer.yml export-ignore
30-
/phpunit.xml.dist export-ignore
31-
/tests export-ignore
32-
/docs export-ignore
25+
/.github export-ignore
26+
/.editorconfig export-ignore
27+
/.gitattributes export-ignore
28+
/.gitignore export-ignore
29+
/.phpunit-watcher.yml export-ignore
30+
/.scrutinizer.yml export-ignore
31+
/.styleci.yml export-ignore
32+
/infection.json.dist export-ignore
33+
/phpunit.xml.dist export-ignore
34+
/psalm.xml export-ignore
35+
/tests export-ignore
36+
/docs export-ignore
3337

3438
# Avoid merge conflicts in CHANGELOG
3539
# https://about.gitlab.com/2015/02/10/gitlab-reduced-merge-conflicts-by-90-percent-with-changelog-placeholders/
3640
/CHANGELOG.md merge=union
37-

.github/dependabot.yml

+13-13
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
version: 2
22
updates:
3-
# Maintain dependencies for GitHub Actions.
4-
- package-ecosystem: "github-actions"
5-
directory: "/"
6-
schedule:
7-
interval: "daily"
8-
# Too noisy. See https://github.community/t/increase-if-necessary-for-github-actions-in-dependabot/179581
9-
open-pull-requests-limit: 0
3+
# Maintain dependencies for GitHub Actions.
4+
- package-ecosystem: "github-actions"
5+
directory: "/"
6+
schedule:
7+
interval: "daily"
8+
# Too noisy. See https://github.community/t/increase-if-necessary-for-github-actions-in-dependabot/179581
9+
open-pull-requests-limit: 0
1010

11-
# Maintain dependencies for Composer
12-
- package-ecosystem: "composer"
13-
directory: "/"
14-
schedule:
15-
interval: "daily"
16-
versioning-strategy: increase-if-necessary
11+
# Maintain dependencies for Composer
12+
- package-ecosystem: "composer"
13+
directory: "/"
14+
schedule:
15+
interval: "daily"
16+
versioning-strategy: increase-if-necessary

.github/workflows/bc.yml_

+11-11
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
on:
2-
- pull_request
3-
- push
2+
- pull_request
3+
- push
44

55
name: backwards compatibility
66
jobs:
7-
roave_bc_check:
8-
name: Roave BC Check
9-
runs-on: ubuntu-latest
10-
steps:
11-
- uses: actions/checkout@master
12-
- name: fetch tags
13-
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
14-
- name: Roave BC Check
15-
uses: docker://nyholm/roave-bc-check-ga
7+
roave_bc_check:
8+
name: Roave BC Check
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@master
12+
- name: fetch tags
13+
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*
14+
- name: Roave BC Check
15+
uses: docker://nyholm/roave-bc-check-ga

.github/workflows/build.yml

+2-7
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525

2626
steps:
2727
- name: Checkout
28-
uses: actions/checkout@v2.3.4
28+
uses: actions/checkout@v2
2929

3030
- name: Install PHP
3131
uses: shivammathur/setup-php@v2
@@ -54,13 +54,8 @@ jobs:
5454
- name: Update composer
5555
run: composer self-update
5656

57-
- name: Install dependencies with composer php 7.4
58-
if: matrix.php == '7.4'
57+
- name: Install dependencies with composer
5958
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
6059

61-
- name: Install dependencies with composer php 8.0
62-
if: matrix.php == '8.0'
63-
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
64-
6560
- name: Run tests with phpunit
6661
run: vendor/bin/phpunit --colors=always

.github/workflows/mutation.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@ jobs:
2222

2323
steps:
2424
- name: Checkout
25-
uses: actions/checkout@v2.3.4
25+
uses: actions/checkout@v2
2626

2727
- name: Install PHP
2828
uses: shivammathur/setup-php@v2
2929
with:
30-
php-version: "${{ matrix.php }}"
30+
php-version: ${{ matrix.php }}
3131
ini-values: memory_limit=-1
32-
coverage: "pcov"
32+
coverage: pcov
3333
tools: composer:v2
3434

3535
- name: Determine composer cache directory

.github/workflows/static.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,12 @@ jobs:
2121

2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v2.3.4
24+
uses: actions/checkout@v2
2525

2626
- name: Install PHP
2727
uses: shivammathur/setup-php@v2
2828
with:
29-
php-version: "${{ matrix.php }}"
29+
php-version: ${{ matrix.php }}
3030
tools: composer:v2, cs2pr
3131
coverage: none
3232

.gitignore

+4-9
Original file line numberDiff line numberDiff line change
@@ -12,24 +12,19 @@ nbproject
1212
# windows thumbnail cache
1313
Thumbs.db
1414

15+
# Mac DS_Store Files
16+
.DS_Store
17+
1518
# composer vendor dir
1619
/vendor
17-
20+
# composer lock file
1821
/composer.lock
19-
2022
# composer itself is not needed
2123
composer.phar
2224

23-
# Mac DS_Store Files
24-
.DS_Store
25-
2625
# phpunit itself is not needed
2726
phpunit.phar
2827
# local phpunit config
2928
/phpunit.xml
3029
# phpunit cache
3130
.phpunit.result.cache
32-
33-
# Phan
34-
analysis.txt
35-

.phpunit-watcher.yml

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
watch:
2-
directories:
3-
- src
4-
- tests
5-
fileMask: '*.php'
2+
directories:
3+
- src
4+
- tests
5+
fileMask: '*.php'
66
notifications:
7-
passingTests: false
8-
failingTests: false
7+
passingTests: false
8+
failingTests: false
99
phpunit:
10-
binaryPath: vendor/bin/phpunit
11-
timeout: 180
10+
binaryPath: vendor/bin/phpunit
11+
timeout: 180

.scrutinizer.yml

+28-31
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,33 @@
11
checks:
2-
php: true
2+
php: true
33

44
filter:
5-
paths:
6-
- "src/*"
5+
paths:
6+
- "src/*"
77

88
build:
9-
nodes:
10-
analysis:
11-
environment:
12-
php: 7.4.12
13-
14-
tests:
15-
override:
16-
- php-scrutinizer-run
17-
18-
tests-and-coverage:
19-
environment:
20-
php: 7.4.12
21-
22-
dependencies:
23-
override:
24-
- composer self-update
25-
- composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
26-
27-
tests:
28-
override:
29-
-
30-
command: "./vendor/bin/phpunit --coverage-clover ./coverage.xml"
31-
on_node: 1
32-
coverage:
33-
file: coverage.xml
34-
format: php-clover
35-
36-
9+
nodes:
10+
analysis:
11+
environment:
12+
php: 7.4.12
13+
14+
tests:
15+
override:
16+
- php-scrutinizer-run
17+
18+
tests-and-coverage:
19+
environment:
20+
php: 7.4.12
21+
22+
dependencies:
23+
override:
24+
- composer self-update
25+
- composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader --ansi
26+
27+
tests:
28+
override:
29+
- command: "./vendor/bin/phpunit --coverage-clover ./coverage.xml"
30+
on_node: 1
31+
coverage:
32+
file: coverage.xml
33+
format: php-clover

0 commit comments

Comments
 (0)