Skip to content

fix: use Exporter::export(...) instead of $this->export() in IsOk and IsErr#18

Merged
joelbutcher merged 1 commit intomainfrom
fix/use-static-phpunit-exporter
Apr 17, 2026
Merged

fix: use Exporter::export(...) instead of $this->export() in IsOk and IsErr#18
joelbutcher merged 1 commit intomainfrom
fix/use-static-phpunit-exporter

Conversation

@joelbutcher
Copy link
Copy Markdown
Collaborator

@joelbutcher joelbutcher commented Apr 17, 2026

In later versions of PHPUnit (v11, v12 and v13) Constraint:: exporter() has been removed, meaning calling $this->assertOk(...) or $this->assertErr(...) will fail with the following message:

> Call to undefined method Superscript\Monads\Result\Testing\IsOk::exporter

> Call to undefined method Superscript\Monads\Result\Testing\IsErr::exporter

In v11, 12 and 13 the Constraint base classes implementation of failureDescription() uses Exporter::export(...) instead. This PR updates the override in IsOk and IsErr constraint classes to follow the same pattern.

@joelbutcher joelbutcher merged commit 04c2a83 into main Apr 17, 2026
4 checks passed
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