invisible-collector / shlink-php-client
A php HTTP+JSON client for shlink
v0.1
2020-01-10 16:53 UTC
Requires
- php: ~7.2
- ext-json: ^1.6
- guzzlehttp/guzzle: ^6.5
Requires (Dev)
This package is not auto-updated.
Last update: 2025-07-06 08:34:11 UTC
README
A HTTP+JSON client for shlink.
Checkout the package on composer.
To install this library run:
composer require invisible-collector/shlink-php-client:dev-master
Instructions
Dev
This repository uses the PSR-2 style guide.
Setup
Install dependencies:
sudo apt-get install php7.2-{xml,mbstring,json}
composer install
Linter
Run linter:
php -l . # will check
./vendor/bin/phpcs --standard=PSR2 src
Automatically fix lint problems:
./vendor/bin/phpcbf --standard=PSR2 src
Documentation
Setup:
composer global require jms/serializer:1.7.*
composer global require phpdocumentor/phpdocumentor:^2.9
Generate documentation:
~/.config/composer/vendor/bin/phpdoc -d ./src -t ./docs
Tests
Running tests:
docker-compose up # in another window SHLINK_HOST=localhost:8080 SHLINK_API_KEY=$(cat ci/api_key.txt) ./vendor/bin/phpunit --bootstrap vendor/autoload.php tests
Examples
Checkout the examples folder for examples on how to use the client.
Notes
Check out the ci docker images readme