Skip to content

Add Laravel 9 compatibility. #420

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 9, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/laravel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: true
matrix:
php: [7.3, 7.4, 8.0]
php: [7.4, 8.0, 8.1]

name: PHP ${{ matrix.php }}

Expand Down
42 changes: 24 additions & 18 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,29 +15,29 @@
}
],
"require": {
"php": "^7.3|^8.0",
"genealabs/laravel-pivot-events": "^8.0",
"illuminate/cache": "^8.0",
"illuminate/config": "^8.0",
"illuminate/console": "^8.0",
"illuminate/container": "^8.0",
"illuminate/database": "^8.0",
"illuminate/http": "^8.0",
"illuminate/support": "^8.0"
"php": "^7.4|^8.0",
"genealabs/laravel-pivot-events": "^9.0",
"illuminate/cache": "^9.0",
"illuminate/config": "^9.0",
"illuminate/console": "^9.0",
"illuminate/container": "^9.0",
"illuminate/database": "^9.0",
"illuminate/http": "^9.0",
"illuminate/support": "^9.0"
},
"require-dev": {
"doctrine/dbal": "^2.10",
"doctrine/dbal": "^3.3",
"fakerphp/faker": "^1.11",
"laravel/nova": "^3.9",
"orchestra/testbench-browser-kit": "^6.0",
"orchestra/testbench": "^6.0",
"orchestra/testbench-browser-kit": "^7.0",
"orchestra/testbench": "^7.0",
"php-coveralls/php-coveralls" : "^2.2",
"phpmd/phpmd": "^2.7",
"phpunit/phpunit": "^9.0",
"slevomat/coding-standard": "^6.4",
"squizlabs/php_codesniffer": "^3.4",
"phpmd/phpmd": "^2.11",
"phpunit/phpunit": "^9.5",
"slevomat/coding-standard": "^7.0",
"squizlabs/php_codesniffer": "^3.6",
"symfony/thanks": "^1.2",
"laravel/legacy-factories": "^1.0"
"laravel/legacy-factories": "^1.3"
},
"autoload": {
"psr-4": {
Expand All @@ -61,5 +61,11 @@
}
},
"minimum-stability": "dev",
"prefer-stable": true
"prefer-stable": true,
"config": {
"allow-plugins": {
"symfony/thanks": true,
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
6 changes: 3 additions & 3 deletions tests/Feature/PaginationTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class PaginationTest extends FeatureTestCase
public function testPaginationProvidesDifferentLinksOnDifferentPages()
{
// Checking the version start with 8.0.
if (preg_match("/^(8\.)/", app()->version())) {
if (preg_match("/^([8|9]\.)/", app()->version())) {
$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>';
$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>';
}
Expand Down Expand Up @@ -40,7 +40,7 @@ public function testPaginationProvidesDifferentLinksOnDifferentPages()
public function testAdvancedPagination()
{
// Checking the version start with 8.0.
if (preg_match("/^(8\.)/", app()->version())) {
if (preg_match("/^([8|9]\.)/", app()->version())) {
$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>';
$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>';
}
Expand All @@ -63,7 +63,7 @@ public function testAdvancedPagination()
public function testCustomPagination()
{
// Checking the version start with 8.0.
if (preg_match("/^(8\.)/", app()->version())) {
if (preg_match("/^([8|9]\.)/", app()->version())) {
$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>';
$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>';
}
Expand Down
6 changes: 3 additions & 3 deletions tests/Integration/CachedBuilder/PaginateTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ public function testPaginationIsCached()

public function testPaginationReturnsCorrectLinks()
{
if (preg_match("/^(8\.)/", app()->version())) {
if (preg_match("/^([8|9]\.)/", app()->version())) {
$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>';
$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>';
$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>';
Expand Down Expand Up @@ -71,7 +71,7 @@ public function testPaginationReturnsCorrectLinks()

public function testPaginationWithOptionsReturnsCorrectLinks()
{
if (preg_match("/^(8\.)/", app()->version())) {
if (preg_match("/^([8|9]\.)/", app()->version())) {
$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>';
$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>';
$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>';
Expand Down Expand Up @@ -106,7 +106,7 @@ public function testPaginationWithOptionsReturnsCorrectLinks()

public function testPaginationWithCustomOptionsReturnsCorrectLinks()
{
if (preg_match("/^(8\.)/", app()->version())) {
if (preg_match("/^([8|9]\.)/", app()->version())) {
$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>';
$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>';
$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>';
Expand Down