title: What is usage of "conflict" in composer.json and what should I do with it?
body: <p>I found the <code>composer.json &amp; composer.lock</code>(php) has <code>conflict </code> section (not to be confused with merge conflict ). The other similar files like <code>package.json/yarn.json</code> (nodejs) or <code>Pipfile</code> (python) and the corresponding <strong>lock</strong> files <code>package-lock.json/yarn.lock</code> or <code>Pipfile.lock</code>,  do not have such format even though all these lock files serve the same purpose (lock the dependence to the exact version) and implement in the similar way (at least looking from the surface)</p>
  <p>So what is usage of it and what should I do with it ? I read the composer document <a href="https://getcomposer.org/doc/04-schema.md#conflict" rel="nofollow noreferrer">https://getcomposer.org/doc/04-schema.md#conflict</a> but I still feel confused, e.g.</p>
  <blockquote>
  <p>Map of packages that conflict with this version of this package. They will not be allowed to be installed together with your package.</p>
  </blockquote>
  <p>For example after running <code>composer install</code> I have a composer.lock saying</p>
  <pre><code>    {
          &quot;name&quot;: &quot;symfony/http-kernel&quot;,
          &quot;version&quot;: &quot;v4.4.20&quot;,
          ...
          &quot;conflict&quot;: {
              &quot;symfony/browser-kit&quot;: &quot;&lt;4.3&quot;,
              &quot;symfony/config&quot;: &quot;&lt;3.4&quot;,
              &quot;symfony/console&quot;: &quot;&gt;=5&quot;,
              &quot;symfony/dependency-injection&quot;: &quot;&lt;4.3&quot;,
              &quot;symfony/translation&quot;: &quot;&lt;4.2&quot;,
              &quot;twig/twig&quot;: &quot;&lt;1.43|&lt;2.13,&gt;=2&quot;
          },
      ...
  </code></pre>
  <p>It is easy to guess &quot;symfony/console&quot; 5.0 is conflicted with &quot;symfony/http-kernel&quot; 4.4.20 so <code>symfony/console 5.0</code> will not be installed.</p>
  <p>Do I need to do anything with the conflict ? So far I feel like that as a package user (not the package developer) those info is just a FYI and I don't need to do anything. But then why bother to list them for me ? After all package.json and Pipefile don't have such information and I don't find the problem without it.</p>
  <p>--- update ---</p>
  <p>From the answer I got I realize I need to emphasize this: I understand <strong>composer.lock</strong> is for composer so I don't need to worry about it.</p>
  <p>What I don't understand is the purpose putting it in <strong>composer.json</strong>, this file is for human users. So if it has a conflict section what should I do about it?</p>