Skip to content

KonstantinKai/proto-composer-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

proto-composer-plugin

CI Release License: MIT

A community WASM plugin for proto that manages Composer versions.

Prerequisites

Composer requires PHP. Install PHP via proto-php-plugin or have it available on your system PATH.

Installation

proto plugin add composer "github://KonstantinKai/proto-composer-plugin"
proto install composer

Usage

# Install Composer
proto install composer 2.8

# Use Composer
proto run composer -- --version

# List available versions
proto versions composer

# Pin a version in the current directory
proto pin composer 2.8

Configuration

Configure in .prototools under [tools.composer]:

[tools.composer]
# Custom COMPOSER_HOME directory (optional)
composer-home = "/path/to/composer/home"

Supported Platforms

Platform Architecture Install method
Linux x64, arm64 Download PHAR binary
macOS x64, arm64 Download PHAR binary
Windows x64 Download PHAR + .bat wrapper

How It Works

Unlike most proto plugins that download prebuilt native binaries, Composer is distributed as a PHP archive (PHAR). The plugin uses native_install to:

  1. Download composer.phar from getcomposer.org/download/<version>/composer.phar
  2. On Unix: save as composer and chmod +x
  3. On Windows: save as composer.phar and create a composer.bat wrapper

The plugin declares requires: ["php"] so proto ensures PHP is available before installing Composer.

Version Aliases

  • latest — resolves to the newest stable Composer 2.x release
  • stable / lts — same as latest
  • Partial versions like 2.8 resolve to the latest patch (e.g. 2.8.6)

Related

Support

If you find this plugin useful, please give it a star on GitHub — it helps others discover the project!

License

MIT

About

A proto WASM plugin for managing Composer versions

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages