Download the PHP package shyim/composer-go-proxy without Composer

On this page you can find all versions of the php package shyim/composer-go-proxy. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package composer-go-proxy

composer-go-proxy

Tests

A Composer plugin that downloads package dists through proxy.golang.org — the Go module proxy — instead of the GitHub API.

Why

By default, Composer downloads package archives from api.github.com, which is

The Go module proxy already fetches every public git repository at every vX.Y.Z tag and caches the resulting zip forever, served by Google's CDN. This plugin makes Composer use that infrastructure: faster, stable, no rate limits, no tokens.

How it works

  1. For every package with a GitHub/GitLab/Bitbucket dist URL and a v-prefixed semantic version, the plugin registers the Go module zip https://proxy.golang.org/<module>/@v/<version>.zip as a preferred dist mirror.
  2. Packages with other tag schemes (e.g. 1.20.0 without v) and dev versions are covered too: the plugin resolves the dist commit SHA to a Go pseudo-version via the proxy's .info endpoint and serves that zip (the lookup result is cached in Composer's file cache).
  3. Composer tries the Go proxy first. On any failure (unknown tag, private repo, proxy hiccup) it automatically falls back to the original dist URL — installs can never break because of the plugin.
  4. Go module zips nest all files below <module>@<version>/, which Composer cannot extract correctly, so the plugin flattens that prefix after extraction.
  5. Go module zips always contain the full repository tree, while GitHub zipballs honor .gitattributes export-ignore rules. The plugin reapplies those rules after extraction, so the installed files are identical to the original dist (no tests, CI configs or subsplit packages leaking into vendor/).

Repositories without a go.mod (virtually every PHP package) are served with a +incompatible suffix once their major version is ≥ 2 — the plugin registers both candidates and lets the fallback pick the right one.

Installation

That's it — every composer install / update in every project now uses the Go proxy when possible.

Supported hosts

Works out of the box for packages hosted on:

Self-hosted git servers (GitLab CE, Gitea, Forgejo, Codeberg, …) can be enabled additionally, as long as they are publicly reachable and serve go-import meta tags:

Configuration

Env var Description
COMPOSER_GO_PROXY_HOSTS Comma-separated list of additional allowed git hosts
COMPOSER_GO_PROXY_DISABLE Set to 1 to completely disable the plugin (debugging)

Limitations

License

MIT


All versions of composer-go-proxy with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4
composer-plugin-api Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package shyim/composer-go-proxy contains the following files

Loading the files please wait ...