use composer to manage dependencies#9
Conversation
It's not common practice to also commit the vendor folder to git. But this way it's easier for people to just checkout the project and run it. The composer.json file is very verbose in this case because none of the dependencies are composer projects. Thus the github urls needed to be added explicitly here. The next step would be to package the application as a phar file for end users and to remove the vendor folder from git. For building phars see: http://box-project.github.io/box2 https://moquet.net/blog/distributing-php-cli/ http://yet.another.linux-nerd.com/blog/create-a-simple-phar-command-line-project-based-on-symfony-components
|
First of all thank you for this pull request. After quickly having looked over it and trying to understand what it does and which implications this might have I have to say that I am not completely convinced if all the change to composer and phar might really be a good thing for such a small project like carddav2fb. In the end this composer environment just complicates the build and release environment of carddav2fb and for end users this also doesn't bring any real benefit. While I understand that for large scale projects compose might perfectly make sense, for carddav2fb (which is and will only be a very basic command-line script) it looks like this is just overkill. So why do you feel this composer/phar move might do carddav2fb any good? Apart from "might be cool" I cannot see any real practical benefit. Also maintaining the third-party sources using the git subtree functionality provides enough flexibility in diffing/merging changes between the individual repositories. |
|
Why composer (for this particular project):
There are many more reasons to use composer which apply only for larger projects. But it's really not so complicate. You're right that this is a small hackish script at the moment and that's a pity. I needed to fix it in two places to make it work with mailbox.org (OpenXChange). The transfer is also incomplete. So to become reliable and more easily usable I believe the script needs to grow a bit and be cleaned up. |
It's not common practice to also commit the vendor folder to git. But
this way it's easier for people to just checkout the project and run it.
The composer.json file is very verbose in this case because none of the
dependencies are composer projects. Thus the github urls needed to be
added explicitly here.
The next step would be to package the application as a phar file for end
users and to remove the vendor folder from git.
For building phars see:
http://box-project.github.io/box2
https://moquet.net/blog/distributing-php-cli/
http://yet.another.linux-nerd.com/blog/create-a-simple-phar-command-line-project-based-on-symfony-components