mvrhov/phinx-bundle
Symfony bundle that integrates Phinx database migrations into your app, letting you configure Phinx and run migration commands through Symfony’s console. Useful for managing schema changes across environments with a familiar, versioned migration workflow.
Architecture fit — poor for a Laravel codebase, acceptable only for legacy Symfony. The first thing to flag is a category mismatch: mvrhov/phinx-bundle is a Symfony bundle, not a Laravel package. It ships a Bundle class, a DI extension, compiler passes, and console commands wired into Symfony's FrameworkBundle. Laravel's integration surface is service providers, facades, and Artisan commands — none of which this package touches. Adopting it in Laravel means dragging in symfony/framework-bundle, symfony/dependency-injection, symfony/http-kernel, and symfony/console as first-class runtime dependencies, then bootstrapping a kernel just to register migration commands. That is a large architectural tax to obtain functionality Laravel already provides natively via illuminate/database migrations.
What the package actually does. It wraps Phinx — a framework-agnostic migration library with its own Phinx\Migration\AbstractMigration base class, adapter layer (MySQL, PostgreSQL, SQLite, SQL Server, and historically some NoSQL adapters), and YAML/PHP config. The bundle's value-add is: read phinx.yml/config from the Symfony config tree, register phinx:migrate, phinx:rollback, phinx:status, phinx:seed as console commands, and expose the Phinx manager as a DI service. That is roughly 300–600 lines of glue. There is no novel migration engine here — the substance lives in upstream Phinx.
Integration feasibility. Low. Concretely:
robmorgan/phinx ~0.6–0.8 and Symfony 2.8/3.x, with PHP ^5.6|^7.0. Modern Phinx (now cakephp/phinx 0.16.x) reorganized namespaces (Phinx\ → still Phinx\ but classes moved), changed the AbstractMigration contract (change() semantics, up()/down() signatures), and dropped PHP <7.4. Composer will either refuse to resolve or you will be pinned to a Phinx release from the same era.each(), nullable parameter ordering). Expect patches.Technical risk — high, and concentrated in abandonment. Six stars and zero dependents is the headline. Zero dependents means no downstream projects are exercising this code in production, so there is no de facto compatibility evidence, no issue corpus to search when something breaks, and no community fork waiting to absorb maintenance. Four-plus years without a release predates PHP 7.4, PHP 8.0, Symfony 5/6, and Phinx's own namespace migration. MIT license is permissive and fork-friendly — that is the one genuine positive, because it means you can vendor and patch without legal friction.
Key questions to resolve before any commitment:
composer.json constraints on robmorgan/phinx, symfony/*, and php. If it pins phinx <0.9, the bundle is effectively a museum piece.change() inference, table prefixes, adapter-level options) that we would lose by switching to Laravel migrations?Stack fit. If the host application is Laravel 9/10/11 on PHP 8.1+, this bundle does not fit and should not be forced. If the host is a Symfony 2.8/3.4 application on PHP 7.x being kept alive, it fits the original design intent — but you inherit the Symfony 3 EOL exposure regardless of this bundle.
Recommended path for Laravel — do not install the bundle. Use cakephp/phinx directly (it is the actively maintained successor to robmorgan/phinx) and write a thin Artisan command that instantiates Phinx\Migration\Manager with a config array sourced from config/database.php. That is ~80 lines, keeps the dependency graph to one library, gives you current Phinx with PHP 8 support, and removes Symfony entirely. You lose the DI sugar, which you did not need.
Migration path, if you are moving off Phinx entirely. Sequence it:
up()/down() pairs are non-reversible. Flag raw SQL and execute() calls — these are the ones that will not translate mechanically.pg_dump --schema-only or SHOW CREATE TABLE), then mark it applied on existing environments by inserting into the migrations table. This is the standard squash-baseline technique and avoids replaying years of history.migrate:status matches Phinx's phinx:status in staging. Divergence here is the primary cutover risk.Compatibility caveats for either path. Charset/collation defaults differ between Phinx adapters and Laravel's schema builder (notably MySQL utf8mb4 handling and index name generation). Index and foreign-key naming conventions must be reconciled or rollbacks will fail on drop. Table prefixes: Phinx supports them globally via config; Laravel uses per-connection prefixes — verify they match before baselining.
Sequencing. If you genuinely must run the Symfony bundle (e.g., shared migration config with an existing Symfony service), isolate it: separate Composer autoload scope, separate PHP process invoked as a CI step, never loaded in the Laravel request lifecycle. Treat it as an external CLI tool, not an embedded library.
Maintenance. This is the dominant cost. With no upstream activity since 2017 and zero dependents, you are the maintainer on day one. Budget for a vendored fork (Composer vcs repository or path repository) with a documented patch set, and add it to the same review cadence as any first-party code. Every PHP minor upgrade requires re-validating the fork.
Support. None. No maintainer triage, no security advisory channel, no upstream to escalate to. Internal ownership must be named explicitly — a team and a person — or the fork will silently rot. The MIT license is the mitigating factor: forking is legal and straightforward.
Scaling. Migration tooling scales along two axes, and this bundle helps with neither:
phinx:migrate will race. Laravel's migrate --isolated (cache-backed lock) solves this; a Phinx-based flow needs an external lock (Redis/DB advisory lock) wrapped around the command.ALTERs block deploys — plan for online-schema-change tooling independent of the migration library.Failure modes to design against:
down() correctness and test rollback in CI, not just forward migration.phinx.yml and .env is a common source of "works in staging" failures.composer require that "succeeded." Always assert command registration in a smoke test.robmorgan/phinx → cakephp/phinx is a package rename, not a version bump. Any transitive resolution to the old package is a signal to stop.Ramp-up. Low cognitive cost — Phinx's API is small and well documented, and engineers who have used it pick it up in hours. But the effective ramp-up is dominated by the archaeology of an unmaintained Symfony 3-era bundle: expect a day or two per engineer just to get a working local invocation on PHP 8, and more if the Docker/CI images need parallel PHP versions.
Bottom line for a TPM. Score 0.4 is fair. This is a thin, abandoned glue package with no adoption, no maintenance, and a framework mismatch against the stated target. Do not adopt it for a Laravel application. Either use Laravel's native migrations (default, and correct for most cases) or depend on cakephp/phinx directly with a small in-house Artisan bridge if Phinx's adapter coverage is genuinely required. The only scenario where the bundle itself earns its place is a legacy Symfony 3 application already using it — and there, the decision is really about the Symfony 3 EOL, not this package.
How can I help you explore Laravel packages today?