0
votes

Hi, I have just installed a Yii2 basic project from composer. I'm in mac osx yosemite 10.10. Neverthless i'm trying to install extensions as descrived in the tutorials from Yii guide 2.0 and i cannot do it, simply to the fact that i don´t know where to put the line:

php composer.phar require --prefer-dist arturoliveira/yii2-tileslidemenu "*"

this method says in terminal it cannot find composer.phar. Where to put the above line ?

When i installed the project "acastro" i wrote in terminal the line: composer create-project --prefer-dist yiisoft/yii2-app-basic acastro

and the installation worked very well (i had to deal with the mcrypt missing error first but then composer was recognized as a command by termnal)

So, what is the issue here, since nothing installs in vendors dir?


I have tried the other method but nothng happens. The method was:

"arturoliveira/yii2-tileslidemenu": "*"

added in the required section of composr.json file.

When i launch the project by localhost MAMP, nothing is installed in vendors dir.


Anyone can explain me how to install the proper way an extension in Yii2. In Yii1.1 was so easy to do it.

Many thanks in advance.

1

1 Answers

0
votes

So if you have global installation of composer and you do composer create-project --prefer-dist yiisoft/yii2-app-basic acastro, than you can do same with that line too:

composer require --prefer-dist arturoliveira/yii2-tileslidemenu "*"

I don't use MAMP, only XAMPP, but as far as I know, you have to manually do composer actions via command line.