solvebeam / github-actions-toolkit-php
PHP toolkit for developing GitHub Actions.
Package info
github.com/solvebeam/github-actions-toolkit-php
pkg:composer/solvebeam/github-actions-toolkit-php
dev-main
2026-10-11 21:32 UTC
Requires
- php: ^8.3
Requires (Dev)
- phpstan/extension-installer: ^1.4
- phpstan/phpstan: ^2.2
- pronamic/wp-coding-standards: ^2.5
- rector/rector: ^2.6
Suggests
None
Provides
None
Conflicts
None
Replaces
None
This package is auto-updated.
Last update: 2026-10-11 21:32:57 UTC
README
PHP toolkit for developing GitHub Actions, inspired by the GitHub Actions Toolkit.
Requirements
- PHP 8.3+
- Composer
Installation
composer require solvebeam/github-actions-toolkit-php
Usage
use SolveBeam\GitHubActionsToolkit\Core; $core = new Core(); $core->start_group( 'Install dependencies' ); // … $core->end_group();
Styling output
use SolveBeam\GitHubActionsToolkit\Style; $style = new Style(); echo $style->bold( 'Bold' ), PHP_EOL; echo $style->italic( 'Italic' ), PHP_EOL; echo $style->underlined( 'Underlined' ), PHP_EOL; echo $style->cyan( 'Cyan' ), PHP_EOL; echo $style->command( 'composer install' ), PHP_EOL;
Running commands
use SolveBeam\GitHubActionsToolkit\Core; use SolveBeam\GitHubActionsToolkit\Shell; $core = new Core(); $shell = new Shell(); try { $shell->must_run( 'composer install --no-dev' ); $has_changes = 0 !== $shell->run( 'git diff --quiet' ); } catch ( RuntimeException $e ) { $core->set_failed( $e->getMessage() ); }
run() prints and executes the command and returns the result code. must_run() does the same, but throws a RuntimeException if the result code is not 0.
Development
composer install composer run phpcs composer run phpstan composer run rector
License
MIT