Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Phinx Bundle Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

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:

  • Version pins. Last release 2017-12-28 means constraints almost certainly target 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.
  • PHP runtime. PHP 8.x will surface deprecations and fatals in the bundle's Symfony 3-era code paths (dynamic properties, each(), nullable parameter ordering). Expect patches.
  • Autoload collisions. Installing Symfony components alongside Laravel is legal but puts two container/kernel abstractions in one process; every upgrade of either framework risks a conflict.

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:

  1. What is the actual requirement driving Phinx? Native Laravel migrations handle schema versioning, rollback, and seeding. If the driver is a database adapter Laravel doesn't support natively, or an existing corpus of Phinx migrations you must not rewrite, say so explicitly — the recommendation changes.
  2. Exact composer.json constraints on robmorgan/phinx, symfony/*, and php. If it pins phinx <0.9, the bundle is effectively a museum piece.
  3. Is there an internal fork already, or would we be the maintainer of record?
  4. Does the target DB require Phinx-specific features (e.g., reversible change() inference, table prefixes, adapter-level options) that we would lose by switching to Laravel migrations?
  5. Who owns security patching if a CVE lands in the pinned Phinx or Symfony versions?

Integration Approach

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:

  1. Inventory. Enumerate every migration file, its adapter assumptions, and which up()/down() pairs are non-reversible. Flag raw SQL and execute() calls — these are the ones that will not translate mechanically.
  2. Freeze. Stop authoring new Phinx migrations; route new schema changes through Laravel migrations immediately.
  3. Baseline. Generate a single Laravel migration that reproduces the current schema (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.
  4. Dual-run. For one or two release cycles, verify Laravel's migrate:status matches Phinx's phinx:status in staging. Divergence here is the primary cutover risk.
  5. Cut over per environment: dev → CI ephemeral DBs → staging → production, with the baseline marked applied rather than re-run.

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.

Operational Impact

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:

  • Concurrency. Phinx has no distributed migration lock. Multiple app instances booting simultaneously and running 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.
  • Deployment shape. Migrations must run as a discrete pre-deploy step, never on container start, unless the lock exists. Large tables plus MySQL's non-transactional DDL means long-running ALTERs block deploys — plan for online-schema-change tooling independent of the migration library.

Failure modes to design against:

  • Partial application. Phinx records completed migrations per-file; a failure mid-file leaves an inconsistent schema with no automatic compensation. Require down() correctness and test rollback in CI, not just forward migration.
  • Non-transactional DDL. MySQL and Oracle cannot roll back DDL. A failed migration needs a hand-written remediation plan per migration; make that a review requirement.
  • Config drift. Phinx config lives outside the framework's config system. Env-var divergence between phinx.yml and .env is a common source of "works in staging" failures.
  • Silent no-op. If the bundle's compiler pass fails to register (version mismatch), commands may simply not appear — with a composer require that "succeeded." Always assert command registration in a smoke test.
  • Namespace collision on Phinx upgrade. 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.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator