2017 © Pedro Peláez
 

composer-plugin composer-module-installer

A Composer plugin that allows installing SimpleSAMLphp modules through Composer.

image

simplesamlphp/composer-module-installer

A Composer plugin that allows installing SimpleSAMLphp modules through Composer.

  • Monday, April 24, 2017
  • by olav
  • Repository
  • 6 Watchers
  • 5 Stars
  • 81,801 Installations
  • PHP
  • 69 Dependents
  • 0 Suggesters
  • 2 Forks
  • 3 Open issues
  • 9 Versions
  • 17 % Grown

The README.md

SimpleSAMLphp Composer module installer

Build Status Coverage Status Scrutinizer Code Quality Type coverage, (*1)

This package is a Composer plugin that allows a SimpleSAMLphp module to be installed through Composer. Installation can be as easy as executing:, (*2)

composer.phar require vendor/simplesamlphp-module-mymodule 1.*

That command would install vendor/simplesamlphp-module-mymodule matching version 1.*., (*3)

Making a module installable through Composer

To make a module installable through Composer, you need to add a composer.json-file to the root of the module. It should look something like:, (*4)

{
    "name": "vendor/simplesamlphp-module-mymodule",
    "description": "A description of the module 'mymodule'.",
    "type": "simplesamlphp-module",
    "require": {
        "simplesamlphp/composer-module-installer": "~1.0"
    }
}

The package name must be on the form:, (*5)

<vendor>/simplesamlphp-module-<module name>

<vendor> is the vendor name you use, and <module name> is the name of your module. Your module will be installed in the modules/<module name> directory in the SimpleSAMLphp installation directory., (*6)

Assets modules

Asset modules are a special kidn of module that will install pre-built assets in SimpleSAMLphp's public/ directory. These modules follow a slightly different naming convention simplesamlphp-assets-<module name>, (*7)

Installing your custom module

If you publish your module on Packagist, no special configuration is required to install your module. However, if your module is hosted in a private repository, you need to add a repository for the module to your SimpleSAMLphp composer.json file. For example, if your module is located in a Git repository in /home/username/mymodule, you would add something like the following to repositories in composer.json:, (*8)

{
    "type": "vcs",
    "url": "/home/username/mymodule"
}

The `repositories array may look something like:, (*9)

"repositories": [
    {
        "type": "package",
        "package": {
            "name": "robrichards/xmlseclibs",
            "version": "1.3.1",
            "source": {
                "type": "svn",
                "url": "http://xmlseclibs.googlecode.com/svn",
                "reference": "trunk@50"
            },
            "autoload": {
                "files": ["xmlseclibs.php"]
            }
        }
    },
    {
        "type": "vcs",
        "url": "/home/username/mymodule"
    }
]

Once you have added the repository, you should be able to install your module by executing:, (*10)

composer.phar require vendor/simplesamlphp-module-mymodule:dev-master

(dev-master instructs Composer to install the master-branch from the Git repository.), (*11)

See the Composer Repository documentation for more information about adding your own custom repositories to Composer., (*12)

Module names that contain uppercase letters

New modules should only have lowercase letters in the module name, however a lot of existing module names contain uppercase letters. Since Composer package names should only contain lowercase letters, a mixed-case variant of the module name can be provided in the ssp-mixedcase-module-name extra data option:, (*13)

{
    "name": "vendor/simplesamlphp-module-mymodule",
    "description": "A description of the module 'MyModule'.",
    "type": "simplesamlphp-module",
    "extra": {
        "ssp-mixedcase-module-name": "myModule"
    },
    "require": {
        "simplesamlphp/composer-module-installer": "~1.1"
    }
}

Note that this is only meant for migration of existing modules. New modules should only use lowercase letters in the name., (*14)

The Versions

24/04 2017

dev-master

9999999-dev

A Composer plugin that allows installing SimpleSAMLphp modules through Composer.

  Sources   Download

The Requires

 

24/04 2017

v1.1.6

1.1.6.0

A Composer plugin that allows installing SimpleSAMLphp modules through Composer.

  Sources   Download

The Requires

 

30/06 2016

v1.1.5

1.1.5.0

A Composer plugin that allows installing SimpleSAMLphp modules through Composer.

  Sources   Download

The Requires

  • composer-plugin-api ^1.0

 

28/01 2016

v1.1.4

1.1.4.0

A Composer plugin that allows installing SimpleSAMLphp modules through Composer.

  Sources   Download

The Requires

  • composer-plugin-api ^1.0

 

25/11 2015

v1.1.3

1.1.3.0

A Composer plugin that allows installing SimpleSAMLphp modules through Composer.

  Sources   Download

The Requires

  • composer-plugin-api ^1.0

 

11/06 2015

v1.1.2

1.1.2.0

A Composer plugin that allows installing SimpleSAMLphp modules through Composer.

  Sources   Download

The Requires

  • composer-plugin-api ^1.0

 

28/02 2014

v1.1.1

1.1.1.0

A Composer plugin that allows installing SimpleSAMLphp modules through Composer.

  Sources   Download

The Requires

  • composer-plugin-api 1.0.0

 

28/02 2014

v1.1.0

1.1.0.0

A Composer plugin that allows installing SimpleSAMLphp modules through Composer.

  Sources   Download

The Requires

  • composer-plugin-api 1.0.0

 

21/02 2014

v1.0.0

1.0.0.0

A Composer plugin that allows installing SimpleSAMLphp modules through Composer.

  Sources   Download

The Requires

  • composer-plugin-api 1.0.0