Open webmozart opened 8 years ago
:+1:
I would store somewhere the fact that we already asked the question to not ask it at every update.
what on no, no? would the plugin silently not do anything, or would it abort the composer installation?
@dbu It would not install Puli and continue like now. Right now, if you don't have Puli installed, you get a warning when the Composer plugin is run, but Composer continues as usual.
What about exit code? Is it possible at all to return with an exit code from a plugin? I think even if composer continues running, showing an error is not enough. I would expect a CI build failing in this case.
I don't think Composer should fail completely if Puli cannot be downloaded. Puli could be optional and in that case I don't want to break the build. If Puli is required, the build will fail anyway. What do you think?
Not quite sure.
Also @dbu's point still concerns me. I expect this feature to allow fully unattended installation of composer packages with puli support.
i guess this means reporting a good exception message when things are not there as expected. i can see that the presence of the puli dependency alone leading to installation failures could be annoying as well. though maybe: have a composer.json config option to skip the error, but fail by default (and mention the config option in the failure)?
I think that is the way to go.
If you don't have the proper PHP-extensions then puli will fail. Same thing should be applied if Puli is not available.
I just had this case, where a missing puli cli failed my tests on travis, see #176 (which they shouldn't). Here are my thoughts on this:
composer up
and come back when it is finished, instead saying no over and over again) -> Go with "no" in non interactive mode. Maybe ask, if it should be installed globally?Well, that's pretty much from my point-of-view as I don't rely on puli for test (for now). If you rely on tests, they maybe should fail?
puli is irrelevant and tests must not fail
What does this mean?
Tests should not fail, SO puli should be installed
OR
Tests should not fail IF puli is not installed
In my case:
Tests should not fail IF puli is not installed
The most recent puli.phar should be downloaded by the Composer plugin if none is available on the system. We can present a dialog in Composer plugin if we detect this is the case.
Rough sketch of the scenarios:
Question accepted:
Question denied:
Question denied, custom install path: