mozart: Conflict of installation as "require-dev" and "composer i --no-dev"

Hi there ✌️

In the readme you suggest installing the package with composer require coenjacobs/mozart --dev, which adds the package to composer’s require-dev section.

That makes sense, because this package is a development tool. However, a composer i --no-dev (for deployment) will fail at

> "vendor/bin/mozart" compose
sh: vendor/bin/mozart: No such file or directory
Script "vendor/bin/mozart" compose handling the post-install-cmd event returned with error code 127

because Mozart isn’t installed.

This is kind of a 🐔-🥚 problem. If you install Mozart as dev dependency, you can’t build. If you install as production build, things like symfony/console will end in the deployment because Mozart depends on them.

Is there a workaround?

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 15 (7 by maintainers)

Commits related to this issue

Most upvoted comments

@ChristophWurst

I’ve created a mozart.phar to use without requiring Mozart in your composer.json, although it does still read its config from your project’s composer.json.

Please try:

curl -OL https://github.com/BrianHenryIE/mozart/releases/download/v0.6.0-bh/mozart.phar
composer install --no-dev
php mozart.phar compose