質問

Composer is a tool for dependency management in PHP projects. It allows you to declare the dependent libraries your project needs and it will install them in your project for you. Composer is not a package manager.

I told this to declare my meaning from Composer. Recently I have tried to run my first Google API project. There is a quickStart witch tells I need to use Composer. So I tried to run composer using php composer.phar install, but the only output I got was some question marks ???????, and no dependencies where fetched. I haven't noticed anything special about composer itself, it seems that there must be something with .phar files that I don't know. Is there anything special in the architecture of phar files? What should I do?

I googled a lot, but there was nobody having the same problem as mine.

役に立ちましたか?

解決

The issue you describe sounds like you have detect_unicode enabled in your php.ini. You should disable it because it really is of no use and creates problems with phars.

By the way using the composer installer would do a check of settings and warn you about such problems.

他のヒント

php -d detect_unicode=Off composer.phar install

fixed it on MacOS X, it seems to reset my php.ini every now and then

Coming pretty late to this question, but I'd like to add that you can always run this command to verify php is configured correctly for Composer

curl -s https://getcomposer.org/installer | php -- --check

That will let you know if anything needs to be amended. If you get a blank output from Composer, that's the first place to go for help.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top