今天我开始用Symfony2进行一些测试,但我不明白如何安装第三方软件包friendsofsymfony / user-bundle
我已经安装了一个名为" prova"的新简单项目。上
Oct 11 13:58:08 localhost sm-mta[3613]: STARTTLS=client, relay=aspmx.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128/128
Oct 11 13:58:08 localhost sm-mta[3613]: u9BKw7pL003611: to=<joe@ctclogis.com>, ctladdr=<www-data@localhost.localdomain> (33/33), delay=00:00:01, xdelay=00:00:01, maile$
Oct 11 13:58:09 localhost sm-mta[3613]: u9BKw7pL003611: to=<export@ypusa21.com>, ctladdr=<www-data@localhost.localdomain> (33/33), delay=00:00:02, xdelay=00:00:02, mai$
Oct 11 13:58:09 localhost sm-mta[3613]: STARTTLS=client, relay=alt1.aspmx.l.google.com., version=TLSv1/SSLv3, verify=FAIL, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128$
Oct 11 13:58:10 localhost sm-mta[3613]: u9BKw7pL003611: to=<joe@ctclogis.com>, ctladdr=<www-data@localhost.localdomain> (33/33), delay=00:00:03, xdelay=00:00:03, maile$
Oct 13 19:20:26 localhost sm-mta[6369]: u9E2KQ20006369: from=<>, size=2122, class=0, nrcpts=1, msgid=<201610140220.u9E2K13e006368@localhost.localdomain>, proto=ESMTP, $
Oct 13 19:20:26 localhost sm-msp-queue[6368]: u9E2K13e006368: to=www-data, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=31509, relay=[127.0.0.1] [127.0.0.1], dsn$
Oct 13 19:20:26 localhost sm-mta[6370]: u9E2KQ20006369: to=<www-data@localhost.localdomain>, delay=00:00:00, xdelay=00:00:00, mailer=local, pri=32350, dsn=2.0.0, stat=$
Oct 13 19:20:26 localhost sm-msp-queue[6368]: u9DM8URU004818: u9E2K13f006368: sender notify: Warning: could not send message for past 4 hours
我在
上安装了作曲家/public_html/prova
/public_html/prova/app
/public_html/prova/vendor
...
阅读文档我应该使用
下载软件包/var/www/composer.phar
/var/www/public_html
下载
上的所有软件包./composer.phar require friendsofsymfony/user-bundle
我的问题是 Composer应该在我的项目/ var / www / public_html / prova / vendor上创建这个/ vendor目录,而不是在composer.phar的位置上创建
如何在我的项目中启用此包装&#34; Prova&#34; ?
更新 在public_html / prova项目中移动composer.phar并执行&#34; require&#34;命令但抛出此错误
/var/www/vendor
答案 0 :(得分:5)
只需在项目目录composer.phar
中复制/public_html/prova
并从那里执行:
php composer.phar require friendsofsymfony/user-bundle
否则,您可以全局安装composer(https://getcomposer.org/doc/00-intro.md#globally)并永远忘记composer.phar
文件:
composer require friendsofsymfony/user-bundle