Download the PHP package werbfred/composer-package-updater without Composer

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

Composer Package Updater

This project provides a way to have scripts be executed on packages when they are being installed, updated and uninstalled.

Currently only scripts defined in the root composer.json file are being executed. This is a workaround to Composer's Issue 1993.

For security reasons, Composer\Script\PackageEvent will only be forwarded to the packages for which these events are being raised.

In my case, I have Drupal modules and themes hosted in a git repo. Once installed/updated via composer I want to:

Each module or theme being responsible to perform its own install/update/uninstall tasks.

Setting it up !

Install this project via packagist :

Open the root composer.json file to update it with configuration below:

Autoload

Add "ComposerPackageUpdater\\composer\\": "vendor/werbfred/composer-package-updater/src/composer" to psr-4 in autoload section.

Example:

This will tell Composer where files of a given namespace are located. In our case Composer will be able to load our PackageUpdater class.

Note: More information on autoload section can be found here.

Scripts

Add below entries to the scripts section.

The above will ensure that below PackageEvents can be forwarded :

Note: More information on scripts section can be found here and there.

Configuration

Configuration must be added under dependency-scripts in extra section.

Parameters:

Parameter type Default Description
run bool false If true package scripts will be called. Any other value will be considered as false.
trust array [] List of packages for which you want the Composer\Script\PackageEvent be dispatched.

Example:

Note: More information on extra section can be found here.

What do I need to put in my package's composer.json* file ?

You can now fill your scripts section with your own ones.

Be careful: Pathes in your autoloads section must be relative to your package's location.

Usefull Links


All versions of composer-package-updater with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.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 werbfred/composer-package-updater contains the following files

Loading the files please wait ....