Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restructure this project into one single branch. #5

Open
tristanlins opened this issue Nov 8, 2014 · 1 comment
Open

Restructure this project into one single branch. #5

tristanlins opened this issue Nov 8, 2014 · 1 comment

Comments

@tristanlins
Copy link
Contributor

The current branch architecture is like an asskick. We need to add changes and bugfixes in "hundrets" of branches and actual test the fix over the different contao versions.
We need to do a lot cherry-picking and merging, that is absolutely unnecessary!

We should hold the complete code in one Repo and extend the newer versions from the previous one and change only the differences.

Like this:

namespace ContaoCommunityAlliance\Contao\Bindings\Subscribers\Contao211 {
    class BackendSubscriber {}
}
namespace ContaoCommunityAlliance\Contao\Bindings\Subscribers\Contao30 {
    class BackendSubscriber extends \ContaoCommunityAlliance\Contao\Bindings\Subscribers\Contao211\BackendSubscriber {}
}
namespace ContaoCommunityAlliance\Contao\Bindings\Subscribers\Contao31 {
    class BackendSubscriber extends \ContaoCommunityAlliance\Contao\Bindings\Subscribers\Contao30\BackendSubscriber {}
}
namespace ContaoCommunityAlliance\Contao\Bindings\Subscribers\Contao32 {
    class BackendSubscriber extends \ContaoCommunityAlliance\Contao\Bindings\Subscribers\Contao31\BackendSubscriber {}
}
namespace ContaoCommunityAlliance\Contao\Bindings\Subscribers {
    if (version_compare('3.2', VERSION, '>=')) {
        class BackendSubscriber extends \ContaoCommunityAlliance\Contao\Bindings\Subscribers\Contao32\BackendSubscriber {}
    } elseif (version_compare('3.1', VERSION, '>=')) {
        class BackendSubscriber extends \ContaoCommunityAlliance\Contao\Bindings\Subscribers\Contao31\BackendSubscriber {}
    } elseif (version_compare('3.0', VERSION, '>=')) {
        class BackendSubscriber extends \ContaoCommunityAlliance\Contao\Bindings\Subscribers\Contao30\BackendSubscriber {}
    } elseif (version_compare('2.11', VERSION, '>=')) {
        class BackendSubscriber extends \ContaoCommunityAlliance\Contao\Bindings\Subscribers\Contao211\BackendSubscriber {}
    }
}

Which such an hierarchy, we only need to make the bugfix in the version that is affected. All other implementations get the same bugfix just in time.

@discordier
Copy link
Member

Go for it? :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants