Ambiguous dependency declarations collide with core module namespaces
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #2744539. -->
Reported by: [Mixologic](https://www.drupal.org/user/391689)
>>>
<p>In an attempt to ensure that a modules metadata requires the proper version of drupal/core, there is a check to see if a dependency of a module is actually a core dependency and <em>if it has a constraint</em>, elevate that constraint to be a <code>require drupal/core {constraint}</code></p>
<p>For example, some modules may have <code>action >=8.1.0</code> to take advantage of some new api introduced in 8.1.0 in the action module. This, in turn needs to be translated into <code>"require":{"drupal/core":">=8.1.0"}</code></p>
<p>The problem is that sometimes, modules are removed from core, and become their own contrib projects (php, entity), and other times, modules start as contrib projects, and migrate their way into core (e.g. bigpipe).</p>
<p>So, if somebody declares an ambigious dependency in their module, like 'entity >=8.x-1.0-alpha3' we dont have a very easy way of determining whether or not they mean the entity module that is part of the entity <em>project</em>, or if they mean the entity module that <em>came with drupal core at one time</em>.</p>
<p>Still thinking of ways to mitigate this.</p>
issue