Open Luc45 opened 3 years ago
Yeah, this is something that might be classified as kind of an oversight from my end. I don't think there is a way you can work around this, right now. Mozart might be better off as one of the developer tools, that aren't tied to the project in its composer.json
as it directly affects the dependencies that your project actually requires.It also sparked some ideas for resolving the issues raised in #79. I'm going to need some time to properly think things through and consider my options.
Awesome, thanks for the reply, @coenjacobs.
Please feel free to close this issue.
@Luc45 I will not close it, as it is a valid issue. Mozart is currently not able to deal with these kind of situations all too well. It's actually one of the main issues that I've tried to explain in #96 now, where I'm discussing the future of Mozart. I do not have an immediate solution for this specific issue, but I am very much keen on solving it in the nearby future.
@Luc45
I think I've got a solution for you –– I've created a mozart.phar
to use without requiring Mozart in your composer.json. I does still read its config from your project's composer.json
, and does still need PHP 7.2 to run, but since it's outside your project it should still work.
Please try:
curl -OL https://github.com/BrianHenryIE/mozart/releases/download/v0.6.0-bh/mozart.phar
php mozart.phar compose
You should be able to put that inside your "post-install-cmd"
to download and run each time.
PR #105 would make an official build on each Mozart release.
@BrianHenryIE that looks great, thank you!
I've already moved on to another solution, but if I try this out I'll post here the results. Either way, this was a very necessary PR for other people as well.
@Luc45 The above PHAR release that @BrianHenryIE mentioned is now merged into master
and released as part of the 0.7.0 release. You basically have three options since release 0.7.0, to install Mozart without affecting the dependencies of the project itself:
All three work the exact same, as in that you still configure them in your projects composer.json
file. It's just different in how you run them. Please let me know how this works out for you!
Our plugin is compatible with PHP 5.6+. To make sure all our dependencies are also compatible with these PHP versions, we have specified a platform requirement in
composer.json
:However, Mozart requires PHP 7.2, and as far as I understand, it must be placed in the same
composer.json
as the one being prefixed.I can't just run
composer update --ignore-platform-reqs
to install Mozart because then the PHP version check step will be skipped when resolving my dependencies, installing libraries that are not compatible with PHP 5.6.Can I use Mozart on a plugin that has PHP platform requirements such as this one?