From 9ea2e94a29787d602f9ce2a8f69c4f53afdea7d8 Mon Sep 17 00:00:00 2001 From: Cesar Date: Tue, 8 Sep 2020 19:32:51 +0200 Subject: [PATCH 1/3] add support to laravel 8 --- .travis.yml | 10 +++++++++- composer.json | 13 +++++++------ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5f1b4c5..5f92afc 100644 --- a/.travis.yml +++ b/.travis.yml @@ -30,6 +30,10 @@ matrix: env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-lowest' - php: '7.3' env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-stable' + - php: '7.3' + env: LARAVEL='^8.0' ORCHESTRA="6.*.*" COMPOSER_FLAGS='--prefer-lowest' + - php: '7.3' + env: LARAVEL='^8.0' ORCHESTRA="6.*.*" COMPOSER_FLAGS='--prefer-stable' - php: '7.4' env: LARAVEL='5.5.*' ORCHESTRA="3.5.*" COMPOSER_FLAGS='--prefer-stable' - php: '7.4' @@ -43,7 +47,11 @@ matrix: - php: '7.4' env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-lowest' - php: '7.4' - env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-stable' RUN_PHPCS=1 + env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-stable' + - php: '7.4' + env: LARAVEL='^8.0' ORCHESTRA="6.*.*" COMPOSER_FLAGS='--prefer-lowest' + - php: '7.4' + env: LARAVEL='^8.0' ORCHESTRA="6.*.*" COMPOSER_FLAGS='--prefer-stable' RUN_PHPCS=1 before_script: - travis_retry composer self-update diff --git a/composer.json b/composer.json index c33ebb7..486b41c 100644 --- a/composer.json +++ b/composer.json @@ -13,15 +13,16 @@ "type": "library", "require": { "php": "^7.1", - "illuminate/console": "~5.5.45|~5.8|^6.0|^7.0", - "illuminate/database": "~5.5.45|~5.8|^6.0|^7.0", - "illuminate/events": "~5.5.45|~5.8|^6.0|^7.0", - "illuminate/support": "~5.5.45|~5.8|^6.0|^7.0" + "illuminate/console": "~5.5.45|~5.8|^6.0|^7.0|^8.0", + "illuminate/database": "~5.5.45|~5.8|^6.0|^7.0|^8.0", + "illuminate/events": "~5.5.45|~5.8|^6.0|^7.0|^8.0", + "illuminate/support": "~5.5.45|~5.8|^6.0|^7.0|^8.0" }, "require-dev": { "phpunit/phpunit": "^6.0|^7.0|^8.0", - "orchestra/testbench": "^3.5|^3.8|^4.0|^5.0", - "friendsofphp/php-cs-fixer": "^2.14" + "orchestra/testbench": "^3.5|^3.8|^4.0|^5.0|^6.0", + "friendsofphp/php-cs-fixer": "^2.14", + "laravel/legacy-factories": "^1.0.4" }, "autoload": { "psr-4": { From 8f37a80d53611096392ab37a8a2ef870ecd1b34c Mon Sep 17 00:00:00 2001 From: Cesar Date: Tue, 8 Sep 2020 20:52:44 +0200 Subject: [PATCH 2/3] try travis composer env --- .travis.yml | 42 +++++++++++++++++------------------ composer-prel8.json | 54 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 75 insertions(+), 21 deletions(-) create mode 100644 composer-prel8.json diff --git a/.travis.yml b/.travis.yml index 5f92afc..94e4411 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,51 +3,51 @@ language: php matrix: include: - php: '7.2' - env: LARAVEL='5.5.*' ORCHESTRA="3.5.*" COMPOSER_FLAGS='--prefer-stable' + env: LARAVEL='5.5.*' ORCHESTRA="3.5.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - php: '7.2' - env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-lowest' + env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-lowest' COMPOSER='composer-prel8.json' - php: '7.2' - env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-stable' + env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - php: '7.2' - env: LARAVEL='^6.0' ORCHESTRA="4.*.*" COMPOSER_FLAGS='--prefer-lowest' + env: LARAVEL='^6.0' ORCHESTRA="4.*.*" COMPOSER_FLAGS='--prefer-lowest' COMPOSER='composer-prel8.json' - php: '7.2' - env: LARAVEL='^6.0' ORCHESTRA="4.*.*" COMPOSER_FLAGS='--prefer-stable' + env: LARAVEL='^6.0' ORCHESTRA="4.*.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - php: '7.2' - env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-lowest' + env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-lowest' COMPOSER='composer-prel8.json' - php: '7.2' - env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-stable' + env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - php: '7.3' - env: LARAVEL='5.5.*' ORCHESTRA="3.5.*" COMPOSER_FLAGS='--prefer-stable' + env: LARAVEL='5.5.*' ORCHESTRA="3.5.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - php: '7.3' - env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-lowest' + env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-lowest' COMPOSER='composer-prel8.json' - php: '7.3' - env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-stable' + env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - php: '7.3' - env: LARAVEL='^6.0' ORCHESTRA="4.*.*" COMPOSER_FLAGS='--prefer-lowest' + env: LARAVEL='^6.0' ORCHESTRA="4.*.*" COMPOSER_FLAGS='--prefer-lowest' COMPOSER='composer-prel8.json' - php: '7.3' - env: LARAVEL='^6.0' ORCHESTRA="4.*.*" COMPOSER_FLAGS='--prefer-stable' + env: LARAVEL='^6.0' ORCHESTRA="4.*.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - php: '7.3' - env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-lowest' + env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-lowest' COMPOSER='composer-prel8.json' - php: '7.3' - env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-stable' + env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - php: '7.3' env: LARAVEL='^8.0' ORCHESTRA="6.*.*" COMPOSER_FLAGS='--prefer-lowest' - php: '7.3' env: LARAVEL='^8.0' ORCHESTRA="6.*.*" COMPOSER_FLAGS='--prefer-stable' - php: '7.4' - env: LARAVEL='5.5.*' ORCHESTRA="3.5.*" COMPOSER_FLAGS='--prefer-stable' + env: LARAVEL='5.5.*' ORCHESTRA="3.5.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - php: '7.4' - env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-lowest' + env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-lowest' COMPOSER='composer-prel8.json' - php: '7.4' - env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-stable' + env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - php: '7.4' - env: LARAVEL='^6.0' ORCHESTRA="4.*.*" COMPOSER_FLAGS='--prefer-lowest' + env: LARAVEL='^6.0' ORCHESTRA="4.*.*" COMPOSER_FLAGS='--prefer-lowest' COMPOSER='composer-prel8.json' - php: '7.4' - env: LARAVEL='^6.0' ORCHESTRA="4.*.*" COMPOSER_FLAGS='--prefer-stable' + env: LARAVEL='^6.0' ORCHESTRA="4.*.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - php: '7.4' - env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-lowest' + env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-lowest' COMPOSER='composer-prel8.json' - php: '7.4' - env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-stable' + env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - php: '7.4' env: LARAVEL='^8.0' ORCHESTRA="6.*.*" COMPOSER_FLAGS='--prefer-lowest' - php: '7.4' diff --git a/composer-prel8.json b/composer-prel8.json new file mode 100644 index 0000000..a072a91 --- /dev/null +++ b/composer-prel8.json @@ -0,0 +1,54 @@ +{ + "name": "cesargb/laravel-cascade-delete", + "description": "Cascading eliminations implemented in polymorphic relationships for the Laravel apps", + "keywords": [ + "laravel", + "elocuent", + "cascade", + "delete", + "polymorphic", + "relation", + "residual" + ], + "type": "library", + "require": { + "php": "^7.1", + "illuminate/console": "~5.5.45|~5.8|^6.0|^7.0", + "illuminate/database": "~5.5.45|~5.8|^6.0|^7.0", + "illuminate/events": "~5.5.45|~5.8|^6.0|^7.0", + "illuminate/support": "~5.5.45|~5.8|^6.0|^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0|^7.0|^8.0", + "orchestra/testbench": "^3.5|^3.8|^4.0|^5.0|^6.0", + "friendsofphp/php-cs-fixer": "^2.14" + }, + "autoload": { + "psr-4": { + "Cesargb\\Database\\Support\\": "src/" + } + }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests/" + } + }, + "scripts": { + "test": "vendor/bin/phpunit --colors=always --coverage-text" + }, + "license": "MIT", + "authors": [ + { + "name": "Cesar Garcia", + "email": "cesargb@gmail.com" + } + ], + "minimum-stability": "stable", + "extra": { + "laravel": { + "providers": [ + "Cesargb\\Database\\Support\\CascadeDeleteServiceProvider" + ] + } + } +} From d8b85c62b14ed8eca5fc8b8634adeae7d2ccd10c Mon Sep 17 00:00:00 2001 From: Cesar Date: Tue, 8 Sep 2020 20:58:25 +0200 Subject: [PATCH 3/3] remove support to l5 --- .travis.yml | 18 ------------------ composer-prel8.json | 10 +++++----- composer.json | 12 ++++++------ 3 files changed, 11 insertions(+), 29 deletions(-) diff --git a/.travis.yml b/.travis.yml index 94e4411..9e776e2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,12 +2,6 @@ language: php matrix: include: - - php: '7.2' - env: LARAVEL='5.5.*' ORCHESTRA="3.5.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - - php: '7.2' - env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-lowest' COMPOSER='composer-prel8.json' - - php: '7.2' - env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - php: '7.2' env: LARAVEL='^6.0' ORCHESTRA="4.*.*" COMPOSER_FLAGS='--prefer-lowest' COMPOSER='composer-prel8.json' - php: '7.2' @@ -16,12 +10,6 @@ matrix: env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-lowest' COMPOSER='composer-prel8.json' - php: '7.2' env: LARAVEL='^7.0' ORCHESTRA="5.*.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - - php: '7.3' - env: LARAVEL='5.5.*' ORCHESTRA="3.5.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - - php: '7.3' - env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-lowest' COMPOSER='composer-prel8.json' - - php: '7.3' - env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - php: '7.3' env: LARAVEL='^6.0' ORCHESTRA="4.*.*" COMPOSER_FLAGS='--prefer-lowest' COMPOSER='composer-prel8.json' - php: '7.3' @@ -34,12 +22,6 @@ matrix: env: LARAVEL='^8.0' ORCHESTRA="6.*.*" COMPOSER_FLAGS='--prefer-lowest' - php: '7.3' env: LARAVEL='^8.0' ORCHESTRA="6.*.*" COMPOSER_FLAGS='--prefer-stable' - - php: '7.4' - env: LARAVEL='5.5.*' ORCHESTRA="3.5.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - - php: '7.4' - env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-lowest' COMPOSER='composer-prel8.json' - - php: '7.4' - env: LARAVEL='5.8.*' ORCHESTRA="3.8.*" COMPOSER_FLAGS='--prefer-stable' COMPOSER='composer-prel8.json' - php: '7.4' env: LARAVEL='^6.0' ORCHESTRA="4.*.*" COMPOSER_FLAGS='--prefer-lowest' COMPOSER='composer-prel8.json' - php: '7.4' diff --git a/composer-prel8.json b/composer-prel8.json index a072a91..02eb413 100644 --- a/composer-prel8.json +++ b/composer-prel8.json @@ -13,14 +13,14 @@ "type": "library", "require": { "php": "^7.1", - "illuminate/console": "~5.5.45|~5.8|^6.0|^7.0", - "illuminate/database": "~5.5.45|~5.8|^6.0|^7.0", - "illuminate/events": "~5.5.45|~5.8|^6.0|^7.0", - "illuminate/support": "~5.5.45|~5.8|^6.0|^7.0" + "illuminate/console": "^6.0|^7.0", + "illuminate/database": "^6.0|^7.0", + "illuminate/events": "^6.0|^7.0", + "illuminate/support": "^6.0|^7.0" }, "require-dev": { "phpunit/phpunit": "^6.0|^7.0|^8.0", - "orchestra/testbench": "^3.5|^3.8|^4.0|^5.0|^6.0", + "orchestra/testbench": "^4.0|^5.0", "friendsofphp/php-cs-fixer": "^2.14" }, "autoload": { diff --git a/composer.json b/composer.json index 486b41c..f429e17 100644 --- a/composer.json +++ b/composer.json @@ -13,14 +13,14 @@ "type": "library", "require": { "php": "^7.1", - "illuminate/console": "~5.5.45|~5.8|^6.0|^7.0|^8.0", - "illuminate/database": "~5.5.45|~5.8|^6.0|^7.0|^8.0", - "illuminate/events": "~5.5.45|~5.8|^6.0|^7.0|^8.0", - "illuminate/support": "~5.5.45|~5.8|^6.0|^7.0|^8.0" + "illuminate/console": "^6.0|^7.0|^8.0", + "illuminate/database": "^6.0|^7.0|^8.0", + "illuminate/events": "^6.0|^7.0|^8.0", + "illuminate/support": "^6.0|^7.0|^8.0" }, "require-dev": { - "phpunit/phpunit": "^6.0|^7.0|^8.0", - "orchestra/testbench": "^3.5|^3.8|^4.0|^5.0|^6.0", + "phpunit/phpunit": "^7.0|^8.0", + "orchestra/testbench": "^4.0|^5.0|^6.0", "friendsofphp/php-cs-fixer": "^2.14", "laravel/legacy-factories": "^1.0.4" },