Refactor Migrator for and remove intimate knowledge about transaction in phpmig. Create execute method in adapter that calls the migration.up/down and adapter.up/down. In this way the adapter is the only one that knows about transation, and it can do any beforeUp/afterUp/beforeDown/afterDown without overengineering phpmig