Sample Header Ad - 728x90

where is your vendor location from Composer?

1 vote
0 answers
11 views
My *vendor* directory from Composer is in the Home directory of my Linux user account. And I am very allergic to loading files into projects with something arbitrary as the user account name in the directory-link. Preferably, I'd like the *vendor* directory much closer to the web-directory (but not in public of course). What is making me very insecure is that in most examples I see from others, is that they do have the vendor directory at a much more convenient place and closer to the public-server-root. I googled all night on how to move my vendor folder, and I didn't find anything in plain English that I could understand. I guess I am not the smartest. And Linux is moslty headaches and anger for me. And I am surprised by the outcome of my *vendor* directory location as I did what most tutorials showed. cd /var/www php -r "copy('https://getcomposer.org/installer ', 'composer-setup.php');" php -r "if (hash_file('sha384', 'composer-setup.php') === 'dac665fdc30fdd8ec78b38b9800061b4150413ff2e3b6f88543c636f7cd84f6db9189d43a81e5503cda447da73c7e5b6') { echo 'Installer verified'.PHP_EOL; } else { echo 'Installer corrupt'.PHP_EOL; unlink('composer-setup.php'); exit(1); }" php composer-setup.php php -r "unlink('composer-setup.php');" *Most likely, you want to put the composer.phar into a directory on your PATH, so you can simply call composer from any directory (Global install), using for example:* sudo mv composer.phar /usr/local/bin/composer I did look at composer.json. But I found nothing on how to re-link a vendor directory in that file, as I do not care if that file stays in the User home dir. Anyone with words of wisdome, advice, or plain old telling me what I did wrong?
Asked by Desert Wind (43 rep)
Jun 2, 2025, 07:57 PM