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

Decouple editions from core #155

Open
aleksip opened this issue Nov 13, 2017 · 3 comments
Open

Decouple editions from core #155

aleksip opened this issue Nov 13, 2017 · 3 comments
Assignees

Comments

@aleksip
Copy link
Member

aleksip commented Nov 13, 2017

Moved from #154:

Drop all code from all the different edition repos, decoupling them from patternlab-php-core.

Currently all editions have identical code for the console launcher, server router and Composer scripts. They are hard to maintain, especially if we want to be able to make changes required by #154. Without this code, the editions would basically consist of a single composer.json file. How could that not be nice! :)

The launcher and and router should be easy to move to patternlab-php-core, but moving out the Composer script code is a bit trickier. Moving it to core causes ugly looking Composer warnings when the first dependencies are installed, because the script code is not yet available to Composer.

However, I thought I had a great idea to move that code to a new Composer plugin ("pattern-lab/composer-plugin"). And it seems that it would work just fine, if not for a possible Composer bug. I opened an issue (composer/composer#6803) about it, let's see what happens. One especially nice thing about using a Composer plugin would be not having to have all those script entries in composer.json, making the single composer.json files even more zen-like!

Update:

I have now pushed feature/decoupled-core branches to edition-php-twig-development and patternlab-php-core. Seems to work nicely!

The new Composer plugin is under my GitHub account until a repo is created under the PL organization. I don't have privileges to do that, and maybe also best to wait until learn more about the Composer issue. That is, the plugin currently only works with Composer < 1.5.0.

@aleksip
Copy link
Member Author

aleksip commented Dec 12, 2017

@EvanLovely @sghoweri It seems that the development edition inline alias for core was causing the problem with Composer, and adding an alias for the plugin fixed it. Could you verify if feature/decoupled-core works for you? And if you have the possibility to test on Windows that would be great too.

@aleksip
Copy link
Member Author

aleksip commented Dec 12, 2017

Oh well, looks like adding an alias for the plugin didn't fix it after all. Only removing the alias for core seems to work. So it seems that this is a problem only for the development editions with the new alias model. Let's see if this new info helps the Composer folks to identify the cause.

@aleksip
Copy link
Member Author

aleksip commented Dec 14, 2017

I've now managed to work around the Composer issue by (temporarily) removing the core version constraint from the plugin. Now the plugin seems to work with "pattern-lab/core": "dev-feature/decoupled-core as 2.8.11" in the development edition's composer.json!

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

No branches or pull requests

1 participant