Skip to content

Commit c41c0b9

Browse files
authored
Merge pull request #46 from wintercms/wip/1.2
Support Laravel 9 LTS
2 parents ee7bba6 + d36fa07 commit c41c0b9

File tree

362 files changed

+10330
-12340
lines changed

Some content is hidden

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

362 files changed

+10330
-12340
lines changed

.github/workflows/code-analysis.yaml

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
name: Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- "wip/1.2"
7+
pull_request:
8+
branches:
9+
- "wip/1.2"
10+
11+
jobs:
12+
codeAnalysis:
13+
runs-on: ubuntu-latest
14+
name: Code Analysis
15+
env:
16+
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
17+
key: winter-storm-cache-v1.2
18+
steps:
19+
- name: Cancel previous incomplete runs
20+
uses: styfle/[email protected]
21+
with:
22+
access_token: ${{ github.token }}
23+
24+
- name: Checkout changes
25+
uses: actions/checkout@v2
26+
27+
- name: Setup extension cache
28+
id: extcache
29+
uses: shivammathur/cache-extensions@v1
30+
with:
31+
php-version: '8.0'
32+
extensions: ${{ env.extensions }}
33+
key: ${{ env.key }}
34+
35+
- name: Cache extensions
36+
uses: actions/cache@v2
37+
with:
38+
path: ${{ steps.extcache.outputs.dir }}
39+
key: ${{ steps.extcache.outputs.key }}
40+
restore-keys: ${{ steps.extcache.outputs.key }}
41+
42+
- name: Install PHP
43+
uses: shivammathur/setup-php@v2
44+
with:
45+
php-version: '8.0'
46+
extensions: ${{ env.extensions }}
47+
48+
- name: Setup dependency cache
49+
id: composercache
50+
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
51+
52+
- name: Cache dependencies
53+
uses: actions/cache@v2
54+
with:
55+
path: ${{ steps.composercache.outputs.dir }}
56+
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
57+
restore-keys: ${{ runner.os }}-composer-
58+
59+
- name: Install Composer dependencies
60+
run: composer install --no-interaction --no-progress --no-scripts
61+
62+
- name: Analyse code
63+
run: ./vendor/bin/phpstan analyse

.github/workflows/tests.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,19 @@ jobs:
1414
max-parallel: 6
1515
matrix:
1616
operatingSystem: [ubuntu-latest, windows-latest]
17-
phpVersion: ['7.2', '7.3', '7.4', '8.0']
17+
phpVersion: ['8.0', '8.1']
1818
fail-fast: false
1919
runs-on: ${{ matrix.operatingSystem }}
2020
name: ${{ matrix.operatingSystem }} / PHP ${{ matrix.phpVersion }}
2121
env:
2222
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
23-
key: winter-storm-cache-v1.1.2
23+
key: winter-storm-cache-v1.2
2424
steps:
25+
- name: Cancel previous incomplete runs
26+
uses: styfle/[email protected]
27+
with:
28+
access_token: ${{ github.token }}
29+
2530
- name: Checkout changes
2631
uses: actions/checkout@v2
2732

@@ -44,7 +49,6 @@ jobs:
4449
uses: shivammathur/setup-php@v2
4550
with:
4651
php-version: ${{ matrix.phpVersion }}
47-
tools: composer:v2
4852
extensions: ${{ env.extensions }}
4953

5054
- name: Setup dependency cache
@@ -62,7 +66,7 @@ jobs:
6266
run: composer install --no-interaction --no-progress --no-scripts
6367

6468
- name: Setup problem matchers for PHPUnit
65-
if: matrix.phpVersion == '7.4'
69+
if: matrix.phpVersion == '8.1'
6670
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
6771

6872
- name: Run tests

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,13 @@ composer.lock
1010
# Other files
1111
.DS_Store
1212
php_errors.log
13+
14+
#eclipse
15+
/.buildpath
16+
/.project
17+
/.settings/
18+
19+
#phpunit
20+
tests/.phpunit.result.cache
1321
.phpunit.result.cache
22+
tests/tmp

