Download the PHP package manychois/composery without Composer

On this page you can find all versions of the php package manychois/composery. 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 composery

Composery

A strongly-typed PHP library providing a low-level API equivalent to the Composer CLI.

Each Composer command maps to a corresponding method on the Composer class. All methods come in two variants: blocking (returns a ComposerResult) and streaming (returns a Generator that yields OutputLine objects as they arrive).

Requirements

Installation

Bundled Composer binary

The test suite ships with a bundled Composer binary at tests/Integration/composer (version 2.9.5, SHA-256 c86ce603fe836bf0861a38c93ac566c8f1e69ac44b2445d9b7a6a17ea2e9972a). This binary is used exclusively during integration tests and is not installed as a production dependency.

Quick start

Streaming output in real time

Environment configuration

Environment controls the working directory, COMPOSER_HOME, the PHP memory limit, and an optional explicit path to the Composer binary.

Binary resolution order

When binaryPath is null, BinaryLocator searches in this order:

  1. binaryPath from Environment (if set)
  2. $COMPOSER_HOME/composer or $COMPOSER_HOME/composer.phar
  3. which composer (Unix) / where composer (Windows)
  4. composer.phar in workingDir

Throws ComposerNotFoundException if nothing is found.

Global options

Every options class extends AbstractGlobalOption, which exposes the following flags available to all commands:

Property CLI flag Default
$help --help / -h false
$noCache --no-cache false
$noPlugins --no-plugins false
$noScripts --no-scripts false
$profile --profile false
$quiet --quiet / -q false
$verbose --verbose / -v false
$version --version / -V false
$workingDir --working-dir= / -d null

--no-interaction and --no-ansi are always injected by the runner and are not exposed as options.

API reference

Composer is constructed with an Environment and an optional BinaryLocator:

Every command is available in a blocking variant that returns ComposerResult and a streaming variant that returns a Generator<int, OutputLine, null, ComposerResult>. Options classes carry the same name as the method with an Options suffix (e.g. install → InstallOptions). All options classes extend AbstractGlobalOption; see the global options table above for the inherited flags.

Blocking method Streaming method Composer docs
init initStreaming init
install installStreaming install
update updateStreaming update
require requireStreaming require
remove removeStreaming remove
dumpAutoload dumpAutoloadStreaming dump-autoload
validate validateStreaming validate
show showStreaming show
outdated outdatedStreaming outdated
checkPlatformReqs checkPlatformReqsStreaming check-platform-reqs

composer.json as a typed model (Schema\Project)

The Manychois\Composery\Schema namespace provides value objects that mirror the composer.json schema. The root type is Project: a mutable, strongly-typed representation of a manifest after you decode the file to a PHP array.

Project::parse() walks the associative array and fills public properties. Known nested structures become dedicated classes (for example Author, Support, Autoload, AutoloadDev, Scripts, ProjectConfig, Archive, PhpExt, Source, Dist, and Funding). String-key dependency maps (require, require-dev, replace, conflict, provide, suggest) stay as array<string, string>. minimum-stability is parsed into the MinimumStability enum when present. The repositories field is a list<mixed> because entries can be objects or shorthand strings.

Project implements JsonSerializable. Calling json_encode($project) emits a shape suitable for persisting back to JSON (only non-empty / non-null fields are included, matching typical composer.json usage).

This layer is separate from the Composer runner: it does not invoke Composer or read files by itself. Use it whenever your application needs to inspect or build manifest data with IDE and PHPStan-friendly types instead of raw arrays.

Return types

ComposerResult

Method Return type Description
successful() bool true when exit code is 0
exitCode() int Raw process exit code
output() string Combined stdout + stderr output
duration() float Wall-clock time in seconds

OutputLine (streaming)

Property Type Description
$content string The line text (newline stripped)
$source OutputSource OutputSource::Stdout or OutputSource::Stderr
$timestamp float microtime(true) when the line was captured

The generator's return value (available via $gen->getReturn() after the loop) is the ComposerResult for the completed command.

Enums

PreferMode

Case CLI flag
PreferMode::Dist --prefer-dist
PreferMode::Source --prefer-source
PreferMode::None (no flag emitted)

ListFormat

Case CLI value
ListFormat::Text (default, no flag emitted)
ListFormat::Json --format=json

Exceptions

Class Thrown when
ComposerNotFoundException No Composer binary can be located
ComposerRunFailedException (reserved for future use)

All versions of composery with dependencies

PHP Build Version
Package Version
Requires php Version >=8.5
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 manychois/composery contains the following files

Loading the files please wait ...