Skip to content

Suggests/Request/Proposal : Separate Adapter. #152

Description

@amsitlab

Why not separating adapter as sub-package of phpmig/phpmig

For example, for codeigniter user, their not need Zend, Illuminate, Doctrine adapter, their can install specific adapter for codeigniter(only) like phpmig/phpmig-adapter-codeigniter, and package phpmig/phpmig-adapater-codeigniter will depends phpmig/phpmig as core.

then codeigniter user can install with:

{

.....
  "require": {
    "phpmig/phpmig-adapter-codeigniter": "*",
     .....
  }

....
}

project tree of phpmig/phpmig : (core)

+-- src/
|     +- Adapter/
|     |      +- File/Flat.php
|     |      +- Pdo/ (all \Phpmig\Adapater\Pdo\  class files)
|     |      +- AdapterInterface.php
|     +- Command/(all class of \Phpmig\Command ).php
|     +- Migration /(all class of \Phpmig\Migration ).php
|     +- [other files]
+-- [other files]
+-- composer.json

And project tree of phpmig/phpmig-adapter-codeigniter :

+-- src/
|     +-- Adapter/
|           +-- Codeigniter/
|                  +-- Db.php
+-- composer.json

and phpmig/phpmig-adapter-codeigniter/composer.json be like:

{
......
"require": {
    "phpmig/phpmig": "<version>",
 }
......
}

with this methode, codeigniter user will haven't class Phpmig\Adapter\ {Zend, Illuminate, Doctrine} cause their installing spasific adapter for codeigniter (only).

also for zendframework user, their can installing specific adapter package like phpmig/phpmig-adapter-zend
and project tree of phpmig/phpmig-adapter-zend be like:

+-- src/
|    +-- Adapter/
|           +-- Zend/
|                 +-- (all adapter class for zf ) .php
+-- composer.json

you can use it for each adapter.
Thanks.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions