Skip to content

Commit

Permalink
Add support laravel 11
Browse files Browse the repository at this point in the history
  • Loading branch information
ricardogobbosouza committed Apr 26, 2024
1 parent ea1b237 commit 157000b
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 29 deletions.
26 changes: 17 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,26 +10,32 @@ jobs:
fail-fast: true
matrix:
os: [ubuntu-latest]
php: [7.4, 8.0, 8.1]
laravel: [^8.0, ^9.0, ^10.0]
php: [7.4, 8.0, 8.1, 8.2]
laravel: [^8.0, ^9.0, ^10.0, ^11.0]
#stability: [prefer-lowest, prefer-stable]
stability: [prefer-stable]
exclude:
- php: 7.4
laravel: 9
laravel: ^9.0
- php: 7.4
laravel: 10
laravel: ^10.0
- php: 7.4
laravel: ^11.0
- php: 8.0
laravel: ^10.0
- php: 8.0
laravel: 10
laravel: ^11.0
- php: 8.1
laravel: ^11.0

name: P${{ matrix.php }} - L${{ matrix.laravel }} - ${{ matrix.stability }} - ${{ matrix.os }}

steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
Expand All @@ -45,7 +51,9 @@ jobs:
run: composer update --${{ matrix.stability }} --prefer-dist --no-interaction --no-suggest

- name: Execute tests
run: vendor/bin/phpunit --verbose
run: vendor/bin/phpunit

- name: Coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
16 changes: 7 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,14 @@
"php": "^7.4|^8.0",
"datalogix/laravel-translation": "^1.1|^2.0",
"datalogix/laravel-validation": "^1.3|^2.0",
"illuminate/contracts": "^8.0|^9.0|^10.0",
"illuminate/database": "^8.0|^9.0|^10.0",
"illuminate/pagination": "^8.0|^9.0|^10.0",
"illuminate/support": "^8.0|^9.0|^10.0"
"illuminate/contracts": "^8.0|^9.0|^10.0|^11.0",
"illuminate/database": "^8.0|^9.0|^10.0|^11.0",
"illuminate/pagination": "^8.0|^9.0|^10.0|^11.0",
"illuminate/support": "^8.0|^9.0|^10.0|^11.0"
},
"require-dev": {
"graham-campbell/testbench": "^6.0",
"phpunit/phpunit": "^9.5|^10.0",
"spatie/phpunit-watcher": "^1.23"
"graham-campbell/testbench": "^6.1",
"phpunit/phpunit": "^9.5|^10.5"
},
"autoload": {
"psr-4": {
Expand All @@ -48,8 +47,7 @@
}
},
"scripts": {
"test": "vendor/bin/phpunit",
"watch": "vendor/bin/phpunit-watcher watch"
"test": "vendor/bin/phpunit"
},
"extra": {
"laravel": {
Expand Down
8 changes: 0 additions & 8 deletions tests/CustomValuesTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Schema\Builder;
use Illuminate\Pagination\Paginator;
use Illuminate\Support\Carbon;
use Illuminate\Support\Facades\URL;

class CustomValuesTest extends TestCase
Expand Down Expand Up @@ -44,13 +43,6 @@ public function testModelUnguarded()
$this->assertTrue(Model::isUnguarded());
}

public function testLocale()
{
$this->app->setLocale('en');

$this->assertEquals('01 January 2020', Carbon::parse('2020-01-01')->formatLocalized('%d %B %Y'));
}

public function testSchemaDefaultStringLength()
{
$this->assertEquals(255, Builder::$defaultStringLength);
Expand Down
3 changes: 0 additions & 3 deletions tests/TestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,6 @@

abstract class TestCase extends AbstractPackageTestCase
{
/**
* Get the service provider class.
*/
protected static function getServiceProviderClass(): string
{
return UtilsServiceProvider::class;
Expand Down

0 comments on commit 157000b

Please sign in to comment.