我是symfony2和symblog的新手。在第三章中,当我尝试使用数据fixture时,我尝试了命令:
php的作曲家。phar更新
但我发现了一个错误:
无法打开输入文件:composer.phar
所以我谷歌了一下,试了试
php composer.phar install
但还是得到相同的错误。因此,请指导如何使用wamp在symfony2中安装新的扩展或数据fixture之类的编写器。
我是symfony2和symblog的新手。在第三章中,当我尝试使用数据fixture时,我尝试了命令:
php的作曲家。phar更新
但我发现了一个错误:
无法打开输入文件:composer.phar
所以我谷歌了一下,试了试
php composer.phar install
但还是得到相同的错误。因此,请指导如何使用wamp在symfony2中安装新的扩展或数据fixture之类的编写器。
当前回答
在使用以下命令之前,我一直面临同样的问题。
composer self-update
希望这也适用于你!
如果没有,你可以在这里查看整个版本 https://blog.packagist.com/composer-2-0-is-now-available/
其他回答
我用的是windows 8.0。在我的情况下,安装或更新我只是使用composer install或其他东西,而不是php composer.phar。这对我很有效 就像
composer require google/apiclient:1.*
如果你使用的是Ubuntu/Linux并且你正在尝试运行
php的作曲家。Phar需要在命令行上进行干预/图像。
使用sudo composer require intervention/image代替。这会给你想要的东西。
与我的工作,你只需要文件编写器。Phar和作曲家。Json在当前项目中。 命令为
php composer.phar update
我也有同样的问题。当我使composer全局可用时,这个问题就解决了。现在我可以从文件夹中的任何地方屯命令。
作曲家更新
作曲家需要“samplelibraryyouwant”
朋友们,请按照以下步骤在MAC OS中修复此问题
Step 1: first run the command in Terminal with your project directory $ curl -sS https://getcomposer.org/installer | php Step 2: Move the composer.phar in your project directory $ mv composer.phar /Applications/MAMP/htdocs/bashrushAPI/composer.phar Step 3: Setup alias the composer $ alias composer='/Applications/MAMP/htdocs/bashrushAPI/composer.phar' Step 4: Check the composer version now $ composer --version Composer version 1.7.2 2018-08-16 16:57:12 Step 5: Confirm the project folders and file placed on bellow $ ls CONTRIBUTING.md docker-compose.yml templates README.md logs tests composer.json phpunit.xml vendor composer.lock public composer.phar src Step 6: Now update composer $ composer.phar update Loading composer repositories with package information Updating dependencies (including require-dev) Nothing to install or update Generating autoload files Step 7: Run your sample project $ php composer.phar start php -S localhost:8080 -t public [Thu Sep 27 03:16:11 2018] ::1:51177 [200]: / [Thu Sep 27 03:16:11 2018] ::1:51178 [404]: /favicon.ico - No such file or directory