Skip to content

Commit

Permalink
Drop legacy support (#15)
Browse files Browse the repository at this point in the history
Drop legacy support (< PHP 8.0, < Laravel 10)
  • Loading branch information
Robert Allport authored Mar 10, 2024
1 parent a792cc6 commit 04a0d9d
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 103 deletions.
52 changes: 0 additions & 52 deletions .github/workflows/run-tests-laravel-7.yml

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,35 +6,24 @@ jobs:
tests:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [8.0, 7.4, 8.1]
laravel: [8.*, 9.*, 10.*]
php: [8.2,8.3]
laravel: [10.*]
dependency-version: [prefer-stable]
include:
- laravel: 10.*
testbench: 8.*
- laravel: 8.*
testbench: 6.*
- laravel: 9.*
testbench: 7.*
exclude:
- laravel: 9.*
php: 7.4
- laravel: 10.*
php: 8.0
- laravel: 10.*
php: 7.4
testbench: 8.*

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

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') }}
Expand Down
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,17 @@
[![run-tests-laravel-8](https://img.shields.io/github/workflow/status/f9webltd/laravel-deletable/run-tests-laravel-8?style=flat-square)](https://github.com/f9webltd/laravel-deletable/actions)
[![StyleCI Status](https://github.styleci.io/repos/278581318/shield)](https://github.styleci.io/repos/278581318)
[![Packagist License](https://img.shields.io/packagist/l/f9webltd/laravel-deletable?style=flat-square)](https://packagist.org/packages/f9webltd/laravel-deletable)
[![PHP ^8.2](https://img.shields.io/badge/php-%5E8.2-brightgreen)]()

# Laravel Deletable

Gracefully handle deletion restrictions on your [Eloquent models](https://laravel.com/docs/7.x/eloquent), as featured on [Laravel News](https://laravel-news.com/laravel-deletable-trait)

## Requirements

PHP >= 7.2, Laravel >= 5.8.
PHP `^8.2`, Laravel `^10.0`.

PHP 8.0 is supported for Laravel >= 6x
For older versions of PHP / Laravel use version [1.0.6](https://github.com/f9webltd/laravel-deletable/tree/1.0.6)

## Installation

Expand Down
14 changes: 7 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@
}
],
"require": {
"php": "^7.2 | ^8.0",
"illuminate/config": "5.8.*|^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/container": "5.8.*|^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/contracts": "5.8.*|^6.0|^7.0|^8.0|^9.0|^10.0",
"illuminate/database": "5.8.*|^6.0|^7.0|^8.0|^9.0|^10.0"
"php": "^8.2",
"illuminate/config": "^10.0",
"illuminate/container": "^10.0",
"illuminate/contracts": "^10.0",
"illuminate/database": "^10.0"
},
"require-dev": {
"orchestra/testbench": ">=3.8",
"phpunit/phpunit": "^7.0|^8.0|^9.3"
"orchestra/testbench": "^8.8",
"phpunit/phpunit": "^10.0"
},
"autoload": {
"psr-4": {
Expand Down
36 changes: 12 additions & 24 deletions phpunit.xml.dist
Original file line number Diff line number Diff line change
@@ -1,35 +1,23 @@
<?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"
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
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>
<source>
<include>
<directory>app</directory>
</include>
</source>
<php>
<server name="APP_NAME" value="Laravel Deletable"/>
<server name="DB_CONNECTION" value="sqlite"/>
<server name="DB_DATABASE" value=":memory:"/>
<env name="APP_NAME" value="Laravel Deletable"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
</php>
</phpunit>

0 comments on commit 04a0d9d

Please sign in to comment.