Installation
PSD2PHP is easy to install and work with to make your job as a developer easier.
Installing PSD2PHP
We recommend that you install PSD2PHP using Composer to easily download the dependencies.
To install PSD2PHP you need to be running PHP >= 7.1. Although cURL is not a requirement, we recommend that you install cURL for best possible performance.
We are using guzzlephp in order to send the API requests. If you're not installing PSD2PHP using composer we recommend that you download this package as well. If you would rather overwrite the default request method, you can read more about it here
Install composer (skip to step 3 if you already have composer installed)
curl -sS https://getcomposer.org/installer | php
Make composer available globally
In order to make composer available globally you need to move it to the correct folder.
Linux / Unix / OSX:
To make the composer available globally you need to move the composer.phar file to the/usr/local/bin
folder.\mv composer.phar /usr/local/bin/composer
If you would rather install composer for your user account only which doesn't require root privileges you can move it to your.local/bin
folder:mv composer.phar ~/.local/bin/composer
Note: If the command above fails, you may beed to run it again with
sudo
Note: On some versions of OSX the/usr
directory does not exist by default. If you receive the error "/usr/local/bin/composer: No such file or directory", you will need to create the directory manually before proceeding:mkdir -p /usr/local/bin
Now you should be able to run
composer
instead ofphp composer.phar
Run the composer command to install the latest stable version of PSD2PHP
composer require teskon/psd2php
Require
vendor/autoload.php
in your PHP projectrequire 'vendor/autoload.php';
Note: If you're requiring the autoloader from another folder you will need to write in the correct path to the folder.
Installing the latest development branch
If you want to install the latest development branch you can do so by running the following command:
composer require teskon/psd2php:master-dev
Note: The latest development branch is not meant to be used in production environments. It might include new functionality, but because that functionality is in BETA we can't guarantee that it will work as intended.