How to install and use Composer on Xampp serwer
Below I describe an installation process of Composer with XAMPP on Windows.
Command-line interface
Contents
To get help from the command-line, simply call composer
or composer list
to see the complete list of commands, then --help
combined with any of those can give you more information.
The following options are available with every command:
- –verbose (-v): Increase verbosity of messages.
- –help (-h): Display help information.
- –quiet (-q): Do not output any message.
- –no-interaction (-n): Do not ask any interactive question.
- –no-plugins: Disables plugins.
- –working-dir (-d): If specified, use the given directory as working directory.
- –profile: Display timing and memory usage information
- –ansi: Force ANSI output.
- –no-ansi: Disable ANSI output.
- –version (-V): Display this application version.
Composer downloading
Download and run Composer-Setup.exe – it will install the latest composer version whenever it is executed.
Composer installation
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('SHA384', 'composer-setup.php') === 'e115a8dc7871f15d853148a7fbac7da27d6c0030b848d9b3dc09e2a0388afed865e6a3d6b3c0fad45c48e2b5fc1196ae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" php composer-setup.php php -r "unlink('composer-setup.php');"
Composer init
When you run the command it will interactively ask you to fill in the fields, while using some smart defaults.
php composer.phar init
Install Composer, after init
php composer.phar install
Folder structure after install composer:
If You want to check my repositories:
https://packagist.org/users/tom-sapletta-com/packages/