lenius / economic-php-client
PHP-SDK to communicate with E-Conomic
Requires
- php: ^8.2
- ext-curl: *
- ext-json: *
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.4
- php-coveralls/php-coveralls: ^2.4
- phpstan/phpstan: ^2.0
- phpunit/phpunit: ^7.0 || ^8.0 || ^9.0
- squizlabs/php_codesniffer: 3.*
- vimeo/psalm: ^5.0 || ^6.0
This package is auto-updated.
Last update: 2026-03-02 14:52:47 UTC
README
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.