GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing getcomposer.org — Introduction - Composer
Introduction#Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you. Dependency management#Composer is not a package manager in the same sense as Yum or Apt are. Yes,
it deals with "packages" or libraries, but it manages them on a per-project
basis, installing them in a directory (e.g. This idea is not new and Composer is strongly inspired by node's npm and ruby's bundler. Suppose:
Composer:
See the Basic usage chapter for more details on declaring dependencies. System Requirements#Composer in its latest version requires PHP 7.2.5 to run. A long-term-support version (2.2.x) still offers support for PHP 5.3.2+ in case you are stuck with a legacy PHP version. A few sensitive php settings and compile flags are also required, but when using the installer you will be warned about any incompatibilities. Composer needs several supporting applications to work effectively, making the
process of handling package dependencies more efficient. For decompressing
files, Composer relies on tools like Composer is multi-platform and we strive to make it run equally well on Windows, Linux and macOS. Installation - Linux / Unix / macOS#Downloading the Composer Executable#Composer offers a convenient installer that you can execute directly from the command line. Feel free to download this file or review it on GitHub if you wish to know more about the inner workings of the installer. The source is plain PHP. There are, in short, two ways to install Composer. Locally as part of your project, or globally as a system wide executable. Locally#To install Composer locally, run the installer in your project directory. See the Download page for instructions. The installer will check a few PHP settings and then download Now run You can install Composer to a specific directory by using the
Now run Globally#You can place the Composer PHAR anywhere you wish. If you put it in a directory
that is part of your After running the installer following the Download page instructions you can run this to move composer.phar to a directory that is in your path:
If you like to install it only for your user and avoid requiring root permissions,
you can use
Now run Installation - Windows#Using the Installer#This is the easiest way to get Composer set up on your machine. Download and run
Composer-Setup.exe. It will
install the latest Composer version and set up your PATH so that you can
call
Manual Installation#Change to a directory on your Create a new Using cmd.exe:
Using PowerShell:
Add the directory to your PATH environment variable if it isn't already. For information on changing your PATH variable, please see this article and/or use your search engine of choice. Close your current terminal. Test usage with a new terminal:
Docker Image#Composer is published as Docker container in a few places, see the list in the composer/docker README. Example usage:
To add Composer to an existing Dockerfile you can simply copy binary file from pre-built, low-size images:
Note: you need to manually install other runtime dependencies inside your image when using this method; see also https://github.com/composer/composer/blob/main/README.md#binary-dependencies. Read the image description for further usage information. Note: Docker specific issues should be filed on the composer/docker repository. Note: You may also use Using Composer#Now that you've installed Composer, you are ready to use it! Head on over to the next chapter for a short demonstration. Found a typo? Something is wrong in this documentation? Fork and edit it! |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |