Introduce Core Value Object System#2
Merged
Conversation
Closed
2 tasks
…semantics Added an abstract `ValueObject` class to the Core module, providing a foundation for identity-less, immutable data structures. Includes methods for structural equality (`equals`), type strictness (`sameAs`), and invariant enforcement (`guard`). This addition establishes a consistent approach to modeling value objects across the FireHub ecosystem.
dieselxxx
reviewed
Jun 19, 2026
dieselxxx
reviewed
Jun 19, 2026
dieselxxx
approved these changes
Jun 19, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🧱 System Design / Architecture Pull Request
Related Issue
Closes Core Value Object System #1
Description
This pull request implements the Core Value Object System, establishing it as the foundational data abstraction layer within the FireHub Core architecture.
The design introduces immutable, identity-less Value Objects as a strict Core contract, ensuring that domain representation is separated from runtime execution concerns. This enforces a clear architectural boundary where Core defines the structure and semantics of data, while Runtime and higher layers are limited to consumption without modification of these contracts.
This architecture is required to provide a consistent, type-safe, and predictable foundation for all subsequent Core-level systems, including Throwable handling, Type representation, and Identifier modeling. It eliminates primitive-driven design and ensures that all higher-level abstractions are built on explicit, strongly-defined value semantics.
The Core layer is directly affected by this change, as it defines the Value Object system itself. Runtime systems will depend on and consume these abstractions but must not extend or redefine them. Adapter and Capability layers remain structurally unaffected, as they operate above the Core contract boundary.
Architecture Overview
System Design
→ Abstract
ValueObjectbase class defines immutable contract and equality rules.→ ValueObject equality contract (class + value comparison)
→ Immutability contract (constructor-only state)
→ Core defines Value Objects
→ Runtime consumes Value Objects only
→ No infrastructure or execution logic inside Core VO layer
→ PHP native types only
→ No dependency on Runtime, Adapter, or external services
Design Decisions
Key architectural decisions made:
Why these decisions were chosen:
Rejected alternatives (if applicable):
System Boundaries
Included
Excluded
Implementation
Core Changes
FireHub\Core\Type\ValueObject(abstract base)Contracts
→
ValueObject(base abstraction)→ None in this PR (handled in Throwable system)
→ Optional internal contracts for future VO extensions
Dependencies
Validation
Architecture Compliance
Build & Stability
Impact Analysis
Core Impact
Runtime Impact
Future Extensions
Risks / Constraints
Risk Level
Potential Risks
→ Early design decisions may require careful evolution before v1.0.0 stabilization
→ Minimal in v0 phase but must be carefully versioned before v1
→ Risk of introducing unnecessary VO complexity too early
Documentation
Checklist
Notes
Technical Notes
Future Work
TypeValue ObjectIdentifierValue ObjectReviewer Guidance