Open a new terminal and install Composer:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
Once that has finished installing and moved, install the PHP-CS-Fixer Composer package globally:
| # To check if this is up-to-date with the tax rates go to | |
| # http://www.expatax.nl/tax-rates-2015.php and see if there's anything | |
| # newer there. | |
| # | |
| # I make no guarantees that any of this is correct. I calculated this | |
| # at the time and have been updating it when new tax rates come along | |
| # because people keep finding this useful. | |
| # | |
| # There's also an interactive JS version of this created by | |
| # @stevermeister at |
Open a new terminal and install Composer:
curl -sS https://getcomposer.org/installer | php
mv composer.phar /usr/local/bin/composer
Once that has finished installing and moved, install the PHP-CS-Fixer Composer package globally:
The API we are creating in this gist will follow these rules :
password Grant Type only (no need for Authorization pages and such).v1.api.example.com)The API will be written in PHP with the Symfony 3 framework. The following SF2 bundles are used :
| # https://docs.docker.com/compose/yml/ | |
| # Each service defined in docker-compose.yml must specify exactly one of | |
| # image or build. Other keys are optional, and are analogous to their | |
| # docker run command-line counterparts. | |
| # | |
| # As with docker run, options specified in the Dockerfile (e.g., CMD, | |
| # EXPOSE, VOLUME, ENV) are respected by default - you don't need to | |
| # specify them again in docker-compose.yml. | |
| # | |
| service_name: |
| <?php | |
| $composerLock = json_decode(file_get_contents('composer.lock'), true); | |
| $packages = $composerLock['packages']; | |
| $packagesList = []; | |
| foreach ($packages as $package) { | |
| $packageName = $package['name']; | |
| $packagesList[] = $packageName; |
| <?php | |
| $composerRaw = file_get_contents("./composer.json"); | |
| $composerJson = json_decode($composerRaw, true); | |
| echo $composerJson["name"] . " PHP " . $composerJson["require"]["php"] . PHP_EOL; |