Skip to content

Commit

Permalink
version 8 with Laravel 10 (#14)
Browse files Browse the repository at this point in the history
- Upgrade dependencies requirements
- disable phpstan (failing anyway)
  • Loading branch information
ildyria authored Feb 15, 2023
1 parent dd45e10 commit eb7480b
Show file tree
Hide file tree
Showing 4 changed files with 976 additions and 816 deletions.
39 changes: 19 additions & 20 deletions .github/workflows/CI.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
php-version: 8.1

- name: Checkout code
uses: actions/checkout@v3
Expand Down Expand Up @@ -63,27 +63,27 @@ jobs:
- name: Check source code for code style errors
run: PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --config=.php-cs-fixer.php --verbose --diff --dry-run

phpstan:
name: 2️⃣ PHP 8.1 - PHPStan
runs-on: ubuntu-latest
needs:
- php_syntax_errors
steps:
- name: Checkout code
uses: actions/checkout@v3
# phpstan:
# name: 2️⃣ PHP 8.1 - PHPStan
# runs-on: ubuntu-latest
# needs:
# - php_syntax_errors
# steps:
# - name: Checkout code
# uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.0
coverage: none
tools: phpstan
# - name: Setup PHP
# uses: shivammathur/setup-php@v2
# with:
# php-version: 8.1
# coverage: none
# tools: phpstan

- name: Install Composer dependencies
uses: ramsey/composer-install@v2
# - name: Install Composer dependencies
# uses: ramsey/composer-install@v2

- name: Run PHPStan
run: vendor/bin/phpstan analyze
# - name: Run PHPStan
# run: vendor/bin/phpstan analyze

tests:
name: 2️⃣ PHP ${{ matrix.php-version }}
Expand All @@ -94,7 +94,6 @@ jobs:
fail-fast: false
matrix:
php-version:
- 8.0
- 8.1
- 8.2

Expand Down
15 changes: 8 additions & 7 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,20 @@
[![Latest Unstable Version](https://poser.pugx.org/lychee-org/nestedset/v/unstable.svg)](https://packagist.org/packages/lychee-org/nestedset)
[![License](https://poser.pugx.org/lychee-org/nestedset/license.svg)](https://packagist.org/packages/lychee-org/nestedset)

This is a Laravel 4-8 package for working with trees in relational databases.
This is a Laravel 4-10 package for working with trees in relational databases.

It is a fork of [lazychaser/laravel-nestedset](https://github.com/lazychaser/laravel-nestedset) and contains general patches which are required for using the library with [Lychee](https://github.com/LycheeOrg/Lychee). Note that the patches are **not** specific for Lychee, but a generally useful. Inter alia:

* Routines respect a foreign key constraint on the parent-child-relation by taking care that changes to the tree are applied in the correct order.
* The code does not fail if the model which uses `NoteTrait` does not directly extend `Model` but indirectly inherits `Model` via another parent class.

* **Laravel 9.0** is supported since v7
* _**Laravel 8.0** is supported since v6.0.1_
* _**Laravel 7.0** is supported since v5_
* _**Laravel 5.7, 5.8, 6.0** is supported since v5_
* _**Laravel 5.5, 5.6** is supported since v4.3_
* _**Laravel 5.2, 5.3, 5.4** is supported since v4_
* **Laravel 10.0** is supported in v8
* **Laravel 9.0** is supported in v7
* _**Laravel 8.0** is supported in v6.0.1_
* _**Laravel 7.0** is supported in v5_
* _**Laravel 5.7, 5.8, 6.0** is supported in v5_
* _**Laravel 5.5, 5.6** is supported in v4.3_
* _**Laravel 5.2, 5.3, 5.4** is supported in v4_
* _**Laravel 5.1** is supported in v3_
* _**Laravel 4** is supported in v2_

Expand Down
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lychee-org/nestedset",
"description": "Nested Set Model for Laravel 5.7 and up (fork with patches for Lychee)",
"description": "Nested Set Model for Laravel 10.0 and up (fork with patches for Lychee)",
"keywords": [
"laravel",
"nested sets",
Expand All @@ -22,18 +22,18 @@
}
],
"require": {
"php": "^8.0",
"illuminate/support": "^9.0",
"illuminate/database": "^9.0",
"illuminate/events": "^9.0"
"php": "^8.1",
"illuminate/support": "^10.0",
"illuminate/database": "^10.0",
"illuminate/events": "^10.0"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "^3.3",
"php-parallel-lint/php-parallel-lint": "^1.2",
"phpunit/phpunit": "^9.5.20",
"lychee-org/phpstan-lychee": "dev-master",
"lychee-org/phpstan-lychee": "^1.0",
"nunomaduro/larastan": "^2.0",
"orchestra/testbench": "^7.15"
"orchestra/testbench": "^8.0"
},
"autoload": {
"psr-4": {
Expand Down Expand Up @@ -65,15 +65,15 @@
"prefer-stable": true,
"config": {
"platform": {
"php": "8.0.2"
"php": "8.1"
},
"preferred-install": "dist",
"sort-packages": true,
"optimize-autoloader": true
},
"extra": {
"branch-alias": {
"dev-master": "v5.0.x-dev"
"dev-master": "v8.0.x-dev"
},
"laravel": {
"providers": [
Expand Down
Loading

0 comments on commit eb7480b

Please sign in to comment.