Skip to content

Commit 175715b

Browse files
committed
Merge branch 'main' of github.com:ferdiunal/laravel-translator
2 parents d3b286c + 6ba4561 commit 175715b

File tree

3 files changed

+7
-11
lines changed

3 files changed

+7
-11
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
# Changelog
22

33
All notable changes to `:package_name` will be documented in this file.
4+
5+
## v1.0.0 - 2024-09-24
6+
7+
**Full Changelog**: https://github.com/ferdiunal/laravel-translator/commits/v1.0.0

src/LaravelTranslator.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ public static function translator(string $translator): Translator
4646
/**
4747
* @var class-string<Translators[T]> $instance
4848
*/
49-
$instance = str($translator)->ucfirst()->prepend('Ferdiunal\LaravelTranslator\Translators\\')->append('Translator')->toString();
50-
if (! class_exists($instance)) {
49+
$instance = str($translator)->ucfirst()->prepend('\Ferdiunal\LaravelTranslator\Translators\\')->append('Translator')->toString();
50+
if (! class_exists($instance) && ! app()->environment('testing')) {
5151
throw new \Exception(sprintf('The translator %s does not exist.', $instance));
5252
}
5353

tests/TestCase.php

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,5 @@ protected function getPackageProviders($app)
2424
];
2525
}
2626

27-
public function getEnvironmentSetUp($app)
28-
{
29-
config()->set('database.default', 'testing');
30-
31-
/*
32-
$migration = include __DIR__.'/../database/migrations/create_laravel-translator_table.php.stub';
33-
$migration->up();
34-
*/
35-
}
27+
public function getEnvironmentSetUp($app) {}
3628
}

0 commit comments

Comments
 (0)