franzliedke / studio

A workbench for developing Composer packages.
MIT License
1.14k stars 74 forks source link

Fixing the lock file #52

Open janhartigan opened 8 years ago

janhartigan commented 8 years ago

Hey @franzliedke thanks a lot for taking the time to put together the recent release.

However, I have noticed one significant issue with the newly-generated composer.lock file. Normally composer generates something like this:

{
    "name": "owner/repo",
    "version": "dev-master",
    "source": {
        "type": "git",
        "url": "git@github.com:owner/repo.git",
        "reference": "2cf2e58fc8b71f44dbcca306cf7e16a65a2d4e97"
    },
    ...
}

There would also be a dist with the zipped contents of the git repo.

With the new updates, the composer lock file now looks like this:

{
    "name": "owner/repo",
    "version": "dev-master",
    "dist": {
        "type": "path",
        "url": "../../path/to/repo/",
        "reference": "2cf2e58fc8b71f44dbcca306cf7e16a65a2d4e97",
        "shasum": null
    },
    ...
}

Trouble with this is that when we push the code up through the pipeline, our servers will try to install that composer.lock file and it won't be able to figure out how to grab the dist. Since you're already using this in a real project, I'm guessing there's some other approach that I'm missing. Let me know what you think.

ouun commented 2 years ago

This is so useful! I really appriciate all the work Studio got in the past. But also for me, it is daily frustrating to clean up studio.json before pushing. @franzliedke do you see any chance to make this a bit more comfortable?

SanderSander commented 2 years ago

This is so useful! I really appriciate all the work Studio got in the past. But also for me, it is daily frustrating to clean up studio.json before pushing. @franzliedke do you see any chance to make this a bit more comfortable?

I have my own composer-link https://github.com/SanderSander/composer-link which tries overcomes the issues.

ouun commented 2 years ago

@SanderSander I was just able to test your composer-link package and it is awesome! Thank you so much for the note. Now looking forward to have wildcard folder support. For everyone here who needs a simple and fast solution to link Composer packages from different paths, have a look at this.

christianlerch commented 9 months ago

We've been struggling with this as well and created a new Composer plugin https://github.com/ALDIDigitalServices/ComposerPackageDevelopmentToolset. Feedback appreciated.