Which composer.json to use for production?

Hi there,
bit of confusion here: Should we use the composer.json from mautic/mautic or from mautic/recommended-project ?

The content seems to be slightly different, both have references to dev - which shouldn’t be needed for production?

Older docs seem to indicate mautic/recommended-project … but this contains links to 5.x-dev resources… while mautic/mautic contain production versions, not dev.

@escopecz … why did the last change in mautic/recommended-project went “back to dev”?

Thanks for shedding some light on this.

From my understanding, the “recommended-project” branch is a bleeding edge branch intended for dev purpose.

And to answer the second part of your question, this is really a preference.

i.e.
I would never use any dev tools such as composer in a production environment (git is probably my only exception to that rule).

For one, it wouldn’t fit with some of our customers requirements who are requesting a very high level of security and/or uptime. Composer doesn’t meet both criteria.

On the other hand, there’s much more powerful tools on any Linux environment to handle any file and DB management tasks. And in a way more efficient way. Few seconds with composer is often a blink of an eye with system management tools.

On a higher level, independent of the previous points, the software maturity is also up to the administrator. Some will prefer LTS. Some other will prefer a more current branch. And some others may prefer living on the edge.

1 Like

I consider Composer to be the right tool for building a PHP project on production. Way better than Git. But that’s a discussion I’m not willing to spend time on.

I presented the way how I think production Mautic instances should be deployed last year. See

I encourage everyone to give it a try and help me improve it based on your feedback. It doesn’t have Git nor Composer nor NPM in production environment.

2 Likes