Skip to content

Commit

Permalink
Drop legacy support, Support Laravel 11 (#7)
Browse files Browse the repository at this point in the history
* Drop legacy support, Support Laravel 11
  • Loading branch information
Robert Allport authored Mar 12, 2024
1 parent 683dba1 commit 7d84028
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 107 deletions.
54 changes: 0 additions & 54 deletions .github/workflows/run-tests-laravel-8.yml

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: run-tests-laravel-7
name: "Run Tests - Current"

on: [push, pull_request]

Expand All @@ -9,33 +9,39 @@ jobs:
strategy:
fail-fast: false
matrix:
php: [8.0, 7.4, 7.2]
laravel: [7.*, 6.*, 5.8.*]
php: [8.3, 8.2, 8.1, 8.0]
laravel: ["^11.0", "^10.0", "^9.0", "^8.12"]
dependency-version: [prefer-lowest, prefer-stable]
include:
- laravel: 7.*
testbench: 5.*
- laravel: 6.*
testbench: 4.*
- laravel: 5.8.*
testbench: 3.8.*
- laravel: ^11.0
testbench: 9.*
- laravel: ^10.0
testbench: 8.*
- laravel: ^9.0
testbench: 7.*
- laravel: ^8.12
testbench: ^6.23
exclude:
- laravel: 5.8.*
php: 8.0
- laravel: 5.8.*
php: 7.4
- laravel: ^10.0
php: 8.0
- laravel: ^8.12
php: 8.3
- laravel: ^11.0
php: 8.1
- laravel: ^11.0
php: 8.0

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.dependency-version }}

steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}

- name: Setup PHP
uses: shivammathur/setup-php@v2
Expand All @@ -48,5 +54,9 @@ jobs:
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" "symfony/console:>=4.3.4" "mockery/mockery:^1.3.2" --no-interaction --no-update
composer update --${{ matrix.dependency-version }} --prefer-dist --no-interaction
- name: Display PHP version
run: php -v | grep ^PHP | cut -d' ' -f2

- name: Execute tests
run: vendor/bin/phpunit --color=always tests
run: vendor/bin/phpunit
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,12 @@ Some super useful redirect response macros to simplify your Laravel application.

## Requirements

Laravel `>=5.8 | 6.x | 7.x | 8.x | 9.x | 10.x` supported
- PHP `^8.0`
- Laravel `^8.12`, `^9.0`, `^10.0` or `^11.0`

### Legacy Support

For legacy PHP / Laravel support, use package version [`1.1.6`](https://github.com/f9webltd/laravel-redirect-response-macros/tree/1.1.6)

## Installation

Expand Down
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
"role": "Developer"
}
],
"require": {
"php": "^7.2|^8.0",
"laravel/framework": "5.8.* || ^6.0 || ^7.0 || ^8.0 || ^9.0 || ^10.0"
"require": {
"php": "^8.0",
"illuminate/support": "^8.12|^9.0|^10.0|^11.0"
},
"require-dev": {
"orchestra/testbench": ">=3.8",
"phpunit/phpunit": "^7.0|^8.0|^9.3"
"orchestra/testbench": "^6.23|^7.0|^8.0|^9.0",
"phpunit/phpunit": "^9.4|^10.1"
},
"autoload": {
"psr-4": {
Expand Down
44 changes: 14 additions & 30 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,33 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
bootstrap="vendor/autoload.php"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false">
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">src/</directory>
</whitelist>
</filter>
<logging>
<log type="tap" target="build/report.tap"/>
<log type="junit" target="build/report.junit.xml"/>
<log type="coverage-html" target="build/coverage"/>
<log type="coverage-text" target="build/coverage.txt"/>
<log type="coverage-clover" target="build/logs/clover.xml"/>
</logging>
<php>
<server name="APP_NAME" value="Laravel Redirect Response Macros"/>
</php>
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.4/phpunit.xsd"
>
<source>
<include>
<directory suffix=".php">src/</directory>
</include>
</source>
<testsuites>
<testsuite name="Test Suite">
<directory>tests</directory>
</testsuite>
</testsuites>
</phpunit>

0 comments on commit 7d84028

Please sign in to comment.