Skip to content

Commit

Permalink
Remove support for old Laravel versions (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
aerni authored May 19, 2023
1 parent 565e574 commit abe56fb
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 77 deletions.
47 changes: 0 additions & 47 deletions .github/workflows/phpunit.yml

This file was deleted.

37 changes: 37 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Run Tests

on: [push, pull_request, workflow_dispatch]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
php: [8.2, 8.1]
laravel: [10.*]
stability: [prefer-stable]
include:
- laravel: 10.*
testbench: 8.*

name: PHP ${{ matrix.php }} – Laravel ${{ matrix.laravel }} - ${{ matrix.stability }}

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

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
coverage: none

- name: Install dependencies
run: |
composer require "laravel/framework:${{ matrix.laravel }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction --no-update
composer update --${{ matrix.stability }} --prefer-dist --no-interaction
- name: Run tests
run: vendor/bin/phpunit
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
.DS_Store
.idea
.phpunit.result.cache
.phpunit.cache
.php_cs.cache
.php-cs-fixer.cache
coverage
node_modules
package-lock.json
Expand Down
1 change: 0 additions & 1 deletion .php-cs-fixer.cache

This file was deleted.

4 changes: 2 additions & 2 deletions .php_cs.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

$finder = Symfony\Component\Finder\Finder::create()
->in([
__DIR__ . '/src',
__DIR__ . '/tests',
__DIR__.'/src',
__DIR__.'/tests',
])
->name('*.php')
->notName('*.blade.php')
Expand Down
12 changes: 6 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@
}
],
"require": {
"php": "^7.4|^8.0|^8.1|^8.2",
"guzzlehttp/guzzle": "^6.3|^7.0",
"illuminate/support": "^7.0|^8.0|^9.0|^10.0"
"php": "^8.1",
"guzzlehttp/guzzle": "^7.5",
"illuminate/support": "^10.0"
},
"require-dev": {
"nunomaduro/collision": "^5.0|^6.1",
"orchestra/testbench": "^6.0|^7.0|^8.0",
"phpunit/phpunit": "^9.0"
"nunomaduro/collision": "^7.0",
"orchestra/testbench": "^8.0",
"phpunit/phpunit": "^10.0"
},
"autoload": {
"psr-4": {
Expand Down
33 changes: 12 additions & 21 deletions phpunit.xml
Original file line number Diff line number Diff line change
@@ -1,23 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<phpunit bootstrap="vendor/autoload.php"
backupGlobals="false"
backupStaticAttributes="false"
colors="true"
verbose="true"
convertErrorsToExceptions="true"
convertNoticesToExceptions="true"
convertWarningsToExceptions="true"
processIsolation="false"
stopOnFailure="false"
printerClass="NunoMaduro\Collision\Adapters\Phpunit\Printer">
<testsuites>
<testsuite name="Test Suite">
<directory>./tests</directory>
</testsuite>
</testsuites>
<filter>
<whitelist>
<directory suffix=".php">./src</directory>
</whitelist>
</filter>
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" bootstrap="vendor/autoload.php" backupGlobals="false" colors="true" processIsolation="false" stopOnFailure="false" xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/10.1/phpunit.xsd" cacheDirectory=".phpunit.cache" backupStaticProperties="false">
<coverage/>
<testsuites>
<testsuite name="Test Suite">
<directory>./tests</directory>
</testsuite>
</testsuites>
<source>
<include>
<directory suffix=".php">./src</directory>
</include>
</source>
</phpunit>

0 comments on commit abe56fb

Please sign in to comment.