Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 31 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ Enable the bundle by adding it to the list of registered bundles in ```config/bu
<?php

return [
Macpaw\SchemaContextBundle\SchemaContextBundle::class => ['all' => true],
Macpaw\SchemaContextBundle\PostgresSchemaBundle::class => ['all' => true],
// ...
];
// ...
Macpaw\SchemaContextBundle\SchemaContextBundle::class => ['all' => true],
Macpaw\SchemaContextBundle\PostgresSchemaBundle::class => ['all' => true],
];
```

## Configuration
Expand All @@ -41,6 +41,33 @@ doctrine:
default:
wrapper_class: Macpaw\PostgresSchemaBundle\Doctrine\SchemaConnection
```

Set `SchemaResolver` to `SchemaConnection` at kernel boot
```php
# src/Kernel.php

use Macpaw\PostgresSchemaBundle\Doctrine\SchemaConnection;
use Macpaw\SchemaContextBundle\Service\SchemaResolver;
use Symfony\Bundle\FrameworkBundle\Kernel\MicroKernelTrait;
use Symfony\Component\HttpKernel\Kernel as BaseKernel;

class Kernel extends BaseKernel
{
use MicroKernelTrait;

public function boot(): void
{
parent::boot();

SchemaConnection::setSchemaResolver(
$this->getContainer()->get(SchemaResolver::class),
);
}

// ...
}
```

Make sure you configure the context bundle properly:

See https://github.com/MacPaw/schema-context-bundle/blob/develop/README.md
Expand Down
Loading