Skip to content

Composer TransportException of recipes #826

@Gokujo

Description

@Gokujo

Symfony version(s) affected

5.3

Description

I am working behind a proxy through Nexus 'cause the local network is not allowed to access the internet.
My problem is that symfony/flex tries to access recipe file on github.

[Composer\Downloader\TransportException]
  The "https://api.github.com/repos/symfony/recipes-contrib/contents/index.json?ref=flex/main" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: Der angegebene Host ist unbekannt.   
  failed to open stream: php_network_getaddresses: getaddrinfo failed: Der angegebene Host ist unbekannt.

How to reproduce

composer create-project symfony/website-skeleton web

Possible Solution

I had to change the const DEFAULT_ENDPOINT in /vendor/symfony/flex/src/Downloader.php to

    private const DEFAULT_ENDPOINTS = [
        'http://localhost:91/_assets/composer/symfony/index.json',
        'http://localhost:91/_assets/composer/symfony/contrib/index.json',
    ];

I had to download the files locally and than link them to localhost

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions