0
votes

A couple of years of go i used to program using PHP, but without frameworks. With these recent developments I've decided to get in the to the game and try using one. I've decided to use yii 2.0 .

I've read some of the documentation and in my opinion there is some lack of information (at least for who is getting started), so i´m having some problems installing yii 2.0 on my computer using Xampp. The PHP version is 5.5.9.

From what i could understand i downloaded the yii 2.0 framework, extracted the content and copied to c:\xampp\htdocs\yii2

I've already installed the composer, so the the next thing to do i think would be, using the cmd, do these two lines of code:

composer global require "fxp/composer-asset-plugin:1.0.0" composer create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic basic

The problem is when i do the last one it asks for username and password i think of GitHub. Can you tell me if I'm obligated to have an account on github to install yii 2.0 framework.

Is there a way to get around this?

1
By the time you wrote all this you would already have a github account. Heck you would have 5 of them by now. - Mihai P.

1 Answers

0
votes

Yii2 is integrated with composer asset plugin. It allows download Bower and NodeJs packages through Composer.

Github account is required to overcome API rate limit. Here is the explanation from the main contributor of this extension:

It's a rate limit of Github API. In anonymous access, Github at a greatly reduced limit (60/hr it seems to me), and we must be logged with a token for have a much higher limit.

See composer/composer#1569 and composer/composer#1877

The problem also exists using Nodejs and Bower.

You can find it in this issue, it's 9th from the top.

I think workaround with installing Bower and the same packages is not an option, because initially and with each framework update you must manually synchronize packages with their versions and override some configuration. Also some extensions require javascript plugins and using composer asset plugin too. So you have to do the same with each of them too. It simply not worth it. And having account on Github for web developer nowadays is kind of de facto standard.

Just create Github account if you are still don't have one and everything should be fine. Earlier updating process was pretty slow, now it's faster and I found this approach pretty interesting and flexible.