Skip to content

Commit 3e57cd3

Browse files
authored
Merge pull request #75 from Sammyjo20/feature/upgrade-codebase
Feature | Upgrade Codebase & Added Support for PHP 8.3
2 parents 954a621 + af63511 commit 3e57cd3

Some content is hidden

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

70 files changed

+1070
-1112
lines changed

.gitattributes

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,8 @@
33
.editorconfig export-ignore
44
.gitattributes export-ignore
55
.gitignore export-ignore
6-
CHANGELOG.md export-ignore
7-
phpunit.xml.dist export-ignore
6+
phpunit.xml export-ignore
7+
LICENSE export-ignore
8+
.php-cs-fixer.dist.php export-ignore
9+
package.json export-ignore
10+
webpack.mix.js export-ignore

.github/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,7 @@ Special thanks to @codepotato for the logo! ❤️
173173

174174
## Security
175175

176-
If you find any security related issues, please send me an email to [email protected].
176+
If you find any security related issues, please send an email to **[email protected]**
177177

178178
## And that's it! ✨
179179

.github/SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Security Policy
22

3-
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
3+
If you discover any security related issues, please email **[email protected]** instead of using the issue tracker.

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

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,15 @@
11
name: Code Style
22

33
on:
4-
pull_request:
5-
branches: [ 'master', 'v2.0', 'v3.0' ]
64
push:
7-
branches: [ 'master', 'v2.0', 'v3.0' ]
5+
branches:
6+
- 'v3.0'
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
permissions:
12+
contents: write
813

914
jobs:
1015
php-cs-fixer:
@@ -16,8 +21,8 @@ jobs:
1621
- name: Run PHP CS Fixer
1722
uses: docker://oskarstark/php-cs-fixer-ga
1823
with:
19-
args: --config=.php-cs-fixer.dist.php
24+
args: --config=.php-cs-fixer.dist.php --allow-risky=yes
2025
- name: Commit changes
2126
uses: stefanzweifel/git-auto-commit-action@v4
2227
with:
23-
commit_message: Apply Code Style Fixes
28+
commit_message: 🪄 Code Style Fixes

.github/workflows/phpstan.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: PHPStan
2+
3+
on:
4+
push:
5+
branches:
6+
- 'main'
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
jobs:
12+
phpstan:
13+
name: phpstan
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v3
17+
18+
- name: Setup PHP
19+
uses: shivammathur/setup-php@v2
20+
with:
21+
php-version: '8.3'
22+
coverage: none
23+
24+
- name: Install composer dependencies
25+
uses: ramsey/composer-install@v2
26+
27+
- name: Run PHPStan
28+
run: ./vendor/bin/phpstan analyse --error-format=github

.github/workflows/tests.yml

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,42 +1,51 @@
1-
name: Tests
1+
name: tests
22

3-
on: [pull_request, push]
3+
on:
4+
push:
5+
branches:
6+
- 'v3.0'
7+
pull_request:
8+
branches:
9+
- '*'
10+
11+
permissions:
12+
contents: write
413

514
jobs:
615
tests:
7-
runs-on: ubuntu-latest
16+
runs-on: ${{ matrix.os }}
817
strategy:
918
fail-fast: true
1019
matrix:
11-
php: [8.1, 8.2]
12-
laravel: [^9.0, ^10.0]
13-
dependency-version: [prefer-lowest, prefer-stable]
14-
include:
15-
- laravel: ^9.0
16-
testbench: ^7.0
17-
- laravel: ^10.0
18-
testbench: ^8.0
20+
os: [ ubuntu-latest, windows-latest ]
21+
php: [ 8.1, 8.2, 8.3 ]
22+
stability: [ prefer-lowest, prefer-stable ]
1923

20-
name: PHP ${{ matrix.php }} - Laravel ${{ matrix.laravel }} - ${{ matrix.dependency-version }}
24+
name: P${{ matrix.php }} - ${{ matrix.stability }} - ${{ matrix.os }}
2125

2226
steps:
2327
- name: Checkout code
24-
uses: actions/checkout@v2
25-
26-
- name: Cache dependencies
27-
uses: actions/cache@v2
28-
with:
29-
path: ~/.composer/cache/files
30-
key: dependencies-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
28+
uses: actions/checkout@v3
3129

3230
- name: Setup PHP
3331
uses: shivammathur/setup-php@v2
3432
with:
3533
php-version: ${{ matrix.php }}
34+
extensions: mbstring, zip, fileinfo
3635
coverage: none
3736

38-
- name: Install composer dependencies
37+
- name: Install Node Dependencies
38+
run: |
39+
npm install
40+
41+
- name: Setup problem matchers
42+
run: |
43+
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
44+
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
45+
46+
- name: Install dependencies
3947
run: |
40-
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction --no-suggest
48+
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
49+
4150
- name: Execute tests
42-
run: composer test
51+
run: ./vendor/bin/pest

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ composer.lock
55
node_modules
66
vendor
77
.php-cs-fixer.cache
8+
package-lock.json
9+
tests/Fixtures/Cloud
10+
tests/Fixtures/Public
11+
lasso-bundle.json
12+
.lasso

.php-cs-fixer.dist.php

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,4 +37,12 @@
3737
'return_type_declaration' => [
3838
'space_before' => 'none'
3939
],
40+
'declare_strict_types' => true,
41+
'blank_line_after_opening_tag' => true,
42+
'single_import_per_statement' => true,
43+
'mb_str_functions' => true,
44+
'no_superfluous_phpdoc_tags' => true,
45+
'no_blank_lines_after_phpdoc' => true,
46+
'no_empty_phpdoc' => true,
47+
'phpdoc_trim' => true,
4048
])->setFinder($finder);

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2020 Sam Carré
3+
Copyright (c) 2023 Sam Carré
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

composer.json

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@
66
"authors": [
77
{
88
"name": "Sam Carré",
9-
"email": "[email protected]"
9+
"email": "[email protected]",
10+
"role": "Developer"
1011
}
1112
],
1213
"require": {
@@ -21,11 +22,11 @@
2122
"league/flysystem": "^3.0"
2223
},
2324
"require-dev": {
24-
"phpunit/phpunit": "^9.3",
2525
"orchestra/testbench": "^7.0 || ^8.0",
2626
"friendsofphp/php-cs-fixer": "^3.1.0",
2727
"spatie/ray": "^1.33",
28-
"pestphp/pest": "^1.21"
28+
"pestphp/pest": "^2.25",
29+
"phpstan/phpstan": "^1.10"
2930
},
3031
"extra": {
3132
"laravel": {
@@ -45,7 +46,10 @@
4546
"./vendor/bin/pest"
4647
],
4748
"fix-code": [
48-
"./vendor/bin/php-cs-fixer fix"
49+
"./vendor/bin/php-cs-fixer fix --allow-risky=yes"
50+
],
51+
"pstan": [
52+
"./vendor/bin/phpstan analyse"
4953
]
5054
},
5155
"minimum-stability": "stable",

0 commit comments

Comments
 (0)