Skip to content

Commit 641bbce

Browse files
authored
Merge pull request #1 from spatie/master
sync repo
2 parents 8a41d85 + 084c483 commit 641bbce

18 files changed

+194
-140
lines changed

.editorconfig

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
; This file is for unifying the coding style for different editors and IDEs.
2-
; More information at https://editorconfig.org
3-
41
root = true
52

63
[*]
@@ -14,5 +11,5 @@ trim_trailing_whitespace = true
1411
[*.md]
1512
trim_trailing_whitespace = false
1613

17-
[*.yml]
14+
[*.{yml,yaml}]
1815
indent_size = 2

.gitattributes

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@
44
# Ignore all test and documentation with "export-ignore".
55
/.gitattributes export-ignore
66
/.gitignore export-ignore
7-
/.travis.yml export-ignore
87
/phpunit.xml.dist export-ignore
98
/tests export-ignore
109
/.editorconfig export-ignore
1110
/.php_cs export-ignore
1211
/.github export-ignore
12+
/psalm.xml export-ignore
1313

File renamed without changes.

.github/FUNDING.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
github: spatie
2-
custom: https://spatie.be/open-source/support-us
1+
github: :vendor_name
2+
custom: :author_homepage

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
blank_issues_enabled: false
2+
contact_links:
3+
- name: Ask a question
4+
url: https://github.com/:vendor_name/:package_name/discussions/new?category=q-a
5+
about: Ask the community for help
6+
- name: Request a feature
7+
url: https://github.com/:vendor_name/:package_name/discussions/new?category=ideas
8+
about: Share ideas for new features
9+
- name: Report a bug
10+
url: https://github.com/:vendor_name/:package_name/issues/new
11+
about: Report a reproducable bug

.github/SECURITY.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Security Policy
2+
3+
If you discover any security related issues, please email :author_email instead of using the issue tracker.

.github/workflows/php-cs-fixer.yml

Lines changed: 15 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,21 @@ name: Check & fix styling
33
on: [push]
44

55
jobs:
6-
style:
7-
runs-on: ubuntu-latest
6+
php-cs-fixer:
7+
runs-on: ubuntu-latest
88

9-
steps:
10-
- name: Checkout code
11-
uses: actions/checkout@v1
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v2
12+
with:
13+
ref: ${{ github.head_ref }}
1214

13-
- name: Fix style
14-
uses: docker://oskarstark/php-cs-fixer-ga
15-
with:
16-
args: --config=.php_cs --allow-risky=yes
15+
- name: Run PHP CS Fixer
16+
uses: docker://oskarstark/php-cs-fixer-ga
17+
with:
18+
args: --config=.php_cs.dist --allow-risky=yes
1719

18-
- name: Extract branch name
19-
shell: bash
20-
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
21-
id: extract_branch
22-
23-
- name: Commit changes
24-
uses: stefanzweifel/[email protected]
25-
with:
26-
commit_message: Fix styling
27-
branch: ${{ steps.extract_branch.outputs.branch }}
28-
env:
29-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
- name: Commit changes
21+
uses: stefanzweifel/git-auto-commit-action@v4
22+
with:
23+
commit_message: Fix styling

.github/workflows/psalm.yml

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
name: Psalm
22

33
on:
4-
push:
5-
paths:
6-
- '**.php'
7-
- 'psalm.xml'
4+
push:
5+
paths:
6+
- '**.php'
7+
- 'psalm.xml.dist'
88

99
jobs:
10-
psalm:
11-
name: psalm
12-
runs-on: ubuntu-latest
13-
steps:
14-
- uses: actions/checkout@v1
10+
psalm:
11+
name: psalm
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
1515

16-
- name: Setup PHP
17-
uses: shivammathur/setup-php@v2
18-
with:
19-
php-version: '7.4'
20-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
21-
coverage: none
16+
- name: Setup PHP
17+
uses: shivammathur/setup-php@v2
18+
with:
19+
php-version: '7.4'
20+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
21+
coverage: none
2222

23-
- name: Cache composer dependencies
24-
uses: actions/cache@v1
25-
with:
26-
path: vendor
27-
key: composer-${{ hashFiles('composer.lock') }}
23+
- name: Cache composer dependencies
24+
uses: actions/cache@v2
25+
with:
26+
path: vendor
27+
key: composer-${{ hashFiles('composer.lock') }}
2828

29-
- name: Run composer install
30-
run: composer install -n --prefer-dist
29+
- name: Run composer install
30+
run: composer install -n --prefer-dist
3131

32-
- name: Run psalm
33-
run: ./vendor/bin/psalm -c psalm.xml
32+
- name: Run psalm
33+
run: ./vendor/bin/psalm --output-format=github

.github/workflows/run-tests.yml

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -9,30 +9,29 @@ jobs:
99
fail-fast: true
1010
matrix:
1111
os: [ubuntu-latest, windows-latest]
12-
php: [7.4]
13-
dependency-version: [prefer-lowest, prefer-stable]
12+
php: [8.0, 7.4]
13+
stability: [prefer-lowest, prefer-stable]
1414

15-
name: P${{ matrix.php }} - ${{ matrix.dependency-version }} - ${{ matrix.os }}
15+
name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
1616

1717
steps:
1818
- name: Checkout code
19-
uses: actions/checkout@v1
20-
21-
- name: Cache dependencies
22-
uses: actions/cache@v1
23-
with:
24-
path: ~/.composer/cache/files
25-
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
19+
uses: actions/checkout@v2
2620

2721
- name: Setup PHP
2822
uses: shivammathur/setup-php@v2
2923
with:
3024
php-version: ${{ matrix.php }}
31-
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
25+
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick, fileinfo
3226
coverage: none
27+
28+
- name: Setup problem matchers
29+
run: |
30+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
31+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
3332
3433
- name: Install dependencies
35-
run: composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
34+
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction
3635

3736
- name: Execute tests
3837
run: vendor/bin/phpunit

.gitignore

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
1+
.idea
2+
.php_cs
3+
.php_cs.cache
4+
.phpunit.result.cache
15
build
26
composer.lock
7+
coverage
38
docs
9+
phpunit.xml
10+
psalm.xml
411
vendor
5-
coverage
6-
.phpunit.result.cache
7-
.php_cs.cache

0 commit comments

Comments
 (0)