xint0 / samsara-api-php
PHP client for the Samsara API.
Requires
- php: >=8.1
- saloonphp/pagination-plugin: ^2.2
- saloonphp/saloon: ^3.0
- xint0/position-tracking-models: ^0.0.1
Requires (Dev)
README
Samsara API PHP client.
Description
This package provides a client for the Samsara REST API.
Installation
Install using composer:
composer require xint0/samsara-api-php
Usage
Coming soon.
Support
Need help?
- Open an issue: https://gitlab.com/xint0-open-source/samsara-api-php/-/issues
- Join the conversation in discord: https://discord.gg/w7u2hZ39j3
Roadmap
This package is being used to support the development of a commercial TMS. Initially Addresses and Vehicles will be supported.
Contributing
This package is open source, and you are encouraged to contribute by:
- Reporting an issue through any of the following channels:
- Creating a fork of the project and submitting a merge request in https://gitlab.com/xint0-open-source/samsara-api-php/-/merge_requests/new.
Working with the code
The project uses Docker Compose to define containers used for development. Although it is not necessary to use Docker, it makes working with multiple versions of PHP easier.
Docker images
The PHP docker image includes XDebug extension, composer, and phive. It is built from currently supported PHP versions: 8.1, 8.2, 8.3, and 8.4.
The PHPStan docker image includes PHPUnit plugin, and it is built using PHP 8.4.
After forking and cloning the git repository to your local environment, you can execute the following docker compose commands:
Install development tools
The project uses PHPUnit for testing, PHPStan for static analysis, PHPCodeSniffer and PHP Code Beautifier and Fixer for linting. These tools are installed using Phive.
docker compose run --rm php phive install
Execute tests
After installing the development tools, to execute the tests:
docker compose run --rm php tools/phpunit
Authors
This package was created and is maintained by Rogelio Jacinto (@Xint0).
License
This package is open source software licensed under the MIT License.