cakephp / cakephp/phinx

Adapter should not depend on MigrationInterface

Open
#244 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
PHP
Stars
4.5k
Forks
884
PR merge metrics
No merged PRs in 30d

Description

The AdapterInterface violates the separation as it knows about the MigrationInteface in the migrated method.
We are for example using phinx´ adapter structure but have a slightly different MigrationInterface ( no downs ) and different Manager (Module-specific)
Currently we need to "hack" the migrated function, even though there does not come any MigrationInterace in... So this "migrated" thing should be in the Manager, not in the Adapter

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing AdapterInterface::migrated and its references to MigrationInterface, then compare how the Manager handles migration state. Review the adapter and manager abstractions to determine the appropriate ownership of this behavior. Done means adapters no longer depend on MigrationInterface and the existing migration flow remains functional.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
databases
Issue type
Refactor
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.