Download the PHP package strausmann/composerapi without Composer

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

Latest Stable Version Total Downloads Latest Unstable Version License

ComposerAPI

A wrapper for Composer to call it's commands from inside your code using a simple object oriented API: turns php composer.phar require monolog/monolog into $composer->require(array('monolog/monolog:*'));.

Installation

As always, the easiest (and the recommended) way to install is using composer:

Note the explicit requirement for composer/composer in a fixed version: this is important to prevent automatic updates of this dependency when running the update command programmatically - see "Known limitations" section below for details.

There is no simple way to install composer an the API without using composer itself. Theoretically you could include ComposerAPI.php in your code manually, but you would need to make sure an installation of "composer/composer" is available under the namespace "\Composer". The trouble is, however, that composer has lot's of dependencies itself, so you will probably end up needing the packaged version (composer.phar) anyway. If so, use the simple composer-install above.

Quick start

Here is an example, that adds the monolog library to an existing composer.json manifest and installes it with all dependencies:

Supported commands

All commands take an optional $output argument that must implement the OutputInterface of symfony console. If this argument is not passed, ComposerAPI will use StreamOutput by default.

Known limitations

Self-update for composer not working properly

Since composer itself is a dependency of ComposerAPI, calling ComposerAPI->update() will also lead to an attempt to update composer. This won't work in most cases because the dependencies of composer will get updated one-by-one leading to inconsistencies. Solution: Pin composer to a concrete version in your root composer.json to block updating it. If you want to update composer manuall, use the packaged version (composer.phar) just like when installing ComposerAPI.

Resource consumption

Composer often needs a lot of memory and a lot of time too. Running commands like update will often take longer than PHP's max_execution_time or ecxeed the memory_limit. ComposerAPI tries to increase these limits at runtime, however this will not work if PHP runs in safe mode. Unfortunately, I do not see a simple solution for this issue. Feel free to suggest one!

Thanks

Thanks for @kabachello for the Source Project


All versions of composerapi with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0 || ^7.1 || ^7.2
composer/composer Version ^1.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 strausmann/composerapi contains the following files

Loading the files please wait ....