Search by

phil / migration-bundle

phil

phil/migration in Symfony: the migrations of DoctrineMigrationsBundle announce what they bring, and each run is announced once on the chat channels of the configuration

Package info

github.com/parler-haut-interagir-librement/migration-bundle

Homepage

Type:symfony-bundle

pkg:composer/phil/migration-bundle

Statistics

Installs: 0

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

0.1.0-alpha 2026-11-11 06:11 UTC

This package is auto-updated.

Last update: 2026-11-11 13:31:17 UTC


README

Each run of doctrine:migrations:migrate announced once on your chat channels.

phil/migration-bundle brings phil/migration into a Symfony application. The migrations of DoctrineMigrationsBundle announce what they bring, and each run of doctrine:migrations:migrate is announced once, however many migrations ran. The announcement goes to the chat channels of the configuration through symfony/notifier.

It is for a Symfony application that deploys with DoctrineMigrationsBundle and wants a release told on Discord or another chat transport the notifier supports. Each channel names its transport, its locale, whether it carries the release notes or the news, its titles and the longest message it takes. Outside Symfony, phil/migration plugs into Doctrine Migrations by hand.

A migration announces by extending AnnouncingMigration, or a base class of the application's own that uses the Announces trait. The bundle decorates the migration factory and the migrator that DoctrineMigrationsBundle gives, and sends through the chatter transports of framework.notifier.

Status

Part State
Channels from the configuration, sent through the chatter Implemented and tested
The migration factory and the migrator wrapped, the application's own factory decorated Implemented and tested

Documentation

Document What it covers
Installation Requirements, registering, the chatter transports.
Configuration The channels and their options.
Migrations Writing a migration that announces, a base class of one's own, a factory of one's own.
Extension points What an application implements, configures, replaces or relies on.
Testing How the bundle is tested.
Reference Every type and service of the bundle.

Quick start

# config/packages/phil_migration.yaml
phil_migration:
    channels:
        discord_releases:
            locale: fr
            title: '# Une nouvelle version est en ligne{counter}'
            continued: '## Suite{counter}'
        discord_news:
            locale: fr
            content: news
            heading: '# {title}'
            link: 'Pour voir la nouvelle : {url}'
final class Version20261104120000 extends AnnouncingMigration
{
    public function up(Schema $schema): void
    {
        $this->note(['fr' => '* Nouveau calendrier.', 'en' => '* A new calendar.']);
        // ...
    }
}

Requirements

PHP 8.5 or later, Symfony 8.2 or later, DoctrineMigrationsBundle 3.7 or later, phil/migration, and a chatter transport of symfony/notifier for each channel.

Contributing

Contributions are welcome on the PHIL monorepo: read the contribution guide and the code of conduct. Report a vulnerability privately, as the security policy explains, never in a public issue.

License

MIT, © Philippe Gamache, doing business as Le Gnome Archiviste; a Parler Haut Interagir Librement project. See LICENSE.