Skip to content

Commit

Permalink
Removed circular dependency with extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
TomHAnderson committed Oct 30, 2024
1 parent 5b8a023 commit a245230
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 36 deletions.
5 changes: 1 addition & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,7 @@
"phpunit/phpunit": "^11.4",
"fakerphp/faker": "^1.23",
"laravel/framework": "^10.0 || ^11.0",
"orchestra/testbench": "^9.5",
"beberlei/doctrineextensions": "^1.5",
"laravel-doctrine/extensions": "2.0.x-dev",
"gedmo/doctrine-extensions": "^3.17"
"orchestra/testbench": "^9.5"
},
"conflict": {
"laravel/lumen": "*"
Expand Down
13 changes: 1 addition & 12 deletions tests/Feature/DoctrineServiceProviderCustomFunctionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
namespace LaravelDoctrineTest\ORM\Feature;

use Doctrine\Persistence\ManagerRegistry;
use DoctrineExtensions\Query\Mysql\Ascii;
use DoctrineExtensions\Query\Mysql\Cos;
use DoctrineExtensions\Query\Mysql\Date;
use Illuminate\Config\Repository;
use Illuminate\Foundation\Application;
use LaravelDoctrineTest\ORM\TestCase;
Expand All @@ -24,15 +21,7 @@ protected function defineEnvironment($app): void
{
// Setup default database to use sqlite :memory:
tap($app['config'], static function (Repository $config): void {
$config->set('doctrine.custom_datetime_functions', [
'DATE' => Date::class,
]);
$config->set('doctrine.custom_numeric_functions', [
'COS' => Cos::class,
]);
$config->set('doctrine.custom_string_functions', [
'ASCII' => Ascii::class,
]);
// Custom functions are tested in the extensions repository
});
}

Expand Down
20 changes: 0 additions & 20 deletions tests/Feature/DoctrineServiceProviderExtensionTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,6 @@

use Illuminate\Config\Repository;
use Illuminate\Foundation\Application;
use LaravelDoctrine\Extensions\Blameable\BlameableExtension;
use LaravelDoctrine\Extensions\IpTraceable\IpTraceableExtension;
use LaravelDoctrine\Extensions\Loggable\LoggableExtension;
use LaravelDoctrine\Extensions\Sluggable\SluggableExtension;
use LaravelDoctrine\Extensions\SoftDeletes\SoftDeleteableExtension;
use LaravelDoctrine\Extensions\Sortable\SortableExtension;
use LaravelDoctrine\Extensions\Timestamps\TimestampableExtension;
use LaravelDoctrine\Extensions\Translatable\TranslatableExtension;
use LaravelDoctrine\Extensions\Tree\TreeExtension;
use LaravelDoctrineTest\ORM\TestCase;

use function tap;
Expand All @@ -29,17 +20,6 @@ protected function defineEnvironment($app): void
{
// Setup default database to use sqlite :memory:
tap($app['config'], static function (Repository $config): void {
$config->set('doctrine.extensions', [
TimestampableExtension::class,
SoftDeleteableExtension::class,
SluggableExtension::class,
SortableExtension::class,
TreeExtension::class,
LoggableExtension::class,
BlameableExtension::class,
IpTraceableExtension::class,
TranslatableExtension::class,
]);
});
}

Expand Down

0 comments on commit a245230

Please sign in to comment.