simplesamlphp/composer-module-installer
Composer 安装命令:
composer require simplesamlphp/composer-module-installer
包简介
A Composer plugin that allows installing SimpleSAMLphp modules through Composer.
README 文档
README
This package is a Composer plugin that allows a SimpleSAMLphp module to be installed through Composer. Installation can be as easy as executing:
composer.phar require vendor/simplesamlphp-module-mymodule 1.*
That command would install vendor/simplesamlphp-module-mymodule matching
version 1.*.
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:
{
"name": "vendor/simplesamlphp-module-mymodule",
"description": "A description of the module 'mymodule'.",
"type": "simplesamlphp-module",
"require": {
"simplesamlphp/composer-module-installer": "~1.4"
}
}
The package name must be on the form:
<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.
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>
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:
{
"type": "vcs",
"url": "/home/username/mymodule"
}
The `repositories array may look something like:
"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:
composer.phar require vendor/simplesamlphp-module-mymodule:dev-master
(dev-master instructs Composer to install the master-branch from the Git
repository.)
See the Composer Repository documentation for more information about adding your own custom repositories to Composer.
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:
{
"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.4"
}
}
Note that this is only meant for migration of existing modules. New modules should only use lowercase letters in the name.
simplesamlphp/composer-module-installer 适用场景与选型建议
simplesamlphp/composer-module-installer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 11.12M 次下载、GitHub Stars 达 13, 最近一次更新时间为 2014 年 02 月 24 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 simplesamlphp/composer-module-installer 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 simplesamlphp/composer-module-installer 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 11.12M
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 13
- 点击次数: 19
- 依赖项目数: 160
- 推荐数: 0
其他信息
- 授权协议: LGPL-2.1-only
- 更新时间: 2014-02-24