Skip to content

chore: allow current test tooling so the suite can run again - #57

Merged
lam0819 merged 1 commit into
mainfrom
chore/modernise-tooling-and-1.0
Sep 12, 2026
Merged

chore: allow current test tooling so the suite can run again#57
lam0819 merged 1 commit into
mainfrom
chore/modernise-tooling-and-1.0

Conversation

@lam0819

@lam0819 lam0819 commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

composer update fails on this package today: the dev requirements pin Pest 2 / PHPUnit 10, and on PHP 8.4+ paratest requires PHPUnit 12. The suite could not be run at all on a current PHP.

Widening the three test packages to accept their current majors fixes it. No source or test changes were needed.

Verified on PHP 8.5 with Pest 4 / PHPUnit 12:

116 tests passed (277 assertions)
phpstan            no errors
pint --test        clean

Why now

workflow-engine-laravel requires this package as dev-main || ^0.0.3-alpha. It can't ship a stable 1.0.0 while its core dependency is an alpha, so this is the first step of getting that release out — being able to run the tests is the prerequisite for tagging anything.

🤖 Generated with Claude Code

The dev requirements pinned Pest 2 and PHPUnit 10, which cannot be
installed on PHP 8.4 or 8.5: paratest needs PHPUnit 12 there, and the
constraint forbids it. `composer update` failed outright, so the suite
could not be run at all on a current PHP.

Widening the three test packages to accept their current majors fixes it.
No source or test changes were needed.

Verified on PHP 8.5 with Pest 4 and PHPUnit 12: 116 tests pass, PHPStan
reports no errors, Pint is clean.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@lam0819
lam0819 merged commit 6e42afa into main Sep 12, 2026
5 checks passed
@lam0819
lam0819 deleted the chore/modernise-tooling-and-1.0 branch September 12, 2026 01:54
lam0819 added a commit that referenced this pull request Sep 12, 2026
Now installable there since #57 widened the dev tooling constraints. The
library accepts php: ^8.3, which admits 8.5, so it should be tested there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
lam0819 added a commit that referenced this pull request Sep 12, 2026
* fix: correct silent-success defects and prepare the v0.1.0 release

Several paths let the engine do the wrong thing and still report success,
which nothing in the suite or a user's logs would have caught.

Fixed:
- Compound conditions took the wrong branch. ConditionEvaluator had no
  && / || support but swallowed the operator into the right-hand side and
  string-compared, so 'order.total > 1000 && order.vip === true' was true
  for a 500 dollar order. Boolean operators, parentheses and negated
  groups are now supported; a malformed expression throws instead of
  collapsing to a boolean.
- resume() on a failed workflow threw "Cannot transition from 'failed' to
  'failed'" from inside the failure handler, destroying the original
  cause. FAILED -> RUNNING is now legal, resume retries the failed step,
  and the handler can no longer mask the real error.
- Multi-root workflows executed one root and still reported COMPLETED.
- Steps reachable only from each other are rejected at parse time.
- Relational comparisons against a missing key are false (null coerces
  to 0, so 'missing.key < 1000' used to be true).
- start() threw instead of overwriting an existing instance.
- Workflows blocked on unmet prerequisites park in WAITING.
- DelayAction honours the documented minutes/hours keys.
- HttpAction reports missing ext-curl as a step failure.

Breaking (pre-1.0, each with a migration note in CHANGELOG.md):
- EmailAction -> FakeEmailAction; it never sent mail but reported
  'status' => 'sent'. Payload is now 'sent' => false, 'mock' => true.
- WorkflowBuilder::email() -> fakeEmail().
- ConditionAction drops the non-functional on_true/on_false and uses the
  shared condition grammar instead of its own '=' / 'is' parser.
- FAILED is no longer terminal.

Added:
- Storage\InMemoryStorage now ships with the package; previously the only
  adapter lived in tests/ so the library could not run out of the box.
- CI runs on pull requests, not just pushes.
- SECURITY.md; corrected README action table and attribute examples.
- Regression tests for every issue above (116 -> 161 tests).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

* ci: add PHP 8.5 to the test matrix

Now installable there since #57 widened the dev tooling constraints. The
library accepts php: ^8.3, which admits 8.5, so it should be tested there.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant