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
Confused about composer and implementation #1795
Comments
(nb: maybe the mailinglist is more common for discussion on this kind of subjects within the DokuWiki project) A previous thread in the mailinglist was accompanying the PR #1152 containing the current composer setup. The current setup is especially intended for simplify updating of dependencies, without changing the workflow of users/downloaders of DokuWiki source code (so oriented only on the developer who updates the dependencies). If I understand it right the alternative setup you propose is targeting at two audiences:
|
Some more points:
Anyway I'm always open to improve things. So let's see what switching to a more "common" composer workflow would mean:
So to me it seems like a lot of things would need to be changed with little benefit (but maybe I'm missing something big here) Nonetheless I agree that separating dependencies into production and devel would be helpful. We would continue to check in the production dependencies but have an easy way for developers to pull in additional stuff like phpunit (though I usually use the phar anyway). Does that make sense to you? |
Having a |
@MyIgel is that an offer to rewrite all the tools relying on the current setup? |
I tried but it was a really frustrating experience looking at such a mess of a source code... |
Could you please elaborate where the "mess" of source code is? Please also note that this is a project started back in 2005 when composer didn't ever exist, and
Also you may want to read https://www.dokuwiki.org/development |
I'm closing this. We may revisit our deployment setup from time to time. But for now it is what it is |
After the conversation here and by reading the development manual there are some things that I am confused about.
A developer and most certainly a PHP developer should know or should learn about composer. This way you will not need to include anything in your vendor folder.
IMHO you should seperate the dependencies into the required ones and development required ones. When you create a zip file to put it in your download page you should then have the required dependancies without the development ones. Drupal does something similar.
This will give you the following benefits:
As I said when you create a zip including all the dependancies you can zip only the required ones.
You will not commit any dependancy in your repo.
You can decouple your code/dependancies. For example IMHO
_cs
folder should be an independent package likesplitbrain/dokuwiki-codestyle
which should be included inside the required-dev dependencies. Something like thisComposer will solve the dependencies for you. Although there are spots that you are mentioning the required versions in your development manual there are many things left to the imagination. Composer can be a very good "documentation" for the developers that it will always be updated and it will always install the working version.
For instance I haven't seen mentioning the required version of codesniffer (recently 3.0.0-RC2).
Furthermore what if one of the packages creator decides not to respect semver and on the next patch release he believes that it is a good idea to ditch PHP 5.x and go to PHP 7.x. Composer is able to figure this out and will not install this patch version (if the developer is not that crazy and at least he has updated his composer.json file).
Although that you are saying that it
is immediately usable
it is not. A developer has to wonder around a lot to the dokuwiki pages trying to find what dependancies he needs to install like PhpUnit, Codesniffer etc. in order to start developing.IMHO Continues integration will become easier. For instance at the moment you havent' added into travis to check the CodeStyle. I don't know if that was made on purpose or not but by adding codesniffer into your require-dev you could run
composer install
have your codesniffer and then check the codestyle.I guess these are just a few of the advantages of using and extending the use of composer. I believe that there are more.
Let me know what you think.
The text was updated successfully, but these errors were encountered: