-
Notifications
You must be signed in to change notification settings - Fork 347
Installation
Depending on your project's requirements the eBay SDK for PHP can be installed through one of 3 supported methods. The recommended way is to install the SDK with Composer.
Using Composer is the recommended way of installing the eBay SDK for PHP.
Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you. -- Composer Website.
Installing the SDK with Composer is done as follows:
- Download and install Composer.
curl -sS https://getcomposer.org/installer | php
- Install the SDK.
php composer.phar require dts/ebay-sdk-php
- Require Composer's autoloader by adding the following line to the top of your code.
<?php require 'vendor/autoload.php';
It is highly recommended that you read the Composer documentation at getcomposer.org to fully understand how to install Composer, define dependencies and configure the autoloading.
Each release of the SDK comes with a [phar](https://www.php.net/manual/en/book.phar.php] archive. This contains all the classes and dependencies you need to run the SDK. You can download the phar from the SDK releases. Using the phar in your project is as simple as including it in your scripts.
require '/path/to/downloaded/phar/ebay-sdk-php.phar';
You can download a zip archive from the SDK releases which contains all the classes and dependencies you need to run the SDK. Unzip the archive into a directory of your choice and include the provided autoloader in your project's code.
require '/path/to/downloaded/zip/ebay-sdk-php-autoloader.php';