git clone https://github.com/friendica/friendica [web server folder]
cd [web server folder]
- php util/composer.phar install
+ php bin/composer.phar install
3. Create an empty database and note the access details (hostname, username,
password, database name).
## How to use Composer
-If you don't have Composer installed on your system, Friendica ships with a copy of it at `util/composer.phar`.
+If you don't have Composer installed on your system, Friendica ships with a copy of it at `bin/composer.phar`.
For the purpose of this help, all examples will use this path to run Composer commands, however feel free to replace them with your own way of calling Composer.
Composer requires PHP CLI and the following examples assume it's available system-wide.
````
~> git clone https://github.com/friendica/friendica.git friendica
~/friendica> cd friendica
-~/friendica> util/composer.phar install
+~/friendica> bin/composer.phar install
````
That's it! Composer will take care of fetching all the required libraries in the `vendor` folder and build the autoloader to make those libraries available to Friendica.
````
~> cd friendica
~/friendica> git pull
-~/friendica> util/composer.phar install
+~/friendica> bin/composer.phar install
````
And that's it. If any library used by Friendica has been upgraded, Composer will fetch the version currently used by Friendica and refresh the autoloader to ensure the best performances.
To add a library, just add its Packagist identifier to the `require` list and set a target version string.
-Then you should run `util/composer.phar update` to add it to your local `vendor` folder and update the `composer.lock` file that specifies the current versions of the dependencies.
+Then you should run `bin/composer.phar update` to add it to your local `vendor` folder and update the `composer.lock` file that specifies the current versions of the dependencies.
#### Updating an existing dependency
If a package needs to be updated, whether to the next minor version or to the next major version provided you changed the adequate code in Friendica, simply edit `composer.json` to update the target version string of the relevant library.
-Then you should run `util/composer.phar update` to update it in your local `vendor` folder and update the `composer.lock` file that specifies the current versions of the dependencies.
+Then you should run `bin/composer.phar update` to update it in your local `vendor` folder and update the `composer.lock` file that specifies the current versions of the dependencies.
Please note that you should commit both `composer.json` and `composer.lock` with your work every time you make a change to the former.
However, you can temporarily change environment variable for the execution of a single command.
For Composer, this would be:
````
-$> COMPOSER_HOME=/var/tmp/composer sudo -u [web user] util/composer.phar [mode]
+$> COMPOSER_HOME=/var/tmp/composer sudo -u [web user] bin/composer.phar [mode]
````
## Related
3. Fork the Friendica repository from [https://github.com/friendica/friendica.git](https://github.com/friendica/friendica.git).
4. Clone your fork from your GitHub account to your machine.
Follow the instructions provided here: [http://help.github.com/fork-a-repo/](http://help.github.com/fork-a-repo/) to create and use your own tracking fork on GitHub
-5. Run `util/composer.phar install` in Friendica's folder.
+5. Run `bin/composer.phar install` in Friendica's folder.
6. Commit your changes to your fork.
Then go to your GitHub page and create a "Pull request" to notify us to merge your work.