Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Immutability

Immutability Laravel Package

repat/immutability

A small PHP package for building immutable objects and value types, helping prevent accidental state changes in Laravel and plain PHP projects. Useful for safer domain models, predictable data, and cleaner code.

View on GitHub
Deep Wiki
Context7

repat/immutability is a lightweight Laravel/PHP package for building genuinely immutable objects. Apply the provided trait to a class and its state becomes locked after construction, so any attempt to modify it later is rejected instead of silently corrupting data your application relies on.

It is a natural fit for DTOs, value objects, and configuration data where accidental mutation causes subtle bugs. The package integrates cleanly with Laravel through package auto-discovery and stays out of the way of your existing code.

  • Trait-based immutability for any PHP class
  • Guard clauses block mutation after construction
  • Ideal for DTOs and value objects
  • Laravel auto-discovery support
  • Simple API with a minimal footprint
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource