Skip to content

Commit f790e9c

Browse files
authored
Merge pull request #372 from GeneaLabs/feature/upgrade-to-laravel-8
Update to Laravel 8.
2 parents 3f89d7b + 3f7677d commit f790e9c

File tree

4 files changed

+49
-19
lines changed

4 files changed

+49
-19
lines changed

.scrutinizer.yml

-7
This file was deleted.

composer.json

+13-12
Original file line numberDiff line numberDiff line change
@@ -16,27 +16,28 @@
1616
],
1717
"require": {
1818
"php": ">=7.3",
19-
"genealabs/laravel-pivot-events": "^0.3.0",
20-
"illuminate/cache": "^7.0",
21-
"illuminate/config": "^7.0",
22-
"illuminate/console": "^7.0",
23-
"illuminate/container": "^7.0",
24-
"illuminate/database": "^7.0",
25-
"illuminate/http": "^7.0",
26-
"illuminate/support": "^7.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"
2727
},
2828
"require-dev": {
2929
"doctrine/dbal": "^2.10",
3030
"fzaninotto/faker": "^1.9",
31-
"laravel/nova": "^3.0",
32-
"orchestra/testbench-browser-kit": "^5.0",
33-
"orchestra/testbench": "^5.0",
31+
"laravel/nova": "^3.9",
32+
"orchestra/testbench-browser-kit": "^6.0",
33+
"orchestra/testbench": "^6.0",
3434
"php-coveralls/php-coveralls" : "^2.2",
3535
"phpmd/phpmd": "^2.7",
3636
"phpunit/phpunit": "^8.0",
3737
"sebastian/phpcpd": "^5.0",
3838
"squizlabs/php_codesniffer": "^3.4",
39-
"symfony/thanks": "^1.2"
39+
"symfony/thanks": "^1.2",
40+
"laravel/legacy-factories": "^1.0"
4041
},
4142
"autoload": {
4243
"psr-4": {

tests/Feature/PaginationTest.php

+18
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,12 @@ class PaginationTest extends FeatureTestCase
77
{
88
public function testPaginationProvidesDifferentLinksOnDifferentPages()
99
{
10+
// Checking the version start with 8.0.
11+
if (preg_match("/^(8\.)/", app()->version())) {
12+
$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>';
13+
$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>';
14+
}
15+
1016
// Checking the version start with 5.6, 5.7, 5.8 or 6.
1117
if (preg_match("/^((5\.[6-8])|(6\.)|(7\.))/", app()->version())) {
1218
$page1ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li>';
@@ -33,6 +39,12 @@ public function testPaginationProvidesDifferentLinksOnDifferentPages()
3339

3440
public function testAdvancedPagination()
3541
{
42+
// Checking the version start with 8.0.
43+
if (preg_match("/^(8\.)/", app()->version())) {
44+
$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>';
45+
$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>';
46+
}
47+
3648
if (preg_match("/^((5\.[6-8])|(6\.)|(7\.))/", app()->version())) {
3749
$page1ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li>';
3850
$page2ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">2</span></li>';
@@ -50,6 +62,12 @@ public function testAdvancedPagination()
5062

5163
public function testCustomPagination()
5264
{
65+
// Checking the version start with 8.0.
66+
if (preg_match("/^(8\.)/", app()->version())) {
67+
$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>';
68+
$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>';
69+
}
70+
5371
if (preg_match("/^((5\.[6-8])|(6\.)|(7\.))/", app()->version())) {
5472
$page1ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li>';
5573
$page2ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">2</span></li>';

tests/Integration/CachedBuilder/PaginateTest.php

+18
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,12 @@ public function testPaginationIsCached()
3636

3737
public function testPaginationReturnsCorrectLinks()
3838
{
39+
if (preg_match("/^(8\.)/", app()->version())) {
40+
$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>';
41+
$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>';
42+
$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>';
43+
}
44+
3945
if (preg_match("/^((5\.[6-8])|(6\.)|(7\.))/", app()->version())) {
4046
$page1ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li>';
4147
$page2ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">2</span></li>';
@@ -65,6 +71,12 @@ public function testPaginationReturnsCorrectLinks()
6571

6672
public function testPaginationWithOptionsReturnsCorrectLinks()
6773
{
74+
if (preg_match("/^(8\.)/", app()->version())) {
75+
$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>';
76+
$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>';
77+
$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>';
78+
}
79+
6880
if (preg_match("/^((5\.[6-8])|(6\.)|(7\.))/", app()->version())) {
6981
$page1ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li>';
7082
$page2ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">2</span></li>';
@@ -94,6 +106,12 @@ public function testPaginationWithOptionsReturnsCorrectLinks()
94106

95107
public function testPaginationWithCustomOptionsReturnsCorrectLinks()
96108
{
109+
if (preg_match("/^(8\.)/", app()->version())) {
110+
$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>';
111+
$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>';
112+
$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>';
113+
}
114+
97115
if (preg_match("/^((5\.[6-8])|(6\.)|(7\.))/", app()->version())) {
98116
$page1ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">1</span></li>';
99117
$page2ActiveLink = '<li class="page-item active" aria-current="page"><span class="page-link">2</span></li>';

0 commit comments

Comments
 (0)