Use cakephps skeleton app in another project, using composer


#1

Hi,
I would like to base a project I have on the cakephp/app repository and think about using composer to achieve this.

What would be the best way to do it? The straight-forward solution would be to download the entire cakephp/app, add my files, and upload it as a new project. But that would make it a bit difficult to update it when you guys release new versions.

How can I create a composer.json which are downloading/installing the cakephp/app files, and then download my own files, and move them into the correct positions?

Guess I could use the scripting possibilities that comes with composer, but the problem with this is that I also would like to let users be able to download my project as a zip-file from github.

Any general advice on these topics?


#2

I try to do it the other way…

I watch the repo, and just cherry-pick or port to the project, since a LOT files changes (app controller, maybe namespaces, config, etc) so the project stays up to date

I use that approach in a project that started with cakephp 3.0 and has multiple changes to be the 3.5 app today (middelwares, inmutable types in bootstrap.php, etc)


#3

It dawns on me, slowly. :slight_smile: By watching the repo you mean you simply download any updates they do, check that your stuff is still working, otherwise, you fix what is broken, and submit a new release of your package?

Thanks raul.


#4

Yes, see new commits, evaluate if they are to an upcoming update, and apply it.
For example, I added the Application class, but did not add the env env support (since i use docker and ENV variables)