vistik/typed-collections
A Laravel/PHP package for type-safe collections: enforce element types at runtime, improve IDE and static-analysis support, and keep familiar Collection ergonomics. Define typed collections for models, DTOs, scalars, and custom classes.
Collection that enforces type hints on items. It aligns with Laravel’s collection-centric style but is a micro-library with narrow scope. It may fit legacy Laravel 5.x applications that already rely on Collections; it does not fit modern architectures that favor native type safety, static analysis (e.g., PHPStan/Psalm generics), or maintained dependencies.Illuminate\Support\Collection. A time-boxed compatibility spike is required before any adoption.composer.json constraints, supported PHP versions, and the exact Collection methods overridden. Run the package’s tests (if any) and application tests against the target Laravel/PHP versions. Check for conflicts with other dependencies and composer audit warnings.push/put without checks; divergence across multiple forks; loss of institutional knowledge if the original adopter leaves. Silent failures are possible if type checks are not consistently applied.How can I help you explore Laravel packages today?