A lightweight PHP toolkit for expressive backend/CLI apps. May contain traces of Laravel.
Install the entire toolkit with Composer:
composer require salient/toolkit
Or install only the components you need, e.g. salient/cache, salient/utils and the toolkit's PHPStan extension:
composer require salient/cache salient/utils
composer require --dev salient/phpstan
The Salient toolkit includes the following components, each of which can be installed separately:
Component | Composer package | Provides |
---|---|---|
Cache | salient/cache | A key-value store backed by a SQLite database |
CLI | salient/cli | A service container and command framework for CLI applications |
Collections | salient/collections | Access to collections of values via array-like objects with chainable methods |
Console | salient/console | Terminal output and message logging via an API similar to console in web browsers |
Container | salient/container | A service container with contextual bindings |
Contracts | salient/contracts | Interfaces and abstractions |
Core | salient/core | Reusable classes, traits and services |
Curler | salient/curler | An HTTP client optimised for RESTful API endpoints |
Db | salient/db | Access to databases |
HTTP | salient/http | HTTP message and utility classes |
Iterators | salient/iterators | Iterator classes and traits |
PHPDoc | salient/phpdoc | A PHPDoc extractor and parser |
PHPStan | salient/phpstan1 | PHPStan extensions |
Polyfills | salient/polyfills | Polyfills |
Sli | salient/sli1 | sli , the toolkit's CLI utility |
Sync | salient/sync | A framework and SQLite-backed store for synchronising data with backends |
Testing | salient/testing1 | Classes that are useful in test suites |
Utils | salient/utils | Utility methods via stateless classes |
API documentation for salient/toolkit
tracks the main
branch of
the project's GitHub repository and is generated by ApiGen.
You can build it yourself by running the following commands in the top-level
directory. Output is generated in docs/api
by default.
composer -d tools/apigen install
tools/apigen/vendor/bin/apigen -c tools/apigen/apigen.neon
Other documentation is available under docs, and usage examples are provided in the form of unit tests.
This project is licensed under the MIT License.