- What is micro-module/value-object used for in Laravel?
- It is a lightweight package for creating immutable value objects with built-in validation and type safety in Laravel or plain PHP applications. It helps encapsulate domain concepts such as email addresses or money objects and reduces primitive obsession across your codebase. The package is intentionally small, so expect a thin base class or trait set rather than a full DDD framework.
- How do I install micro-module/value-object with Composer?
- Install it with composer require micro-module/value-object after checking the package's composer.json constraints against your PHP and Laravel versions. Integration is mechanical: you extend a base class or use a trait depending on what ships. Because adoption is low, read the source and run its tests before adding it to production.
- Which PHP and Laravel versions does micro-module/value-object support?
- The package does not publicly document verified PHP or Laravel version support in the provided context, and PHP 8.2, 8.3, and 8.4 compatibility is unverified. Check composer.json and any CI configuration for declared constraints before installing. Treat narrow illuminate/support ranges as a coupling risk if you need the package in a framework-agnostic domain layer.
- How does micro-module/value-object enforce immutability?
- Immutability enforcement is not confirmed in the overview, so audit the source to see whether it uses readonly properties, magic __set guards, or convention only. Pay attention to array and object members, since those can still be mutated by reference even when the value object itself looks immutable. Write conformance tests for mutation and equality behavior before relying on it.
- Does micro-module/value-object support Eloquent casts and JSON serialization?
- Eloquent casting and JSON serialization support are not stated in the package description, so verify whether it implements JsonSerializable, __serialize, or Laravel cast contracts. If casts are missing, you will need custom hydration and dehydration logic in your models and API resources. Round-trip tests through Eloquent and queued jobs are essential because immutable objects often fail silently there.
- Is micro-module/value-object framework-agnostic or tied to Laravel?
- It is unclear from the overview whether the package requires illuminate/support or can run in a pure domain layer. Framework-agnostic behavior is materially better for hexagonal or layered architectures, so inspect composer.json for Laravel dependencies. If it pulls in Laravel components at a narrow version range, isolate it behind your own abstraction.
- How does micro-module/value-object compare to spatie/laravel-data or brick/money?
- This package is much smaller and narrower than spatie/laravel-data or brick/money, and it has very low adoption with zero dependents. Those alternatives offer mature feature sets, documentation, and production usage, while micro-module/value-object may be closer to a thin in-house base class. Compare the actual source size and features before choosing it over a 150-line internal implementation.
- Can I use micro-module/value-object with readonly properties in PHP 8.2+?
- PHP 8.2 readonly classes and properties are a natural fit for immutable value objects, but the package's compatibility is unverified. Check whether it uses readonly internally or relies on older immutability patterns. If you are on PHP 8.2 or newer, a small first-party readonly class may be simpler than adding a low-adoption dependency.
- What tests and static analysis does micro-module/value-object include?
- The provided assessment asks you to check for a test suite, CI, PHPStan or Psalm configuration, and a license file, but does not confirm they exist. Before adoption, run the tests locally and review static-analysis coverage. Missing tests or CI is a correctness risk even though the package has a small security surface.
- Is micro-module/value-object production-ready and actively maintained?
- Signals point to high technical risk: one star, zero dependents, a single recent release in April 2025, and an effective bus factor of one. Recent activity does not prove release cadence or semver discipline, and there is no downstream bug-report trail. Pilot it in one bounded context behind an in-house abstraction, or budget to replace it with first-party code.