composer / installers

A Multi-Framework Composer Library Installer
MIT License
1.43k stars 412 forks source link

Yii native support #90

Closed ujovlado closed 11 years ago

ujovlado commented 11 years ago

Hi, can you please describe how Yii is natively supported?

I know it had support in 1.0.3 version, but this is not true with next version.

When I browse through issues https://github.com/composer/installers/issues/68, https://github.com/composer/installers/pull/71 and https://github.com/composer/installers/pull/75 i see it was removed finally.

So native suport means I have to manage it own way, right?

Thanks!

shama commented 11 years ago

Take a look at yiisoft/yii#2313. I believe you now configure the vendor-dir:

{
  "config": {
    "vendor-dir": "protected/extensions"
  }
}

http://getcomposer.org/doc/04-schema.md#config

/cc @schmunk42

schmunk42 commented 11 years ago

You can install your extensions into protected/extensions if you want to, but you simply can configure Yii extensions and modules to run from anywhere, also from vendor

See http://www.yiiframework.com/wiki/392/creating-yii-applications-with-composer/ and http://www.yiiframework.com/wiki/457/fixing-extensions-without-modifying-their-code for some examples.

Both articles are based on my implementation available from https://github.com/phundament/app But there's also http://yiinitializr.2amigos.us which is a related project.

The thing you've to do mostly to work around the glitches .

ujovlado commented 11 years ago

Thanks for response, guys! But I think this is not native support. :)

@shama set the vendor-dir to protected/extensions seems like good idea only when I'll be using Yii extensions only and no other libraries.

@schmunk42 thx for articles, I'll try solution with aliases.

But, is there any way how to use composer/installer only for mapping? Something like:

{
    "extra": {
        "installer-paths": {
            "my/custom/path": ["vendor/package"]
        }
    }
}

I only want to say that vendor/package's content will be extracted to my/custom/path

Thank you

schmunk42 commented 11 years ago

set the vendor-dir to protected/extensions seems like good idea only when I'll be using Yii extensions only and no other libraries.

And you shouldn't mix composer packages with your application repo, usually. Don't know about the mapping.

ujovlado commented 11 years ago

I think those aliases will be enough. Thx