cline/monad

Rust-aligned Option, Result, and Either monads for type-safe error handling in PHP

Installs: 0

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 0

Forks: 0

Open Issues: 0

pkg:composer/cline/monad

1.1.0 2025-10-06 15:07 UTC

This package is auto-updated.

Last update: 2025-10-11 02:18:15 UTC


README

GitHub Workflow Status Latest Version on Packagist Software License Total Downloads

This package provides a Rust-aligned Option, Result, and Either types providing expressive, type-safe error handling and ergonomic controller helpers for Laravel applications.

Requirements

Requires PHP 8.4+

Installation

composer require cline/monad

Documentation

  • Option Guide - Complete guide with real-world examples for null-safe operations
  • Result Guide - Comprehensive error handling patterns with Ok/Err semantics
  • Either Guide - Advanced Left/Right branching for complex scenarios
  • Transpose Guide - Swapping nested monads (Option ↔ Result)
  • Quick Reference - API overview and highlights

Change log

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING and CODE_OF_CONDUCT for details.

Security

If you discover any security related issues, please use the GitHub security reporting form rather than the issue queue.

Credits

License

The MIT License. Please see License File for more information.