Skip to content

Commit

Permalink
Laravel 11 compatibility
Browse files Browse the repository at this point in the history
Co-authored-by: Alexandre R <[email protected]>
  • Loading branch information
Ange7 and Alexandre R authored Apr 19, 2024
1 parent c6b3c62 commit 9cd0d51
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
8 changes: 7 additions & 1 deletion .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,22 @@ jobs:
matrix:
os: [ ubuntu-latest ]
php: [ 8.2, 8.1 ]
laravel: [ 9.*, 10.* ]
laravel: [ 9.*, 10.*, 11.* ]
dependency-version: [ prefer-stable ]
include:
- laravel: 11.*
testbench: 9.*
- laravel: 10.*
testbench: 8.*
- laravel: 9.*
testbench: 7.*
exclude:
- laravel: 10.*
php: 8.0
- laravel: 11.*
php: 8.1
- laravel: 11.*
php: 8.0

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

Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@
"license": "MIT",
"require": {
"php": "^8.1",
"illuminate/translation": "^9.0|^10.0"
"illuminate/translation": "^9.0|^10.0|^11.0"
},
"require-dev": {
"laravel/pint": "^1.10",
"phpunit/phpunit": "^9.3.3",
"orchestra/testbench": "^7.0|^8.0"
"phpunit/phpunit": "^9.3.3|^10.5",
"orchestra/testbench": "^7.0|^8.0|^9.0"
},
"autoload": {
"psr-4": {
Expand Down
2 changes: 1 addition & 1 deletion src/TranslationLoaderManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function load($locale, $group, $namespace = null): array
protected function getTranslationsForTranslationLoaders(
string $locale,
string $group,
string $namespace = null
?string $namespace = null
): array {
return collect(config('translation-loader.translation_loaders'))
->map(function (string $className) {
Expand Down
2 changes: 1 addition & 1 deletion tests/DummyLoader.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

class DummyLoader implements TranslationLoader
{
public function loadTranslations(string $locale, string $group, string $namespace = null): array
public function loadTranslations(string $locale, string $group, ?string $namespace = null): array
{
return ['dummy' => 'this is dummy'];
}
Expand Down

0 comments on commit 9cd0d51

Please sign in to comment.