Skip to content

Commit

Permalink
fix namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
Gummibeer committed Apr 17, 2024
1 parent 454fe45 commit 0916bce
Show file tree
Hide file tree
Showing 19 changed files with 31 additions and 40 deletions.
12 changes: 1 addition & 11 deletions .github/workflows/phpunit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php: ['8.1', '8.2']
php: ['8.1', '8.2', '8.3']
laravel: ['10.*', '11.*']
dependency-version: [prefer-stable]
os: [ubuntu-latest]
Expand All @@ -27,16 +27,6 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.composer/cache/files
key: dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-${{ hashFiles('composer.json') }}
restore-keys: |
dependencies-laravel-${{ matrix.laravel }}-php-${{ matrix.php }}-composer-
dependencies-laravel-${{ matrix.laravel }}-php-
dependencies-laravel-
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,8 @@ If you discover any security related issues, please check [SECURITY](https://git
## Versions

| Package | Laravel | PHP |
| :------------------ | :---------------------------- | :-------- |
|:--------------------|:------------------------------|:----------|
| **v11.13 - v11.13** | `10.* / 11.*` | `^8.1` |
| **v11.12 - v11.12** | `8.* / 9.* / 10.*` | `^8.0` |
| **v11.10 - v11.11** | `8.* / 9.*` | `^8.0` |
| **v11.6 - v11.9** | `5.8.* / 6.* / 7.* / 8.*` | `>=7.2` |
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
},
"autoload-dev": {
"psr-4": {
"Astrotomic\\Translatable\\Tests\\": "tests/"
"Tests\\": "tests/"
}
},
"config": {
Expand Down
2 changes: 1 addition & 1 deletion tests/Eloquent/Country.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Astrotomic\Translatable\Tests\Eloquent;
namespace Tests\Eloquent;

use Astrotomic\Translatable\Contracts\Translatable as TranslatableContract;
use Astrotomic\Translatable\Translatable;
Expand Down
4 changes: 2 additions & 2 deletions tests/Eloquent/CountryStrict.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Astrotomic\Translatable\Tests\Eloquent;
namespace Tests\Eloquent;

use Astrotomic\Translatable\Contracts\Translatable as TranslatableContract;
use Astrotomic\Translatable\Translatable;
Expand All @@ -19,7 +19,7 @@ class CountryStrict extends Eloquent implements TranslatableContract

/**
* Here we set a custom model for translation.
* The convention would be Astrotomic\Translatable\Tests\Models\CountryStrictTranslation.
* The convention would be Tests\Models\CountryStrictTranslation.
*
* @var string Class containing the translation
*/
Expand Down
2 changes: 1 addition & 1 deletion tests/Eloquent/CountryTranslation.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Astrotomic\Translatable\Tests\Eloquent;
namespace Tests\Eloquent;

use Illuminate\Database\Eloquent\Model as Eloquent;

Expand Down
2 changes: 1 addition & 1 deletion tests/Eloquent/Person.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Astrotomic\Translatable\Tests\Eloquent;
namespace Tests\Eloquent;

use Astrotomic\Translatable\Contracts\Translatable as TranslatableContract;
use Astrotomic\Translatable\Translatable;
Expand Down
2 changes: 1 addition & 1 deletion tests/Eloquent/PersonTranslation.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Astrotomic\Translatable\Tests\Eloquent;
namespace Tests\Eloquent;

use Illuminate\Database\Eloquent\Model as Eloquent;

Expand Down
2 changes: 1 addition & 1 deletion tests/Eloquent/StrictTranslation.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Astrotomic\Translatable\Tests\Eloquent;
namespace Tests\Eloquent;

use Illuminate\Database\Eloquent\Model as Eloquent;

Expand Down
2 changes: 1 addition & 1 deletion tests/Eloquent/Vegetable.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Astrotomic\Translatable\Tests\Eloquent;
namespace Tests\Eloquent;

use Astrotomic\Translatable\Contracts\Translatable as TranslatableContract;
use Astrotomic\Translatable\Translatable;
Expand Down
2 changes: 1 addition & 1 deletion tests/Eloquent/VegetableTranslation.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Astrotomic\Translatable\Tests\Eloquent;
namespace Tests\Eloquent;

use Illuminate\Database\Eloquent\Model as Eloquent;

Expand Down
4 changes: 2 additions & 2 deletions tests/EloquentOverrideTest.php
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?php

namespace Astrotomic\Translatable\Tests;
namespace Tests;

use Astrotomic\Translatable\Tests\Eloquent\Vegetable;
use Tests\Eloquent\Vegetable;

final class EloquentOverrideTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/LocalesTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Astrotomic\Translatable\Tests;
namespace Tests;

use Astrotomic\Translatable\Exception\LocalesNotDefinedException;
use Astrotomic\Translatable\Locales;
Expand Down
6 changes: 3 additions & 3 deletions tests/ScopesTest.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?php

namespace Astrotomic\Translatable\Tests;
namespace Tests;

use Astrotomic\Translatable\Tests\Eloquent\Country;
use Astrotomic\Translatable\Tests\Eloquent\Vegetable;
use Tests\Eloquent\Country;
use Tests\Eloquent\Vegetable;

final class ScopesTest extends TestCase
{
Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Astrotomic\Translatable\Tests;
namespace Tests;

use Astrotomic\Translatable\TranslatableServiceProvider;
use Illuminate\Database\Schema\Blueprint;
Expand Down
16 changes: 8 additions & 8 deletions tests/TranslatableTest.php
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<?php

namespace Astrotomic\Translatable\Tests;
namespace Tests;

use Astrotomic\Translatable\Locales;
use Astrotomic\Translatable\Tests\Eloquent\Country;
use Astrotomic\Translatable\Tests\Eloquent\CountryStrict;
use Astrotomic\Translatable\Tests\Eloquent\CountryTranslation;
use Astrotomic\Translatable\Tests\Eloquent\Person;
use Astrotomic\Translatable\Tests\Eloquent\Vegetable;
use Astrotomic\Translatable\Tests\Eloquent\VegetableTranslation;
use Tests\Eloquent\Country;
use Tests\Eloquent\CountryStrict;
use Tests\Eloquent\CountryTranslation;
use Tests\Eloquent\Person;
use Tests\Eloquent\Vegetable;
use Tests\Eloquent\VegetableTranslation;
use Illuminate\Database\Eloquent\MassAssignmentException;
use Illuminate\Database\Eloquent\ModelNotFoundException;
use Illuminate\Support\Facades\App;
Expand Down Expand Up @@ -42,7 +42,7 @@ public function it_finds_the_translation_class_with_suffix_set(): void
$this->app->make('config')->set('translatable.translation_suffix', 'Trans');

self::assertEquals(
'Astrotomic\Translatable\Tests\Eloquent\VegetableTrans',
'Tests\Eloquent\VegetableTrans',
(new Vegetable())->getTranslationModelName()
);
}
Expand Down
2 changes: 1 addition & 1 deletion tests/ValidationTest.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace Astrotomic\Translatable\Tests;
namespace Tests;

use Astrotomic\Translatable\Locales;
use Astrotomic\Translatable\Validation\RuleFactory;
Expand Down
2 changes: 1 addition & 1 deletion tests/factories/CountryFactory.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use Astrotomic\Translatable\Tests\Eloquent\Country;
use Tests\Eloquent\Country;
use Faker\Generator as Faker;
use Illuminate\Database\Eloquent\Factory as ModelFactory;

Expand Down
2 changes: 1 addition & 1 deletion tests/factories/VegetableFactory.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

use Astrotomic\Translatable\Tests\Eloquent\Vegetable;
use Tests\Eloquent\Vegetable;
use Faker\Generator as Faker;
use Illuminate\Database\Eloquent\Factory as ModelFactory;

Expand Down

0 comments on commit 0916bce

Please sign in to comment.