Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Composer require fetches details of ALL VCS repositories #8291

Closed
mintymatt opened this issue Aug 23, 2019 · 1 comment

Comments

@mintymatt
Copy link

commented Aug 23, 2019

My composer.json:

{
    "name": "[hidden]",
    "type": "project",
    "description": "[hidden]",
    "keywords": [
        "[hidden]",
    ],
    "license": "MIT",
    "repositories": [
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-alerts.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-awards.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-blogs.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-core.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-dashboard.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-faqs.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-forms.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-gallery.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-media-library.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-navigations.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-newsletters.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-offers.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-pages.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-popups.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-redirects.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-rooms.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-settings.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-testimonials.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-treatments.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/module-users.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/section-full-text.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/section-text-only.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/section-cards-three.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/section-cards-two.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/section-hero.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/section-image-text.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/section-intro.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/section-sitemap.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/section-slider.git"
        },
        {
            "type": "vcs",
            "url":  "git@[hidden]/helper-auth0.git"
        }
    ],
    "require": {
        "php": "^7.1.3",
        "auth0/login": "~5.0",
        "[hidden]/module-alerts": "^1.0",
        "[hidden]/module-awards": "^1.0",
        "[hidden]/module-blogs": "^1.0",
        "[hidden]/module-core": "^1.0",
        "[hidden]/module-dashboard": "^1.0",
        "[hidden]/module-faqs": "^1.0",
        "[hidden]/module-forms": "^1.0",
        "[hidden]/module-gallery": "^1.0",
        "[hidden]/module-media-library": "^1.0",
        "[hidden]/module-navigations": "^1.0",
        "[hidden]/module-newsletters": "^1.0",
        "[hidden]/module-offers": "^1.0",
        "[hidden]/module-pages": "^1.0",
        "[hidden]/module-popups": "^1.0",
        "[hidden]/module-redirects": "^1.0",
        "[hidden]/module-rooms": "^1.0",
        "[hidden]/module-settings": "^1.0",
        "[hidden]/module-testimonials": "^1.0",
        "[hidden]/module-treatments": "^1.0",
        "[hidden]/module-users": "^3.1",
        "[hidden]/section-cards-three": "^1.0",
        "[hidden]/section-cards-two": "^1.0",
        "[hidden]/section-full-text": "^1.0",
        "[hidden]/section-hero": "^1.0",
        "[hidden]/section-image-text": "^1.0",
        "[hidden]/section-intro": "^1.0",
        "[hidden]/section-sitemap": "^1.0",
        "[hidden]/section-slider": "^1.0",
        "[hidden]/section-text-only": "^1.0",
        "[hidden]/helper-auth0": "^1.0",
        "cloudinary/cloudinary_php": "^1.14",
        "fideloper/proxy": "^4.0",
        "intervention/image": "^2.4",
        "laravel/framework": "5.8.*",
        "laravel/tinker": "^1.0",
        "league/flysystem-aws-s3-v3": "^1.0",
        "league/flysystem-cached-adapter": "^1.0",
        "mobiledetect/mobiledetectlib": "^2.8",
        "moontoast/math": "^1.1",
        "myclabs/php-enum": "^1.7",
        "owen-it/laravel-auditing": "^9.2",
        "sentry/sentry-laravel": "1.1.0",
        "spatie/color": "^1.1",
        "spatie/laravel-backup": "^6.3"
    },
    "require-dev": {
        "beyondcode/laravel-dump-server": "^1.0",
        "filp/whoops": "^2.0",
        "fzaninotto/faker": "^1.4",
        "mockery/mockery": "^1.0",
        "nunomaduro/collision": "^2.0",
        "phpunit/phpunit": "^7.0"
    },
    "config": {
        "optimize-autoloader": true,
        "preferred-install": "dist",
        "sort-packages": true
    },
    "extra": {
        "laravel": {
            "dont-discover": []
        }
    },
    "autoload": {
        "psr-4": {
            "App\\": "app/",
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ]
    },
    "autoload-dev": {
        "psr-4": {
            "Tests\\": "tests/"
        }
    },
    "minimum-stability": "dev",
    "prefer-stable": true,
    "scripts": {
        "post-autoload-dump": [
            "Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
            "@php artisan package:discover --ansi"
        ],
        "post-root-package-install": [
            "@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
        ],
        "post-create-project-cmd": [
            "@php artisan key:generate --ansi"
        ]
    }
}

Output of composer diagnose:

Checking composer.json: OK
Checking platform settings: OK
Checking git settings: OK
Checking http connectivity to packagist: OK
Checking https connectivity to packagist: OK
Checking github.com rate limit: OK
Checking disk free space: OK
Checking pubkeys:
Tags Public Key Fingerprint: [hidden]
Dev Public Key Fingerprint: [hidden]
OK
Checking composer version: OK
Composer version: 1.9.0
PHP version: 7.3.8
PHP binary path: C:\php\php7.3\php.exe

When I run this command:

composer require [hidden]/module-core@1.16

image

Every single VCS git repo gets pinged, when we're only expecting module-core to be pinged and updated.

@stof

This comment has been minimized.

Copy link
Contributor

commented Aug 23, 2019

that's totally expected, as composer cannot know which package is provided in this VCS repo if it does not load the composer.json from it.
Registering tons of VCS repos is know to be bad for performance. That's exactly the reason why Private Packagist and Satis exist: aggregating the composer metadata from all this repos in a single place that can be loaded much faster.

@alcohol alcohol closed this Aug 26, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.