Skip to content

Commit

Permalink
Merge pull request #46 from wintercms/wip/1.2
Browse files Browse the repository at this point in the history
Support Laravel 9 LTS
  • Loading branch information
LukeTowers authored Jul 15, 2022
2 parents ee7bba6 + d36fa07 commit c41c0b9
Show file tree
Hide file tree
Showing 362 changed files with 10,330 additions and 12,340 deletions.
63 changes: 63 additions & 0 deletions .github/workflows/code-analysis.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Tests

on:
push:
branches:
- "wip/1.2"
pull_request:
branches:
- "wip/1.2"

jobs:
codeAnalysis:
runs-on: ubuntu-latest
name: Code Analysis
env:
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
key: winter-storm-cache-v1.2
steps:
- name: Cancel previous incomplete runs
uses: styfle/cancel-workflow-action@0.8.0
with:
access_token: ${{ github.token }}

- name: Checkout changes
uses: actions/checkout@v2

- name: Setup extension cache
id: extcache
uses: shivammathur/cache-extensions@v1
with:
php-version: '8.0'
extensions: ${{ env.extensions }}
key: ${{ env.key }}

- name: Cache extensions
uses: actions/cache@v2
with:
path: ${{ steps.extcache.outputs.dir }}
key: ${{ steps.extcache.outputs.key }}
restore-keys: ${{ steps.extcache.outputs.key }}

- name: Install PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.0'
extensions: ${{ env.extensions }}

- name: Setup dependency cache
id: composercache
run: echo "::set-output name=dir::$(composer config cache-files-dir)"

- name: Cache dependencies
uses: actions/cache@v2
with:
path: ${{ steps.composercache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: ${{ runner.os }}-composer-

- name: Install Composer dependencies
run: composer install --no-interaction --no-progress --no-scripts

- name: Analyse code
run: ./vendor/bin/phpstan analyse
12 changes: 8 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@ jobs:
max-parallel: 6
matrix:
operatingSystem: [ubuntu-latest, windows-latest]
phpVersion: ['7.2', '7.3', '7.4', '8.0']
phpVersion: ['8.0', '8.1']
fail-fast: false
runs-on: ${{ matrix.operatingSystem }}
name: ${{ matrix.operatingSystem }} / PHP ${{ matrix.phpVersion }}
env:
extensions: curl, fileinfo, gd, mbstring, openssl, pdo, pdo_sqlite, sqlite3, xml, zip
key: winter-storm-cache-v1.1.2
key: winter-storm-cache-v1.2
steps:
- name: Cancel previous incomplete runs
uses: styfle/cancel-workflow-action@0.8.0
with:
access_token: ${{ github.token }}

- name: Checkout changes
uses: actions/checkout@v2

Expand All @@ -44,7 +49,6 @@ jobs:
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.phpVersion }}
tools: composer:v2
extensions: ${{ env.extensions }}

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

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

- name: Run tests
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,13 @@ composer.lock
# Other files
.DS_Store
php_errors.log

#eclipse
/.buildpath
/.project
/.settings/

#phpunit
tests/.phpunit.result.cache
.phpunit.result.cache
tests/tmp
36 changes: 22 additions & 14 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
}
],
"require": {
"php": ">=7.2.9",
"php": "^8.0.2",
"ext-ctype": "*",
"ext-curl": "*",
"ext-dom": "*",
Expand All @@ -32,27 +32,32 @@
"ext-libxml": "*",
"ext-mbstring": "*",
"ext-openssl": "*",
"ext-PDO": "*",
"ext-pdo": "*",
"ext-zip": "*",

"assetic/framework": "~3.0",
"doctrine/dbal": "^2.6",
"erusev/parsedown-extra": "~0.7",
"linkorb/jsmin-php": "~1.0",
"wikimedia/less.php": "~3.0",
"scssphp/scssphp": "~1.0",
"symfony/yaml": "^3.4",
"twig/twig": "~2.0",
"laravel/framework": "^9.1",
"laravel/tinker": "^2.7",
"league/csv": "~9.1",
"nesbot/carbon": "^2.0",
"laravel/framework": "~6.0",
"laravel/tinker": "~2.0"
"nikic/php-parser": "^4.10",
"scssphp/scssphp": "~1.0",
"symfony/yaml": "^6.0",
"twig/twig": "~3.0",
"wikimedia/less.php": "~3.0",
"wikimedia/minify": "~2.2"
},
"require-dev": {
"phpunit/phpunit": "^8.5.12|^9.3.3",
"mockery/mockery": "~1.3.3|^1.4.2",
"squizlabs/php_codesniffer": "3.*",
"phpunit/phpunit": "^9.5.8",
"mockery/mockery": "^1.4.4",
"squizlabs/php_codesniffer": "^3.2",
"php-parallel-lint/php-parallel-lint": "^1.0",
"meyfa/phpunit-assert-gd": "^2.0.0|^3.0.0",
"dms/phpunit-arraysubset-asserts": "^0.1.0|^0.2.1"
"dms/phpunit-arraysubset-asserts": "^0.1.0|^0.2.1",
"nunomaduro/larastan": "^2.0.1",
"orchestra/testbench": "^7.1.0"
},
"suggest": {
"ext-pdo_dblib": "Required to use MS SQL Server databases",
Expand All @@ -79,7 +84,10 @@
"classmap": [
"tests/TestCase.php",
"tests/DbTestCase.php"
]
],
"psr-4": {
"Winter\\Storm\\Tests\\": "tests/"
}
},
"scripts": {
"test": [
Expand Down
10 changes: 7 additions & 3 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@
<exclude name="PSR1.Methods.CamelCapsMethodName.NotCamelCaps" />
<exclude name="Squiz.ControlStructures.ControlSignature.SpaceAfterCloseBrace" />
<exclude name="PSR2.ControlStructures.ControlStructureSpacing.SpacingAfterOpenBrace" />

<!-- We're not enforcing a line length limit -->
<exclude name="Generic.Files.LineLength" />
</rule>

<rule ref="PSR1.Classes.ClassDeclaration.MissingNamespace">
<!--
Migrations and tests do not need a namespace defined
-->
<!-- Migrations and tests do not need a namespace defined -->
<exclude-pattern>*/src/Auth/Migrations/*\.php</exclude-pattern>
<exclude-pattern>*/src/Database/Migrations/*\.php</exclude-pattern>
<exclude-pattern>*/tests/*</exclude-pattern>
Expand All @@ -28,6 +29,9 @@
<exclude-pattern>*/tests/*</exclude-pattern>
</rule>

<arg name="extensions" value="php" />
<arg name="colors" />

<file>src/</file>
<file>tests/</file>

Expand Down
Loading

0 comments on commit c41c0b9

Please sign in to comment.