EFL

Installation

How to install the EFL Leasing PHP SDK and satisfy all runtime requirements.

Requirements

The SDK targets modern PHP applications with the following minimum requirements:

  • PHP >= 8.1 (recommended 8.2 or newer)
  • ext-json
  • Composer for dependency management

The SDK itself does not depend on a specific HTTP client implementation, but you will need either:

  • Guzzle (guzzlehttp/guzzle), or
  • Symfony HttpClient (symfony/http-client), or
  • Your own implementation of HttpClientInterface.

Installing the SDK

Install the package via Composer:

composer require imoli-pl/efl-leasing-sdk

This will add imoli-pl/efl-leasing-sdk to your composer.json and install all required dependencies.

The root namespace of the SDK is:

  • Imoli\EflLeasingSdk\

with PSR-4 autoloading from the src/ directory.

Installing from Git repository

If you prefer to install the SDK directly from the Git repository instead of Packagist, you can configure a VCS repository in your composer.json:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/imoli-pl/efl-leasing-sdk"
    }
  ],
  "require": {
    "imoli-pl/efl-leasing-sdk": "dev-master"
  }
}

The example above uses the master branch (dev-master) and always gives you the latest commits from that branch.

If you want to lock your project to a specific tagged version, change the constraint accordingly, for example:

{
  "repositories": [
    {
      "type": "vcs",
      "url": "https://github.com/imoli-pl/efl-leasing-sdk"
    }
  ],
  "require": {
    "imoli-pl/efl-leasing-sdk": "1.2.3"
  }
}

You can also use a version range such as "^1.2" if you want to stay on a stable major/minor line while still receiving compatible bugfix releases.

After updating composer.json, run:

composer update imoli-pl/efl-leasing-sdk

This approach is useful when you want to test unreleased changes from the imoli-pl/efl-leasing-sdk GitHub repository or when you need to depend on a fork or a specific tag from Git.

Installing HTTP client adapters

If you want to use one of the built-in HTTP adapters, install the corresponding package.

Guzzle

composer require guzzlehttp/guzzle

Then configure the adapter:

use GuzzleHttp\Client as GuzzleClient;
use Imoli\EflLeasingSdk\Http\Adapter\GuzzleHttpAdapter;

$guzzle = new GuzzleClient([
    'timeout' => 30,
    'connect_timeout' => 10,
]);

$httpClient = new GuzzleHttpAdapter($guzzle);

Symfony HttpClient

composer require symfony/http-client

Then configure the adapter:

use Imoli\EflLeasingSdk\Http\Adapter\SymfonyHttpAdapter;
use Symfony\Component\HttpClient\HttpClient;

$symfonyClient = HttpClient::create();
$httpClient = new SymfonyHttpAdapter($symfonyClient);

Custom HTTP client

If your project uses a different HTTP stack, implement the HttpClientInterface defined by the SDK. The HTTP integration guide and API documentation explain the required methods and expected behaviour.

Installing development tools

For SDK development and contribution you may also want to install:

  • An Xdebug or PCOV extension for code coverage.
  • Tools configured in composer.json scripts:
    • composer test – run the test suite.
    • composer test:coverage – generate a coverage report.
    • composer phpstan – run static analysis.
    • composer cs-check – check coding standards.
    • composer cs-fix – auto-fix coding standards.

These tools are not required to use the SDK as a dependency in your application.

Next steps

  • Continue with Quickstart for a minimal end‑to‑end integration.
  • See Configuration for detailed configuration of environments, HTTP clients and logging.