Skip to content

v0.2.0 - PSR-4 Refactor

Latest

Choose a tag to compare

@weise25 weise25 released this 30 Apr 09:48
· 5 commits to main since this release

Breaking Changes

  • SharedStore replaces stdClass — All run(), prep(), post() now expect PocketFlow\SharedStore instead of stdClass
  • Async methods renamed to camelCaserun_async()runAsync(), prep_async()prepAsync(), etc.
  • Namespaces — All classes now in PocketFlow\ namespace. Add use PocketFlow\Node; etc.
  • PSR-4 structure — 14 files instead of the old single PocketFlow.php

Added

  • SharedStore class with #[AllowDynamicProperties] for PHP 8.2+
  • AsyncRunnable interface for mixing sync/async nodes in flows
  • AsyncLogicTrait for reusable async retry logic
  • Agent Skills package (.agents/skills/pocketflow-php/) for AI coding tools
  • New tests for edge cases

Changed

  • $maxRetries and $wait are now readonly constructor properties
  • Exceptions instead of trigger_error() calls
  • Improved PHPDoc documentation on all methods

New Template

Start building instantly: pocketflow-php-template