Download the interpreter source code here.
After download the interpreter source code (preferable), set in the environment variables of the Windows.
At Path
key set the php interpreter path.
Learn more here.
Download distributions here.
Follow the steps and at end run localhost
in the URL bar to test if Apache module it works.
Your projects should be placed on ...<x>:\xampp-folder-instalation\htdocs
.
In the php.ini
file you should to uncomment extension_dir = "exe"
on the Operating System Windows
.
To use socket you should to uncomment (remove semicolon) the line extension=sockets
. If you need to encrypt the stream, uncomment extension=openssl
;
Done. Now you can try the php
command in the DOS terminal.
$ php -v
Open the php.ini
file and uncomment extension=curl
removing the ;
character.
The latest stable version of .phar
file is here.
Put the composer.phar
file in a folder composer-<version>
;
On Windows
, open the CMD
as Administrator
and create a symbolik link of this folder, like that:
$ mklink /d"<UNITY_LETTER>:...\composer <UNITY_LETTER>:...\composer-<version>
Create a composer.bat
file in the same path of composer.phar
file. Open the terminal in the path of .phar
file, and run:
$ echo @php "%~dp0composer.phar" %* > composer.bat
Note: between the last "
and %
there must be a space.
composer.bat
path in the environment variables Path
;That enables executing without .bat
.
Create the .bash_profile
file at <UNITY_LETTER>:\Users\<username>
running:
$ echo alias composer=composer.bat >> .bash_profile
$ source .bash_profile
Inside your PHP Project run on terminal:
$ composer install
So the dependencies defined in composer.json
will be installed.
$ composer update
$ composer require <vendor>/<package> [<version statement>]
$ composer self-update
$ composer clear-cache
Set HTTP_PROXY
as http://<user>:<password>@<domin>:<port>
in environment variables.
See more about Composer environment variables.
Settings > Integrations
and click on Packagist
link option;Username
and the token;Test settings
and Save.