lenius/economic-php-client

PHP-SDK to communicate with E-Conomic

Maintainers

Package info

github.com/Lenius/economic-php-client

Homepage

pkg:composer/lenius/economic-php-client

Statistics

Installs: 131 116

Dependents: 2

Suggesters: 0

Stars: 17

Open Issues: 1

v2.0.2 2026-03-02 14:45 UTC

This package is auto-updated.

Last update: 2026-03-02 14:52:47 UTC


README

PHP Tests Code Coverage Scrutinizer Code Quality Latest Stable Version Total Downloads License

Install

Via Composer

$ composer require lenius/economic-php-client

Documentation

Please see the official e-conomic documentation.

Access all debitors

Call the Customers url /Customers

$appToken = 'demo';
$grant    = 'demo';

$client = new Lenius\Economic\RestClient($appToken, $grant);

$parms = ['pagesize' => 100];

$response = $client->request->get('customers', $parms);

$status = $response->httpStatus();

if ($status == 200) {
    // Successful request
    $data = $response->asArray();
    print_r($data);
}

Testing

Tests kræver PHP 8.2+ med Xdebug til code coverage. Den nemmeste måde er via Docker.

Docker (anbefalet)

Byg image:

docker build -t economic-php-test .

Kør alle checks (tests, PHPStan og Psalm):

docker run --rm economic-php-test

Kør med code coverage HTML-rapport:

docker run --rm -v "$(pwd)/build:/app/build" economic-php-test

Åbn build/logs/phpunit-html/index.html i en browser for at se rapporten.

Kør enkeltvis:

docker run --rm economic-php-test composer test
docker run --rm economic-php-test composer stan
docker run --rm economic-php-test composer psalm

Lokalt

Forudsætter PHP 8.2+, Composer og Xdebug installeret:

composer test   # PHPUnit med code coverage
composer stan   # PHPStan statisk analyse
composer psalm  # Psalm statisk analyse
composer check  # Alle ovenstående på én gang

Contributing

All PR's are welcome, just throw me one, and i take a look at it :)

License

This code is release under the MIT License, which means you can do pretty much whatever you wanna do with it. Take a look at the LICENSE file for more information.

Author

This packages is originally developed and maintained by Carsten Jonstrup.