support laravel 4 translation loading

This commit is contained in:
KHOUBZA Younes
2022-05-25 02:49:17 +01:00
parent f3c06eabae
commit 6321bee506
4 changed files with 6 additions and 4 deletions
+1 -1
View File
@@ -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
+1 -1
View File
@@ -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
View File
@@ -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",
+3 -1
View File
@@ -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');
}
/**