Jump to content

Making Composer provide untagged git file

Go to solution Solved by kicken,

Recommended Posts

I wish to use this version of ApiPlatformExtension which is the most current on the 3.0 branch. Note that there is no tag associated with it as v3.0.0 is several days older.




Now, on packagist, there are several versions available, and based on the 2022-09-20 08:49 UTC date associated with 3.0.x-dev, it appears that is the one I want.  It is my understanding that this branch only looks like a version, but isn't as indicated by the .x in the name.



How should I make my project use the specific file which I stated above I wish to use?  The project is not in production, so while maybe not ideal, I am okay with using an untagged version.  I've tried the following and multiple similar attempts, but only get the previous version of the file.

    "type": "project",
    "license": "proprietary",
    "minimum-stability": "stable",
    "prefer-stable": true,
    "require": {
        "php": ">=8.1",
        "api-platform/core": "3.0.x-dev",


Link to comment
Share on other sites

  • Solution

You can tell composer to pull a specific commit by adding #hash after version.

"api-platform/core": "3.0.x-dev#14c7cba"

Normally just doing 3.0.x-dev would pull the latest version, but I think because both the main branch and 3.0 branch use this alias it causes an issue and for some reason composer prefers the main branch.

  • Like 1
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.