Answer the question
In order to leave comments, you need to log in
How to connect composer to your project in Windows 10?
I look at this topic, they don’t really answer, but still. Simply put, I can't connect composer to my local project.
It has been installed globally, and when checked, it gives out the version and a list of its commands. But, I cannot connect the folder with my project. For example:
<b>$ php composer.phar require silex/silex ~1.1</b>
[ErrorException]
file_put_contents(C:\composer;C:\Users\***\AppData\Roaming\Composer\vendo
r\bin;c:\Users\SYSTEM\AppData\Roaming\Composer\vendor\bin\;C:\Users\***\A
ppData\Roaming\Composer\bin;): failed to open stream: No such file or direc
tory
require [--dev] [--dry-run] [--prefer-source] [--prefer-dist] [--fixed] [--no-su
ggest] [--no-progress] [--no-update] [--no-install] [--no-scripts] [--update-no-
dev] [-w|--update-with-dependencies] [-W|--update-with-all-dependencies] [--with
-dependencies] [--with-all-dependencies] [--ignore-platform-req IGNORE-PLATFORM-
REQ] [--ignore-platform-reqs] [--prefer-stable] [--prefer-lowest] [--sort-packag
es] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader]
[--apcu-autoloader-prefix APCU-AUTOLOADER-PREFIX] [--] [<packages>]...
[UnexpectedValueException]
C:\composer;C:\Users\***\AppData\Roaming\Composer\vendor\bin;c:\Users\SYS
TEM\AppData\Roaming\Composer\vendor\bin does not exist and could not be cre
ated.
init [--name NAME] [--description DESCRIPTION] [--author AUTHOR] [--type [TYPE]]
[--homepage HOMEPAGE] [--require REQUIRE] [--require-dev REQUIRE-DEV] [-s|--sta
bility STABILITY] [-l|--license LICENSE] [--repository REPOSITORY]
Answer the question
In order to leave comments, you need to log in
Composer doesn't care Windows or not
Specify the full path to it and run it from the folder where you are going to download everything to vendor
in my project folder there is such a bat file
"z:\usr\local\php7\php.exe" "z:\composer.phar " --no-dev update
kicked and that's it
How did you install composer? There should be no problems with the installer from the official site, it also prescribes what is needed in the PATH, and you can also specify the location of php.exe during installation. And then you can simply call it through the console in the project folder composer init, composer install, composer update. The statement about connecting the composer to the project is not entirely true, the system also does not really matter, as Leonid already wrote, since it is not used in any way during direct work. It is used only to change dependencies during development, or to install them if the project is deployed.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question