Open
Description
Most of the plugins in the CakePHP community cannot be loaded using Composer without declaring a custom package. It would be great to make plugins.cakephp.org a Composer repository, using Satis for instance : http://getcomposer.org/doc/articles/handling-private-packages-with-satis.md
This ticket is created to start discussions about this feature.
I think the information available for now are sufficient for working on a POC, and there will be rooms for improvements later.
Here are my thoughts:
- Implement a Satis configuration file generator from the database. Here is an untested draft:
{
"name": "CakePHP Plugins",
"homepage": "http://plugins.cakephp.org",
"repositories": [
{
// Package example for a repository without composer.json file
"type": "package",
"package": {
"type": "cakephp-plugin",
"name": "CakeDC/migrations",
"version": "master",
"source": {
"url": "git://github.com/CakeDC/migrations.git",
"type": "git",
"reference": "master"
},
"require": {
"php": ">=5.2", // This information is not yet available on plugins.cakephp.org, but it is an example of improvement
"pear-cakephp/CakePHP": "2.1.3", // Another improvement example
"shama/baton": "*" // important so we can use installer for CakePHP specific types
}
}
},
{ "type": "vcs", "url": "http://github.com/mycompany/privaterepo2" }, // if a composer.json file is detected
{ "type": "pear", "url": "http://pear.cakephp.org/" }
],
"require-all": true
}
- Regenerate the file using a cron task to build the static Composer repository with satis (after each repository monitoring)
Promoting Composer as a plugin installer makes sense since it becomes widely used in the PHP ecosystem. It would be better imo than a custom made API as suggested in #23