mirror of
https://github.com/php-flasher/php-flasher.git
synced 2026-03-31 15:07:47 +01:00
support laravel 4 translation loading
This commit is contained in:
@@ -46,4 +46,4 @@ jobs:
|
||||
composer require "laravel/framework:${{ matrix.laravel }}" "phpunit/phpunit:${{ matrix.phpunit }}" "orchestra/testbench:${{ matrix.testbench }}" --no-interaction
|
||||
|
||||
- name: Execute tests
|
||||
run: vendor/bin/phpunit --configuration=phpunit-laravel.xml
|
||||
run: vendor/bin/phpunit --testdox --configuration=phpunit-laravel.xml
|
||||
|
||||
@@ -56,4 +56,4 @@ jobs:
|
||||
composer require "symfony/symfony:${{ matrix.symfony }}" "phpunit/phpunit:${{ matrix.phpunit }}" --no-interaction
|
||||
|
||||
- name: Execute tests
|
||||
run: vendor/bin/phpunit --configuration=phpunit-symfony.xml
|
||||
run: vendor/bin/phpunit --testdox --configuration=phpunit-symfony.xml
|
||||
|
||||
+1
-1
@@ -13,11 +13,11 @@
|
||||
],
|
||||
"require": {
|
||||
"php": ">=5.3",
|
||||
"ext-intl": "*",
|
||||
"ext-json": "*",
|
||||
"ext-mbstring": "*"
|
||||
},
|
||||
"require-dev": {
|
||||
"ext-intl": "*",
|
||||
"friendsofphp/php-cs-fixer": "^3.8",
|
||||
"laravel/laravel": "^9.1",
|
||||
"livewire/livewire": "^2.10",
|
||||
|
||||
@@ -203,7 +203,9 @@ final class FlasherServiceProvider extends ServiceProvider
|
||||
*/
|
||||
private function registerTranslations()
|
||||
{
|
||||
$this->loadTranslationsFrom(__DIR__.'/Translation/lang', 'flasher');
|
||||
/** @var \Illuminate\Translation\Translator $translator */
|
||||
$translator = $this->app['translator'];
|
||||
$translator->addNamespace('flasher', __DIR__.'/Translation/lang');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user