Skip to content

[Improvement]: Avoid unbound version constraints (*) #225

@erengy

Description

@erengy

Improvement description

I was recently trying to create a new skeleton project on a basic server with very limited resources, but the process was getting stuck at Loading composer repositories with package information. Debugging the issue with -vvv revealed that the culprit was Running pool optimizer.

According to a similar issue at composer/composer#12309, using * as a requirement is discouraged. Running composer diagnose on the project indeed gives the following warning:

Checking composer.json: WARNING
require.pimcore/pimcore : unbound version constraints (*) should be avoided
require.pimcore/admin-ui-classic-bundle : unbound version constraints (*) should be avoided
require.pimcore/quill-bundle : unbound version constraints (*) should be avoided

With that in mind, pool optimizer finished in 8.5 seconds after making the following change on composer.json, compared to the previous 30+ minutes (stopped the process after that point):

   "require": {
-    "pimcore/pimcore": "*",
+    "pimcore/pimcore": "^11.5",
     "pimcore/platform-version": "^2024.4",    
-    "pimcore/admin-ui-classic-bundle": "*",
+    "pimcore/admin-ui-classic-bundle": "^1.7",
-    "pimcore/quill-bundle": "*",
+    "pimcore/quill-bundle": "^1.0",
     "symfony/amqp-messenger": "^6.2",

Not sure if this defeats the purpose of #193, but in any case, wanted to share my slightly frustrating experience.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions