Will yii-extensions have their own package type, or will they just work out of vendor. Makes no difference to the user (packages are required as usual), but would seperate yii-specifics from general purpose packages.

I am very glad Suralc raised the composer installer topic.
Thanks to his posting I just noticed, that there is an Yii installer already.

But the current implmentation of the Yii installer is pretty useless, it is doing things wrong and raising problems, IMHO.

To be honest, I haven't tried it out, but it is pretty obvious what it does.

The installer would put a package of the type "yii-extension" into protected/extensions and one of the type "yii-module" into protected/modules, when you run composer update or install.

First, if your application has a different directory structure than a standard Yii Web Application Skeleton it will fail, because the destination directories are missing. Moreover it is just using the package name without the vendor name, which may lead to additional conflicts.

Second, even if you have the directories mentioned above, you'll still have issues versioning your project, because you may mix up your own code, like in modules, with code, which is managed by composer.
Usually, you just commit composer.lock for the code you get from composer, because if you run composer install you'll get the exact revisions, which have been written to this file, see this link for more info.

Luckily, as layed out in this wiki article, you don't need to place your extensions and modules in the directories mentioned above, even for Yii 1.1.

An exception are themes, because this is code you'll very likely going to modify and an installer may be useful here. But developers have to require the installer in their theme package and moreover the installer also has to be able to find out your theme directory.

The installer directories should not be hardcoded, because we would loose the ability to define custom dir-structures for our projects.

Because of all the points now mentioned I sticked with composer script events, for Phundament, which are way more flexbile than installers.
As an example, it's very easy to run migrations or setup directory permissions when installing an extension or copying theme files into the right place, just by executing yiic commands.

There may be a way to enhance the installers, but I found it more complicated than using the script events - Let me know if someone has ideas how to accomplish this.

So here's my summary for the installers:

Yii2 should use the vendor/ folder for project extensions, custom modules may go into modules/ and extensions not available via composer go into extensions/

Yii2 should introduce these composer types "yii2-extension", "yii2-theme" and "yii2-application" (similar to the web app skeleton) - which would be important for searching through a large number of packages and also using installers later on.

I think this is the right time to link to some "Yii Application Standard Request" docs we've creeated, which treat the same subject, please note that they are just proposals! And we'd be very happy about feedback.

Pros:
+ the main composer repository, existing packages are there already
+ easy to use, repo is preconfigured in composer.phar
+ available as Open Source from https://github.com/composer/packagist (but it's a Symfony project )

Cons:
- a bit slow, due to the large number of packages
- you're relying on infrastructure from someone else

2. Do it on your own with Yii and satis

Pros:
+ policy could be to only allow Yii extensions and , which would be faster and cleaner
+ may be a Yii project
+ you're relying on your infrastructure

Cons:
- you'll have to build a web frontend on your own
- users would have to include that repo in composer.json
- a package may be registered at packagist.org and packages.yiiframework.com