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

Migrations Laravel Package

cakephp/migrations

CakePHP plugin that brings Laravel-style database migrations to CakePHP. Generate, run, roll back, and track schema changes with a familiar migrations shell, supporting MySQL, PostgreSQL, SQLite, and SQL Server across CakePHP 3, 4, and 5.

Deep Wiki
Context7

Technical Evaluation

Architecture fit — poor for a Laravel runtime. cakephp/migrations is not a general-purpose migration library; it is a CakePHP plugin that bootstraps through CakePHP's plugin/console discovery (Cake\Core\Plugin, ConsoleIntegration) and depends on cakephp/cakephp, cakephp/console, and CakePHP's ORM/schema introspection. Laravel has no equivalent plugin registration surface, so the package cannot be dropped into a Laravel application as a first-class citizen. What is reusable is the underlying model: it is a thin, opinionated wrapper around Phinx (robmorgan/phinx), which is framework-agnostic. The value to a Laravel team is conceptual and architectural, not a composer require.

Integration feasibility — low directly, moderate indirectly. Three realistic options, in descending order of practicality:

  1. Pattern transfer (recommended). Use this package as a reference implementation for the capabilities Laravel's native migrator lacks out of the box: schema diff generation against a live database, first-class seeder orchestration, and a plugin-style command surface. Reimplement against Laravel's Schema builder and Illuminate\Database\Migrations.
  2. Phinx as a sidecar. If the actual need is a framework-neutral migrator (e.g., a shared database touched by non-Laravel services), adopt Phinx directly and skip this plugin entirely — it adds CakePHP coupling with no benefit outside CakePHP.
  3. Direct install. Effectively not viable: composer require cakephp/migrations inside a Laravel app pulls CakePHP core and will fight illuminate/* constraints, autoload namespaces, and console bootstrapping.

Technical risk — medium-high, concentrated in licensing and schema semantics.

  • License: metadata reports NOASSERTION. CakePHP projects are typically MIT, but this must be verified against the actual LICENSE file and confirmed by legal before any code is copied or vendored. Do not treat "probably MIT" as clearance.
  • Dependency weight: adopting the package transitively imports a competing framework. Even as a dev-only dependency this is a supply-chain and audit burden.
  • Semantic mismatch: its diff engine reasons about CakePHP ORM abstractions (columns, indexes, foreign keys as Cake understands them). Eloquent/Cake ORM type mappings diverge on enums, JSON columns, composite keys, and index naming — ported logic will silently produce wrong DDL.
  • Version-table collision: two migration tools against one database means two bookkeeping tables and two notions of "current version." This is the highest-severity failure mode and is easy to introduce accidentally.
  • Signal quality: 134 stars and a low opportunity score (3.43) indicate a narrow, ecosystem-specific audience. Community answers will assume CakePHP; debugging time is ours alone.

Key questions to resolve before committing effort:

  • What capability gap are we actually closing — schema diffing, seeding, rollback safety, or multi-service schema ownership?
  • Do we operate any CakePHP services, now or on the roadmap? (If no, options 1 and 2 only.)
  • Is there a shared database where a CakePHP service is the schema owner? If so, who is system of record?
  • Has legal reviewed the NOASSERTION license and the transitive CakePHP dependency set?
  • Does Laravel's native migrator plus doctrine/dbal/native schema introspection already cover the gap at lower cost?

Integration Approach

Stack fit. Laravel's migration system stays the system of record for Laravel-owned schemas. This package is admissible only as (a) a design reference, or (b) a runtime dependency in a genuinely polyglot PHP estate where a CakePHP application owns part of the schema. There is no configuration under which it should become the primary migrator for a Laravel codebase.

Migration path. Recommended path is extraction, not adoption:

  • Spike in an isolated repo (not the monolith) with a disposable database. Wire up cakephp/migrations standalone, run migrations diff against a representative schema, and capture the generated output. Budget 2–3 days.
  • Use the output as a specification. Document the diff algorithm's behavior — how it handles index renames, foreign key ordering, destructive column changes, and rollback generation — and encode those as acceptance tests for a Laravel-native implementation.
  • Implement against Laravel primitives: Schema::getColumns(), Schema::getIndexes(), Schema::getForeignKeys() for introspection (native since Laravel 11 and generally preferable to doctrine/dbal), Artisan commands for the surface, and DatabaseSeeder for seed orchestration.
  • If Phinx is genuinely required for cross-framework schema ownership, depend on robmorgan/phinx directly and keep it out of the Laravel app's runtime path — run it as a CI job or sidecar container.

Compatibility notes. CakePHP 5-era releases target PHP 8.1+, which is fine for a modern Laravel baseline, but Composer will likely report conflicts on cakephp/console/psr/* versions. Expect to pin or to vendor an extracted subset. Namespace collisions are avoidable only if code is copied, not required.

Sequencing.

  1. Legal/license verification and transitive dependency audit — gate.
  2. Isolated spike and behavior documentation.
  3. Decision record: adopt Phinx, port patterns, or close as "no action."
  4. If any cross-service schema ownership exists, establish a single migrator and a CI gate that blocks deploys on schema drift before writing new code.
  5. Build the Laravel-native diff command behind a feature flag; run in report-only mode against staging for two sprints before allowing it to author migrations.

Operational Impact

Maintenance. Ownership sits with CakePHP's release cadence, not ours. That is acceptable for a reference implementation and unacceptable for a production dependency in a Laravel service. Any adopted code becomes ours to maintain indefinitely; budget for that explicitly rather than assuming upstream will track Laravel-relevant changes. The plugin is under the CakePHP organizational umbrella, which is a mild positive on continuity, but it is not a vendor with an SLA.

Support. Community-only. Issue triage will be CakePHP-centric; questions framed in Eloquent terms will go unanswered. Nominate an internal owner with migration-tooling context and record the decision in an ADR so the next team does not re-litigate it.

Scaling. Migration execution performance is a Phinx concern and is generally adequate; the real scaling risk is organizational, not technical — two migrators against one database do not scale past a handful of engineers. As service count and schema churn grow, divergent bookkeeping tables become an incident source. Keep exactly one migrator per schema, and make schema ownership explicit in service documentation.

Failure modes to monitor.

  • Version-table divergence: CakePHP's phinxlog versus Laravel's migrations disagreeing about applied state; symptom is a deploy that skips or re-runs DDL.
  • Silent diff drift: auto-generated migrations that were merged without review, producing destructive changes (dropped columns, narrowed types) that pass tests and fail in production.
  • Lock contention: long-running migrations blocking deploys, particularly where Phinx and Laravel migrations interleave on the same tables.
  • Partial application: non-transactional DDL (MySQL) leaving a half-applied migration with two tools holding inconsistent views of reality.
  • Dependency rot: transitive CakePHP packages drifting out of security-patch range inside a Laravel app that nobody associates with CakePHP.

Ramp-up. Low for engineers already fluent in Laravel migrations — Phinx's change()/up()/down() model is close enough that a competent engineer is productive in a day or two. The friction is elsewhere: CakePHP conventions (Table/Entity naming, datasource config, plugin bootstrapping) are unfamiliar and undocumented for this audience, adding roughly a day of context-switching for the spike. Net: 2–3 engineer-days to reach a defensible build-versus-adopt decision, and roughly 5–8 days to deliver the Laravel-native diff capability if that path is chosen. Given the low opportunity score and the licensing ambiguity, the expected-value play is a timeboxed spike followed, in most cases, by a "no action — port the pattern" decision.

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.
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core