Skip to content

Commit 464f119

Browse files
authored
Merge pull request #420 from GeneaLabs/laravel-9
Add Laravel 9 compatibility.
2 parents 20410c3 + bf1856d commit 464f119

File tree

4 files changed

+31
-25
lines changed

4 files changed

+31
-25
lines changed

.github/workflows/laravel.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
strategy:
1515
fail-fast: true
1616
matrix:
17-
php: [7.3, 7.4, 8.0]
17+
php: [7.4, 8.0, 8.1]
1818

1919
name: PHP ${{ matrix.php }}
2020

composer.json

+24-18
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,29 @@
1515
}
1616
],
1717
"require": {
18-
"php": "^7.3|^8.0",
19-
"genealabs/laravel-pivot-events": "^8.0",
20-
"illuminate/cache": "^8.0",
21-
"illuminate/config": "^8.0",
22-
"illuminate/console": "^8.0",
23-
"illuminate/container": "^8.0",
24-
"illuminate/database": "^8.0",
25-
"illuminate/http": "^8.0",
26-
"illuminate/support": "^8.0"
18+
"php": "^7.4|^8.0",
19+
"genealabs/laravel-pivot-events": "^9.0",
20+
"illuminate/cache": "^9.0",
21+
"illuminate/config": "^9.0",
22+
"illuminate/console": "^9.0",
23+
"illuminate/container": "^9.0",
24+
"illuminate/database": "^9.0",
25+
"illuminate/http": "^9.0",
26+
"illuminate/support": "^9.0"
2727
},
2828
"require-dev": {
29-
"doctrine/dbal": "^2.10",
29+
"doctrine/dbal": "^3.3",
3030
"fakerphp/faker": "^1.11",
3131
"laravel/nova": "^3.9",
32-
"orchestra/testbench-browser-kit": "^6.0",
33-
"orchestra/testbench": "^6.0",
32+
"orchestra/testbench-browser-kit": "^7.0",
33+
"orchestra/testbench": "^7.0",
3434
"php-coveralls/php-coveralls" : "^2.2",
35-
"phpmd/phpmd": "^2.7",
36-
"phpunit/phpunit": "^9.0",
37-
"slevomat/coding-standard": "^6.4",
38-
"squizlabs/php_codesniffer": "^3.4",
35+
"phpmd/phpmd": "^2.11",
36+
"phpunit/phpunit": "^9.5",
37+
"slevomat/coding-standard": "^7.0",
38+
"squizlabs/php_codesniffer": "^3.6",
3939
"symfony/thanks": "^1.2",
40-
"laravel/legacy-factories": "^1.0"
40+
"laravel/legacy-factories": "^1.3"
4141
},
4242
"autoload": {
4343
"psr-4": {
@@ -61,5 +61,11 @@
6161
}
6262
},
6363
"minimum-stability": "dev",
64-
"prefer-stable": true
64+
"prefer-stable": true,
65+
"config": {
66+
"allow-plugins": {
67+
"symfony/thanks": true,
68+
"dealerdirect/phpcodesniffer-composer-installer": true
69+
}
70+
}
6571
}

tests/Feature/PaginationTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class PaginationTest extends FeatureTestCase
88
public function testPaginationProvidesDifferentLinksOnDifferentPages()
99
{
1010
// Checking the version start with 8.0.
11-
if (preg_match("/^(8\.)/", app()->version())) {
11+
if (preg_match("/^([8|9]\.)/", app()->version())) {
1212
$page1ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">1</span>';
1313
$page2ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">2</span>';
1414
}
@@ -40,7 +40,7 @@ public function testPaginationProvidesDifferentLinksOnDifferentPages()
4040
public function testAdvancedPagination()
4141
{
4242
// Checking the version start with 8.0.
43-
if (preg_match("/^(8\.)/", app()->version())) {
43+
if (preg_match("/^([8|9]\.)/", app()->version())) {
4444
$page1ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">1</span>';
4545
$page2ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">2</span>';
4646
}
@@ -63,7 +63,7 @@ public function testAdvancedPagination()
6363
public function testCustomPagination()
6464
{
6565
// Checking the version start with 8.0.
66-
if (preg_match("/^(8\.)/", app()->version())) {
66+
if (preg_match("/^([8|9]\.)/", app()->version())) {
6767
$page1ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">1</span>';
6868
$page2ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">2</span>';
6969
}

tests/Integration/CachedBuilder/PaginateTest.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public function testPaginationIsCached()
3636

3737
public function testPaginationReturnsCorrectLinks()
3838
{
39-
if (preg_match("/^(8\.)/", app()->version())) {
39+
if (preg_match("/^([8|9]\.)/", app()->version())) {
4040
$page1ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">1</span>';
4141
$page2ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">2</span>';
4242
$page24ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">24</span>';
@@ -71,7 +71,7 @@ public function testPaginationReturnsCorrectLinks()
7171

7272
public function testPaginationWithOptionsReturnsCorrectLinks()
7373
{
74-
if (preg_match("/^(8\.)/", app()->version())) {
74+
if (preg_match("/^([8|9]\.)/", app()->version())) {
7575
$page1ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">1</span>';
7676
$page2ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">2</span>';
7777
$page24ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">24</span>';
@@ -106,7 +106,7 @@ public function testPaginationWithOptionsReturnsCorrectLinks()
106106

107107
public function testPaginationWithCustomOptionsReturnsCorrectLinks()
108108
{
109-
if (preg_match("/^(8\.)/", app()->version())) {
109+
if (preg_match("/^([8|9]\.)/", app()->version())) {
110110
$page1ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">1</span>';
111111
$page2ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">2</span>';
112112
$page24ActiveLink = '<span class="relative inline-flex items-center px-4 py-2 -ml-px text-sm font-medium text-gray-500 bg-white border border-gray-300 cursor-default leading-5">24</span>';

0 commit comments

Comments
 (0)