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

Yii native support #90

Closed
ujovlado opened this issue Jun 20, 2013 · 5 comments
Closed

Yii native support #90

ujovlado opened this issue Jun 20, 2013 · 5 comments

Comments

@ujovlado
Copy link

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 #68, #71 and #75 i see it was removed finally.

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

Thanks!

@shama
Copy link
Contributor

shama commented Jun 20, 2013

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
Copy link
Contributor

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
Copy link
Author

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
Copy link
Contributor

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
Copy link
Author

I think those aliases will be enough. Thx

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

No branches or pull requests

3 participants