Add source in composer package #13901

Closed
opened 2025-11-02 10:56:39 -06:00 by GiteaMirror · 3 comments
Owner

Originally created by @lutek on GitHub (Dec 31, 2024).

Feature Description

Add source in composer package. Package can be linked with repository, should be used as source.
https://getcomposer.org/doc/05-repositories.md#package

Source: The source is used for development. This will usually originate from a source code repository, such as git. You can fetch this when you want to modify the downloaded package.

On 'composer show' i get empty source, even though composer.json specifies preferred source for selected package.

composer.json

    "config": {
        "optimize-autoloader": true,
        "sort-packages": true,
        "preferred-install": {
            "ecommercebox/*": "source"
        }
    },
❯ composer show ecommercebox/sw-plugin-xxx
name     : ecommercebox/sw-plugin-xxx
descrip. : xxx Shops API
keywords : 
versions : * x.x.x
released : 2024-12-31, today
type     : shopware-platform-plugin
license  : proprietary
homepage : 
source   : []  
dist     : [zip] https://xxx.xxx/api/packages/shopware/composer/files/ecommercebox%2Fsw-plugin-xxx/x.x.x/ecommercebox-sw-plugin-xxx.x.x.x.zip 
path     : /Users/lutek/www/xxx.local/vendor/ecommercebox/sw-plugin-xxx
names    : ecommercebox/sw-plugin-xxx

Screenshots

No response

Originally created by @lutek on GitHub (Dec 31, 2024). ### Feature Description Add source in composer package. Package can be linked with repository, should be used as source. https://getcomposer.org/doc/05-repositories.md#package `Source: The source is used for development. This will usually originate from a source code repository, such as git. You can fetch this when you want to modify the downloaded package.` On 'composer show' i get empty source, even though composer.json specifies preferred source for selected package. composer.json ``` "config": { "optimize-autoloader": true, "sort-packages": true, "preferred-install": { "ecommercebox/*": "source" } }, ``` ``` ❯ composer show ecommercebox/sw-plugin-xxx name : ecommercebox/sw-plugin-xxx descrip. : xxx Shops API keywords : versions : * x.x.x released : 2024-12-31, today type : shopware-platform-plugin license : proprietary homepage : source : [] dist : [zip] https://xxx.xxx/api/packages/shopware/composer/files/ecommercebox%2Fsw-plugin-xxx/x.x.x/ecommercebox-sw-plugin-xxx.x.x.x.zip path : /Users/lutek/www/xxx.local/vendor/ecommercebox/sw-plugin-xxx names : ecommercebox/sw-plugin-xxx ``` ### Screenshots _No response_
GiteaMirror added the topic/packagestype/proposal labels 2025-11-02 10:56:39 -06:00
Author
Owner

@iVegas commented on GitHub (Jan 20, 2025):

Related https://github.com/go-gitea/gitea/issues/20871

@iVegas commented on GitHub (Jan 20, 2025): Related https://github.com/go-gitea/gitea/issues/20871
Author
Owner

@iVegas commented on GitHub (Jan 20, 2025):

The structure requires an update here:
https://github.com/go-gitea/gitea/blob/main/routers/api/packages/composer/api.go#L69

@iVegas commented on GitHub (Jan 20, 2025): The structure requires an update here: https://github.com/go-gitea/gitea/blob/main/routers/api/packages/composer/api.go#L69
Author
Owner

@lunny commented on GitHub (Feb 5, 2025):

I sent #33502 to resolve this, please help to review.

@lunny commented on GitHub (Feb 5, 2025): I sent #33502 to resolve this, please help to review.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#13901