invisible-collector / shlink-php-client
A php HTTP+JSON client for shlink
Installs: 17
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 3
pkg:composer/invisible-collector/shlink-php-client
Requires
- php: ~7.2
- ext-json: ^1.6
- guzzlehttp/guzzle: ^6.5
Requires (Dev)
This package is not auto-updated.
Last update: 2025-12-21 11:11:55 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