ibexa / doctrine-schema
Abstraction layer, on top of Doctrine, for cross-DBMS schema import
Installs: 618 792
Dependents: 25
Suggesters: 0
Security: 0
Stars: 2
Watchers: 12
Forks: 0
Type:ibexa-bundle
Requires
- php: ^7.4 || ^8.0
- doctrine/dbal: ^2.13
- symfony/config: ^5.3
- symfony/console: ^5.3
- symfony/dependency-injection: ^5.3
- symfony/http-kernel: ^5.3
- symfony/yaml: ^5.3
Requires (Dev)
- ibexa/code-style: ^1.0
- phpstan/phpstan: ^1.10
- phpstan/phpstan-phpunit: ^1.3
- phpstan/phpstan-symfony: ^1.2
- phpunit/phpunit: ^8.5
Replaces
- dev-main / 5.0.x-dev
- 4.6.x-dev
- v4.6.13
- v4.6.12
- v4.6.11
- v4.6.10
- v4.6.9
- v4.6.8
- v4.6.7
- v4.6.6
- v4.6.5
- v4.6.4
- v4.6.3
- v4.6.2
- v4.6.1
- v4.6.0
- v4.6.0-rc1
- v4.6.0-beta5
- v4.6.0-beta4
- v4.6.0-beta3
- v4.6.0-beta2
- v4.6.0-beta1
- 4.5.x-dev
- v4.5.7
- v4.5.6
- v4.5.5
- v4.5.4
- v4.5.3
- v4.5.2
- v4.5.1
- v4.5.0
- v4.5.0-rc1
- v4.5.0-beta2
- v4.5.0-beta1
- 4.4.x-dev
- v4.4.4
- v4.4.3
- v4.4.2
- v4.4.1
- v4.4.0
- v4.4.0-rc1
- v4.4.0-beta1
- 4.3.x-dev
- v4.3.5
- v4.3.4
- v4.3.3
- v4.3.2
- v4.3.1
- v4.3.0
- v4.3.0-rc1
- v4.3.0-beta1
- 4.2.x-dev
- v4.2.4
- v4.2.3
- v4.2.2
- v4.2.1
- v4.2.0
- v4.2.0-rc1
- v4.2.0-beta1
- 4.1.x-dev
- v4.1.5
- v4.1.4
- v4.1.3
- v4.1.2
- v4.1.1
- v4.1.0
- v4.1.0-rc1
- v4.1.0-beta1
- 4.0.x-dev
- v4.0.8
- v4.0.7
- v4.0.6
- v4.0.5
- v4.0.4
- v4.0.3
- v4.0.2
- v4.0.1
- v4.0.0
- v4.0.0-rc5
- v4.0.0-rc4
- v4.0.0-rc3
- v4.0.0-rc2
- v4.0.0-rc1
- v4.0.0-beta5
- v4.0.0-beta4
- v4.0.0-beta3
- v4.0.0-beta2
- v4.0.0-beta1
- dev-ibx-8470-symfony-6
- dev-dbal
This package is auto-updated.
Last update: 2024-10-22 13:01:48 UTC
README
This Symfony Bundle provides basic abstraction layer for cross-DBMS schema import.
It introduces custom Yaml format for schema definition and provides autowired APIs.
Schema Builder
Provided by APIs defined on the \Ibexa\Contracts\DoctrineSchema\SchemaImporterInterface
interface,
imports given Yaml source string or Yaml file into \Doctrine\DBAL\Schema
object.
Schema Exporter
Provided by APIs defined on the \Ibexa\Contracts\DoctrineSchema\SchemaExporterInterface
interface,
exports given \Doctrine\DBAL\Schema
object to the custom Yaml format.
SchemaBuilder
Provided by APIs defined on the \Ibexa\Contracts\DoctrineSchema\Builder\SchemaBuilderInterface
interface, is an extensibility point to be used by Symfony-based projects.
The SchemaBuilder
is event-driven. To hook into the process of building schema, a custom EventSubscriber
is required, e.g.
use Ibexa\Contracts\DoctrineSchema\Event\SchemaBuilderEvent; use Ibexa\Contracts\DoctrineSchema\SchemaBuilderEvents; use Symfony\Component\EventDispatcher\EventSubscriberInterface; class BuildSchemaSubscriber implements EventSubscriberInterface { private string $schemaFilePath; public function __construct(string $schemaFilePath) { $this->schemaFilePath = $schemaFilePath; } /** * @return string[] */ public static function getSubscribedEvents(): array { return [ SchemaBuilderEvents::BUILD_SCHEMA => ['onBuildSchema', 200], ]; } public function onBuildSchema(SchemaBuilderEvent $event): void { $event ->getSchemaBuilder() ->importSchemaFromFile($this->schemaFilePath); } }
Schema provided in this way can be imported into Schema object by e.g.:
public function __construct(SchemaBuilder $schemaBuilder) { $this->schemaBuilder = $schemaBuilder; } public function importSchema(): void { $schema = $this->schemaBuilder->buildSchema(); // ... }
COPYRIGHT
Copyright (C) 1999-2024 Ibexa AS (formerly eZ Systems AS). All rights reserved.
LICENSE
This source code is available separately under the following licenses:
A - Ibexa Business Use License Agreement (Ibexa BUL), version 2.4 or later versions (as license terms may be updated from time to time) Ibexa BUL is granted by having a valid Ibexa DXP (formerly eZ Platform Enterprise) subscription, as described at: https://www.ibexa.co/product For the full Ibexa BUL license text, please see: https://www.ibexa.co/software-information/licenses-and-agreements (latest version applies)
AND
B - GNU General Public License, version 2 Grants an copyleft open source license with ABSOLUTELY NO WARRANTY. For the full GPL license text, please see: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html