Jump to content

Making Composer provide untagged git file


NotionCommotion
 Share

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.

image.thumb.png.68d0ba476149fac4429f6e7ea6052f21.png

image.png.56a3df557adf8bea8d7039b6c121cbae.png

 

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.

image.png.c62a356e183cb9d9b521165da378dc3c.png

image.thumb.png.a023ea71be7935e209e57233d673b9a1.png

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

Join the conversation

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

Guest
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.

 Share

×
×
  • 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.