Skip to content

Commit f47602e

Browse files
committed
merge from v6
2 parents fbc5050 + 350b3c5 commit f47602e

File tree

5 files changed

+64
-8
lines changed

5 files changed

+64
-8
lines changed

.github/workflows/run-tests.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Unit Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- "*"
10+
schedule:
11+
- cron: '0 0 * * *'
12+
13+
jobs:
14+
php-tests:
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 15
17+
env:
18+
COMPOSER_NO_INTERACTION: 1
19+
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
php: [8.1, 8.0, 7.4, 7.3, 7.2]
24+
25+
name: P${{ matrix.php }}
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v2
30+
31+
- name: Setup PHP
32+
uses: shivammathur/setup-php@v2
33+
with:
34+
php-version: ${{ matrix.php }}
35+
coverage: none
36+
tools: composer:v2
37+
38+
- name: Install dependencies
39+
run: |
40+
composer install -o --quiet
41+
42+
- name: Execute Unit Tests
43+
run: composer test

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ composer.phar
44
composer.lock
55
.DS_Store
66
.php-cs-fixer.cache
7-
.phpunit.result.cache
7+
.phpunit.result.cache

README.markdown

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ This is a Laravel 4-8 package for working with trees in relational databases.
77

88
It is a fork of [lazychaser/laravel-nestedset](https://github.com/lazychaser/laravel-nestedset) and contains patches which are required for using the library with [Lychee](https://github.com/LycheeOrg/Lychee).
99

10-
* **Laravel 5.7, 5.8, 6.0, 7.0, 8.0** is supported since v5
10+
* **Laravel 8.0** is supported since v6
11+
* **Laravel 5.7, 5.8, 6.0, 7.0** is supported since v5
1112
* **Laravel 5.5, 5.6** is supported since v4.3
1213
* **Laravel 5.2, 5.3, 5.4** is supported since v4
1314
* **Laravel 5.1** is supported in v3

composer.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,10 +12,10 @@
1212
],
1313

1414
"require": {
15-
"php": ">=7.1.3",
16-
"illuminate/support": "~5.7.0|~5.8.0|^6.0|^7.0|^8.0",
17-
"illuminate/database": "~5.7.0|~5.8.0|^6.0|^7.0|^8.0",
18-
"illuminate/events": "~5.7.0|~5.8.0|^6.0|^7.0|^8.0"
15+
"php": "^7.2.5|^8.0",
16+
"illuminate/support": "^7.0|^8.0|^9.0",
17+
"illuminate/database": "^7.0|^8.0|^9.0",
18+
"illuminate/events": "^7.0|^8.0|^9.0"
1919
},
2020

2121
"autoload": {
@@ -26,8 +26,8 @@
2626

2727
"require-dev": {
2828
"php-parallel-lint/php-parallel-lint": "^1.2",
29-
"phpunit/phpunit": "^9.3"
30-
},
29+
"phpunit/phpunit": "7.*|8.*|9.*"
30+
},
3131

3232
"scripts": {
3333
"run-tests": [

src/BaseRelation.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -195,4 +195,16 @@ protected function matchForModel(Model $model, EloquentCollection $results)
195195

196196
return $result;
197197
}
198+
199+
/**
200+
* Get the plain foreign key.
201+
*
202+
* @return mixed
203+
*/
204+
public function getForeignKeyName()
205+
{
206+
// Return a stub value for relation
207+
// resolvers which need this function.
208+
return NestedSet::PARENT_ID;
209+
}
198210
}

0 commit comments

Comments
 (0)