Search by

maslosoft / cli-shared

pmaselkowski

Shared CLI application components

2.0.5 2025-02-03 20:38 UTC

README

Cli-shared Logo Maslosoft Cli Shared

Shared CLI application components

Latest Stable Version License

Quick Install

composer require maslosoft/cli-shared

Documentation

Full Cli-shared Documentation

Command Line Shared Components

This library contains commonly used miscellaneous classes mostly useful in PHP command line interface applications.

This includes, but are not limited to:

  • Kind of operating system type helper - whether it is Windows® or Linux
  • Caching configuration file reader
  • Inline logger compatible with PSR Logger Interface
  • PHP data exporter similar to var_export

Requirements

PHP 8.5 or later is required. Symfony Console, Finder, and YAML support versions 7.4 and 8.x. Composer installs the compatible dependencies.

Development

composer install
composer test

Run Composer with PHP 8.5 or later. The test script builds the Codeception actor and runs the unit suite with PHP warnings and deprecations treated as failures.

When upgrading, custom configuration adapters and logger subclasses must match the newly typed method declarations. PhpExporter::export() uses PHP 8.5's #[NoDiscard]: use its returned string, or explicitly discard it with (void).