Tailoring Yii2 Extensions.

Hello!

I’ve been developing in Yii since 1.1, about 2 years ago. I was excited for the public release of Yii2 and decieded to jump into it.

I found out that you can easily install extensions and extra modules through composer, which will manage dependencies and versions for you, which is quite convenient.

I’ve been finding modules that meet ALMOST my exact needs, but in the end don’t because of small details. How do I go about making my own changes to these extensions, since the vendor directory is .gitignore’d by default? Do I really need to extract all the code and port it to a new namespace under my control within my project? or is there an easier way?

I know it might sound selfish and paranoid, but I don’t want to rely on composer forever, I wish to be able to encapsulate these extensions as part of my development. Is this bad practice? I’m not sure how to approach this, and to be honest it’s giving me quite the headache.

Thanks in advance.

The right way is to Extend the extension of the vendor and just rewrite what you want to personalize

Hi!

One possibility would be:

  1. Fork it.

  2. Modify it.

Description:

http://www.yiiframework.com/wiki/673/using-your-own-forked-version-of-extensions-with-composer/

Regards

  1. Send a pull request if the change could be applied in general. Community will be thankful.