Skip to content

Commit 3c30a73

Browse files
Merge pull request #4 from MacPaw/feat/update-schema-context-bundle
Feat/update schema context bundle
2 parents 1daddda + a6ec50b commit 3c30a73

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ Enable the bundle by adding it to the list of registered bundles in ```config/bu
2525
return [
2626
// ...
2727
Macpaw\SchemaContextBundle\SchemaContextBundle::class => ['all' => true],
28-
Macpaw\SchemaContextBundle\PostgresSchemaBundle::class => ['all' => true],
28+
Macpaw\PostgresSchemaBundle\PostgresSchemaBundle::class => ['all' => true],
2929
];
3030
```
3131

@@ -42,12 +42,12 @@ doctrine:
4242
wrapper_class: Macpaw\PostgresSchemaBundle\Doctrine\SchemaConnection
4343
```
4444
45-
Set `SchemaResolver` to `SchemaConnection` at kernel boot
45+
Set `BaggageSchemaResolver` to `SchemaConnection` at kernel boot
4646
```php
4747
# src/Kernel.php
4848
4949
use Macpaw\PostgresSchemaBundle\Doctrine\SchemaConnection;
50-
use Macpaw\SchemaContextBundle\Service\SchemaResolver;
50+
use Macpaw\SchemaContextBundle\Service\BaggageSchemaResolver;
5151
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
5252
use Symfony\Component\HttpKernel\Kernel as BaseKernel;
5353
@@ -60,7 +60,7 @@ class Kernel extends BaseKernel
6060
parent::boot();
6161
6262
SchemaConnection::setSchemaResolver(
63-
$this->getContainer()->get(SchemaResolver::class),
63+
$this->getContainer()->get(BaggageSchemaResolver::class),
6464
);
6565
}
6666

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"doctrine/orm": "^2.17 || ^3.0",
1919
"symfony/doctrine-bridge": "^6.4 || ^7.0",
2020
"doctrine/dbal": "^3.4",
21-
"macpaw/schema-context-bundle": "^1.0"
21+
"macpaw/schema-context-bundle": "^1.1"
2222
},
2323
"require-dev": {
2424
"phpstan/phpstan": "^1.10",

src/Doctrine/SchemaConnection.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
use Doctrine\DBAL\Connection as DBALConnection;
88
use Doctrine\DBAL\Platforms\PostgreSQLPlatform;
99
use Macpaw\PostgresSchemaBundle\Exception\UnsupportedPlatformException;
10-
use Macpaw\SchemaContextBundle\Service\SchemaResolver;
10+
use Macpaw\SchemaContextBundle\Service\BaggageSchemaResolver;
1111

1212
class SchemaConnection extends DBALConnection
1313
{
14-
private static ?SchemaResolver $schemaResolver = null;
14+
private static ?BaggageSchemaResolver $schemaResolver = null;
1515

16-
public static function setSchemaResolver(SchemaResolver $resolver): void
16+
public static function setSchemaResolver(BaggageSchemaResolver $resolver): void
1717
{
1818
self::$schemaResolver = $resolver;
1919
}

tests/Doctrine/SchemaConnectionTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
use Doctrine\DBAL\Platforms\MySQLPlatform;
1414
use Macpaw\PostgresSchemaBundle\Doctrine\SchemaConnection;
1515
use Macpaw\PostgresSchemaBundle\Exception\UnsupportedPlatformException;
16-
use Macpaw\SchemaContextBundle\Service\SchemaResolver;
16+
use Macpaw\SchemaContextBundle\Service\BaggageSchemaResolver;
1717
use PHPUnit\Framework\TestCase;
1818

1919
class SchemaConnectionTest extends TestCase
@@ -39,7 +39,7 @@ public function testConnectSetsSearchPath(): void
3939
$connection->method('getDatabasePlatform')->willReturn($platform);
4040
$connection->method('fetchOne')->willReturn(true);
4141

42-
$resolver = new SchemaResolver();
42+
$resolver = new BaggageSchemaResolver();
4343

4444
$resolver->setSchema('test_schema');
4545

@@ -59,7 +59,7 @@ public function testConnectSkipsWhenNoSchema(): void
5959
$driver->method('connect')->willReturn($driverConnection);
6060

6161
$connection = new SchemaConnection([], $driver, new Configuration());
62-
$resolver = new SchemaResolver();
62+
$resolver = new BaggageSchemaResolver();
6363

6464
SchemaConnection::setSchemaResolver($resolver);
6565

@@ -83,7 +83,7 @@ public function testThrowsForUnsupportedPlatform(): void
8383

8484
$connection->method('getDatabasePlatform')->willReturn($platform);
8585

86-
$resolver = new SchemaResolver();
86+
$resolver = new BaggageSchemaResolver();
8787

8888
$resolver->setSchema('test_schema');
8989

0 commit comments

Comments
 (0)