I'm using composer as my dependency manager and since I need to develop with Yii Framework I added it to my composer.json file, so it looks like this:
//other properties...
"require": {
//other dependencies...
"yiisoft/yii": "dev-master"
}
Composer.json is ok, Yii downloaded correctly, but there is a feature I think composer misses. My yii directory now is full of "rubbish", demo folders, build files bla bla that I don't really need. There is a way to tell composer to keep only some directory and throw away the others?
Yii is a high-performance, component-based PHP framework for developing large-scale Web applications rapidly. It enables maximum reusability in Web programming and can significantly accelerate your Web application development process. The name Yii (pronounced Yee or [ji:] ) is an acroynym for "Yes It Is!".
Conceptually Yii1 and Yii2 are quite similar, however Yii2 runs on newer PHP versions and utilizes namespaces, traits etc. Yii2 has also support for dependency injection through $container singleton available after initializing the framework.
The official website claims that Yii is a fast, secure and efficient PHP framework designed for creating bespoke web applications. Just like Laravel, Yii has an open-source code and was initially intended to eliminate the disadvantages of PRADO framework.
Uday, Sawant (2013). Instant Building Multi-Page Forms with Yii How-to. Packt Publishing. ISBN 978-1-78216-642-9 .
With composer we work in a different way. With composer our application take care only of its code. In fact, if you kork with git, you must add yii folder to .gitignore couse is not your application folder. This is the symfony way.
What about Yii!? First of all I suggest you to start yii projects with:
$ composer create-project yiisoft/yii path/to/your/project
This is the Yii way to work with yii and composer. After that, when you finish to dowload yii, composer ask you if you want to keep or not yii's git files. You can simply say no, and remove manually these files. You can also try to fork yiisoft/yii and improve this behavior so this removing stuffs will happen automatically.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With