adachsoft / playbooks-lib
Domain library for playbooks and groups management.
Requires
- php: >=8.3
- adachsoft/collection: ^3.0
- psr/clock: ^1.0
- symfony/yaml: ^7.3
Requires (Dev)
- adachsoft/php-code-style: ^0.7.1
- friendsofphp/php-cs-fixer: ^3.89
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^12.4
- rector/rector: ^2.3
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is not auto-updated.
Last update: 2026-10-20 07:48:35 UTC
README
Playbooks Lib is a PHP domain library for managing groups and Markdown-based playbooks. It provides repository contracts, a JSON-backed group repository, and a Markdown-backed playbook repository with YAML frontmatter support.
Features
- Find, save, delete, and check groups and playbooks through repository interfaces.
- Store groups as JSON and playbooks as Markdown files.
- Read playbook metadata and group associations from YAML frontmatter.
- Inject a PSR-20 clock for consistent timestamp handling.
Installation
composer require adachsoft/playbooks-lib
Integration
Depend on GroupRepositoryInterface and PlaybookRepositoryInterface in application services. Configure the provided file-backed repositories with a Psr\Clock\ClockInterface, a groups JSON file path, a playbooks directory, and a FrontmatterParser. See Basic usage for a complete setup and read example.
Playbook files use YAML frontmatter for fields such as id, name, description, timestamps, and group IDs, followed by the Markdown content.