Skip to content

Commit

Permalink
Drop support for Laravel 9
Browse files Browse the repository at this point in the history
  • Loading branch information
Sébastien Nikolaou committed Mar 1, 2025
1 parent d389dc3 commit d91889e
Show file tree
Hide file tree
Showing 8 changed files with 83 additions and 125 deletions.
9 changes: 4 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,13 @@

# Ignore all test and documentation with "export-ignore".
/.github export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.dist.php export-ignore
/phpstan-baseline.neon export-ignore
/phpstan.neon.dist export-ignore
/phpunit.xml.dist export-ignore
/tests export-ignore
/.editorconfig export-ignore
/phpstan.neon.dist export-ignore
/phpstan-baseline.neon export-ignore

* text=auto

Expand Down
28 changes: 28 additions & 0 deletions .github/workflows/fix-php-code-style-issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Fix PHP code style issues

on:
push:
paths:
- "**.php"

permissions:
contents: write

jobs:
php-code-styling:
runs-on: ubuntu-latest
timeout-minutes: 5

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}

- name: Fix PHP code style issues
uses: aglipanci/[email protected]

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: Fix styling
23 changes: 0 additions & 23 deletions .github/workflows/php-cs-fixer.yml

This file was deleted.

17 changes: 2 additions & 15 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest, windows-latest]
php: [8.4, 8.3, 8.2, 8.1, 8.0]
laravel: [12.*, 11.*, 10.*, 9.*]
php: [8.4, 8.3, 8.2, 8.1]
laravel: [12.*, 11.*, 10.*]
stability: [prefer-lowest, prefer-stable]
include:
- laravel: 12.*
Expand All @@ -27,19 +27,11 @@ jobs:
testbench: 9.*
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
exclude:
- laravel: 12.*
php: 8.1
- laravel: 12.*
php: 8.0
- laravel: 11.*
php: 8.1
- laravel: 11.*
php: 8.0
- laravel: 10.*
php: 8.0

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

Expand All @@ -59,11 +51,6 @@ jobs:
echo "::add-matcher::${{ runner.tool_cache }}/php.json"
echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json"
- name: Fix dependencies
if: ${{ startsWith(matrix.laravel, '9') }}
run: |
composer require "nesbot/carbon:^2.72.6" --no-interaction --no-update
- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
Expand Down
38 changes: 28 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,14 +1,32 @@
.idea
.php_cs
.php_cs.cache
.phpunit.result.cache
build
# Composer Related
composer.lock
coverage
docs
/vendor

# Frontend Assets
/node_modules

# Logs
npm-debug.log
yarn-error.log

# Caches
.phpunit.cache
.phpunit.result.cache
/build

# IDE Helper
_ide_helper.php
_ide_helper_models.php
.phpstorm.meta.php

# Editors
/.idea
/.fleet
/.vscode

# Misc
phpunit.xml
phpstan.neon
testbench.yaml
vendor
node_modules
.php-cs-fixer.cache
/docs
/coverage
44 changes: 0 additions & 44 deletions .php-cs-fixer.dist.php

This file was deleted.

25 changes: 13 additions & 12 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,21 @@
"require": {
"php": "^8.0",
"doctrine/sql-formatter": "^1.1",
"illuminate/contracts": "^9.36.3 | ^10.0 | ^11.0 | ^12.0",
"illuminate/view": "^9.36.3 | ^10.0 | ^11.0 | ^12.0",
"spatie/laravel-package-tools": "^1.9.2"
"illuminate/contracts": "^10.0 | ^11.0 | ^12.0",
"illuminate/view": "^10.0 | ^11.0 | ^12.0",
"spatie/laravel-package-tools": "^1.16"
},
"require-dev": {
"laravel/pint": "^1.14",
"larastan/larastan": "^2.9 | ^3.0",
"nunomaduro/collision": "^6.0 | ^7.0 | ^8.0",
"orchestra/testbench": "^7.0 | ^8.0 | ^9.0 | ^10.0",
"pestphp/pest": "^1.21 | ^2.0 | ^3.0",
"pestphp/pest-plugin-laravel": "^1.1 | ^2.0 | ^3.0",
"phpstan/extension-installer": "^1.0",
"phpstan/phpstan-deprecation-rules": "^1.0 | ^2.0",
"nunomaduro/collision": "^8.1.1 | ^7.10.0",
"orchestra/testbench": "^8.22 | ^9.0 | ^10.0",
"pestphp/pest": "^3.0",
"pestphp/pest-plugin-laravel": "^3.0",
"phpstan/extension-installer": "^1.3 | ^2.0",
"phpstan/phpstan-deprecation-rules": "^1.1 | ^2.0",
"phpstan/phpstan-phpunit": "^1.0 | ^2.0",
"phpstan/phpstan-strict-rules": "^1.0 | ^2.0",
"phpunit/phpunit": "^9.5.24 | ^10.5 | ^11.5"
"phpstan/phpstan-strict-rules": "^1.0 | ^2.0"
},
"autoload": {
"psr-4": {
Expand All @@ -48,7 +48,8 @@
"scripts": {
"phpstan": "vendor/bin/phpstan analyse",
"test": "vendor/bin/pest",
"test-coverage": "vendor/bin/pest coverage"
"test-coverage": "vendor/bin/pest coverage",
"format": "vendor/bin/pint"
},
"config": {
"sort-packages": true,
Expand Down
24 changes: 8 additions & 16 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,39 +1,31 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.3/phpunit.xsd"
backupGlobals="false"
backupStaticAttributes="false"
bootstrap="vendor/autoload.php"
colors="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
executionOrder="random"
failOnWarning="true"
failOnRisky="true"
failOnEmptyTestSuite="true"
beStrictAboutOutputDuringTests="true"
verbose="true"
cacheDirectory=".phpunit.cache"
backupStaticProperties="false"
>
<testsuites>
<testsuite name="BladeSqlFormatter Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<coverage>
<include>
<directory suffix=".php">./src</directory>
</include>
<report>
<html outputDirectory="build/coverage"/>
<text outputFile="build/coverage.txt"/>
<clover outputFile="build/logs/clover.xml"/>
</report>
</coverage>
<logging>
<junit outputFile="build/report.junit.xml"/>
</logging>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>

0 comments on commit d91889e

Please sign in to comment.