composer.json

Lines changed: 22 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
}
2323
],
2424
"require": {
25-
"php": ">=7.2.9",
25+
"php": "^8.0.2",
2626
"ext-ctype": "*",
2727
"ext-curl": "*",
2828
"ext-dom": "*",
@@ -32,27 +32,32 @@
3232
"ext-libxml": "*",
3333
"ext-mbstring": "*",
3434
"ext-openssl": "*",
35-
"ext-PDO": "*",
35+
"ext-pdo": "*",
3636
"ext-zip": "*",
37+
38+
"assetic/framework": "~3.0",
3739
"doctrine/dbal": "^2.6",
3840
"erusev/parsedown-extra": "~0.7",
39-
"linkorb/jsmin-php": "~1.0",
40-
"wikimedia/less.php": "~3.0",
41-
"scssphp/scssphp": "~1.0",
42-
"symfony/yaml": "^3.4",
43-
"twig/twig": "~2.0",
41+
"laravel/framework": "^9.1",
42+
"laravel/tinker": "^2.7",
4443
"league/csv": "~9.1",
4544
"nesbot/carbon": "^2.0",
46-
"laravel/framework": "~6.0",
47-
"laravel/tinker": "~2.0"
45+
"nikic/php-parser": "^4.10",
46+
"scssphp/scssphp": "~1.0",
47+
"symfony/yaml": "^6.0",
48+
"twig/twig": "~3.0",
49+
"wikimedia/less.php": "~3.0",
50+
"wikimedia/minify": "~2.2"
4851
},
4952
"require-dev": {
50-
"phpunit/phpunit": "^8.5.12|^9.3.3",
51-
"mockery/mockery": "~1.3.3|^1.4.2",
52-
"squizlabs/php_codesniffer": "3.*",
53+
"phpunit/phpunit": "^9.5.8",
54+
"mockery/mockery": "^1.4.4",
55+
"squizlabs/php_codesniffer": "^3.2",
5356
"php-parallel-lint/php-parallel-lint": "^1.0",
5457
"meyfa/phpunit-assert-gd": "^2.0.0|^3.0.0",
55-
"dms/phpunit-arraysubset-asserts": "^0.1.0|^0.2.1"
58+
"dms/phpunit-arraysubset-asserts": "^0.1.0|^0.2.1",
59+
"nunomaduro/larastan": "^2.0.1",
60+
"orchestra/testbench": "^7.1.0"
5661
},
5762
"suggest": {
5863
"ext-pdo_dblib": "Required to use MS SQL Server databases",
@@ -79,7 +84,10 @@
7984
"classmap": [
8085
"tests/TestCase.php",
8186
"tests/DbTestCase.php"
82-
]
87+
],
88+
"psr-4": {
89+
"Winter\\Storm\\Tests\\": "tests/"
90+
}
8391
},
8492
"scripts": {
8593
"test": [

phpcs.xml.dist

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,13 @@
99
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
1010
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace" />
1111
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace" />
12+
13+
<!-- We're not enforcing a line length limit -->
14+
<exclude name="Generic.Files.LineLength" />
1215
</rule>
1316

1417
<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
15-
<!--
16-
Migrations and tests do not need a namespace defined
17-
-->
18+
<!-- Migrations and tests do not need a namespace defined -->
1819
<exclude-pattern>*/src/Auth/Migrations/*\.php</exclude-pattern>
1920
<exclude-pattern>*/src/Database/Migrations/*\.php</exclude-pattern>
2021
<exclude-pattern>*/tests/*</exclude-pattern>
@@ -28,6 +29,9 @@
2829
<exclude-pattern>*/tests/*</exclude-pattern>
2930
</rule>
3031

32+
<arg name="extensions" value="php" />
33+
<arg name="colors" />
34+
3135
<file>src/</file>
3236
<file>tests/</file>
3337

0 commit comments

Comments
 (0)