Composer #6

Closed
wants to merge 1 commit into
from

Projects

None yet

3 participants

@robo47
robo47 commented Mar 9, 2012

Composer Support

A Package a packagist.org would be great

@igorw
igorw commented Mar 27, 2012

👍

To give you some more context:

Composer is a new dependency manager for PHP. It allows you to specify dependencies on a per-project basis. It takes lots of inspiration from NPM and ruby's bundler.

All you need to support composer is a composer.json file. In order to allow easy installation, the repository needs to be added to packagist, which is the standard repository for composer. Packagist will fetch all the versions from your github repository tags.

Once it has been added, adding mandator to a project will be as easy as creating this composer.json file in the project's directory:

{
    "require": {
        "mandango/mandator": "dev-master"
    }
}

And running this command:

$ php composer.phar install

Note: Packagist will re-crawl github for new versions all the time. After submitting it once, you don't have to do anything else.

Check out the following information on composer and packagist:

Cheers!

@igorw igorw commented on the diff Mar 27, 2012
composer.json
@@ -0,0 +1,28 @@
+{
+ "name": "mandango/mondator",
+ "description": "Mondator is an easy and flexible class generator for PHP.",
+ "keywords": ["classgenerator"],
+ "homepage": "http://mandango.org/doc/mandango/mondator.html",
+ "type": "library",
+ "license": "MIT",
+ "version": "1.0.0",
@igorw
igorw Mar 27, 2012

this should be removed.

@igorw igorw commented on the diff Mar 27, 2012
composer.json
@@ -0,0 +1,28 @@
+{
+ "name": "mandango/mondator",
+ "description": "Mondator is an easy and flexible class generator for PHP.",
+ "keywords": ["classgenerator"],
@igorw
igorw Mar 27, 2012

maybe "code-generation"?

@igorw igorw commented on the diff Mar 27, 2012
composer.json
@@ -0,0 +1,28 @@
+{
+ "name": "mandango/mondator",
+ "description": "Mondator is an easy and flexible class generator for PHP.",
+ "keywords": ["classgenerator"],
+ "homepage": "http://mandango.org/doc/mandango/mondator.html",
+ "type": "library",
+ "license": "MIT",
+ "version": "1.0.0",
+ "authors": [
+ {
+ "name": "Pablo Díez",
+ "email": "pablodip@gmail.com",
+ "homepage": "http://mandango.org/"
+ }
@igorw
igorw Mar 27, 2012

indentation is off

@igorw igorw commented on the diff Mar 27, 2012
composer.json
+ "description": "Mondator is an easy and flexible class generator for PHP.",
+ "keywords": ["classgenerator"],
+ "homepage": "http://mandango.org/doc/mandango/mondator.html",
+ "type": "library",
+ "license": "MIT",
+ "version": "1.0.0",
+ "authors": [
+ {
+ "name": "Pablo Díez",
+ "email": "pablodip@gmail.com",
+ "homepage": "http://mandango.org/"
+ }
+ ]
+ ,
+ "require":
+ {
@igorw
igorw Mar 27, 2012

the { should be on the previous line

@igorw igorw commented on the diff Mar 27, 2012
composer.json
+ "homepage": "http://mandango.org/doc/mandango/mondator.html",
+ "type": "library",
+ "license": "MIT",
+ "version": "1.0.0",
+ "authors": [
+ {
+ "name": "Pablo Díez",
+ "email": "pablodip@gmail.com",
+ "homepage": "http://mandango.org/"
+ }
+ ]
+ ,
+ "require":
+ {
+ "php": ">=5.3.0",
+ "symfony/class-loader": ">=2.0.0",
@igorw
igorw Mar 27, 2012

this is not needed, use the composer autoloader. let me know if you need more information.

@igorw igorw commented on the diff Mar 27, 2012
composer.json
+ "version": "1.0.0",
+ "authors": [
+ {
+ "name": "Pablo Díez",
+ "email": "pablodip@gmail.com",
+ "homepage": "http://mandango.org/"
+ }
+ ]
+ ,
+ "require":
+ {
+ "php": ">=5.3.0",
+ "symfony/class-loader": ">=2.0.0",
+ "twig/twig": ">=1.2"
+ },
+ "autoload": {
@igorw
igorw Mar 27, 2012

indentation again.

@pablodip
Member

Done, thanks!

@pablodip pablodip closed this Apr 17, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment