Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate a composer repository with all the plugins #53

Open
real34 opened this issue Jun 20, 2012 · 7 comments
Open

Generate a composer repository with all the plugins #53

real34 opened this issue Jun 20, 2012 · 7 comments
Labels

Comments

@real34
Copy link

real34 commented Jun 20, 2012

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:

  1. 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
}
  1. 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

@shama
Copy link
Contributor

shama commented Jun 20, 2012

👍

@uzyn
Copy link

uzyn commented Jun 20, 2012

Seconded. Especially with CakePHP 2.x being PSR-0 compatible, we should try to use and promote Composer instead of a custom-made package/dependency manager.

Coincidentally, I've just released this Composer plugin for CakePHP yesterday to easily load Composer packages with CakePHP.

Also keeping a close eye on shama/baton for supporting installations of CakePHP components on Composer.

@shama
Copy link
Contributor

shama commented Jun 20, 2012

It's probably worth noting that @josegonzalez has been talking about Composer integration for a long time. Baton came entirely from his influence. So to clarify my thumbs up, I'm all for Composer integration with cakepackages just as long as it's inline with @josegonzalez.

@josegonzalez
Copy link
Member

Totally fine with me. It's more of a "when does @josegonzalez buy a bottle of rum and start programming" problem than anything else. If anyone wants to take the lead on it, let me know and I'm down to tell you how it would work :)

For the record, I've already rebuilt the Satis stuff in ruby, so it's trivial to do the same for CakePHP, or just pull in all of composer :P

@uzyn
Copy link

uzyn commented Jun 21, 2012

I have some time and am all for getting Composer into CakePHP. @josegonzalez I would love to take a shot at this. Let me know what you think and I would give it a shot.

@rchavik
Copy link
Member

rchavik commented Jun 21, 2012

💟

@shama
Copy link
Contributor

shama commented Jun 21, 2012

Looked into the bottle of rum issue. Unfortunately it is illegal for me to ship liquor to NY. So I guess I'll just help with programming and give you a virtual 🍸

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants