phpmig
phpmig copied to clipboard
Suggests/Request/Proposal : Separate Adapter.
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.
Hi there
It's definitely something you could do, but for such as small library I don't think it's worth it.