dantleech/invoke
Emulate named arguments in PHP: instantiate classes or call methods by mapping associative array keys to parameter names. Validates required/missing/extra keys and type hints, throwing clear exceptions. Useful for deserialization and config loading.
Architecture fit: Poor. Laravel's built-in dependency injection container already handles named parameter resolution via reflection during class instantiation and method invocation. This package duplicates existing functionality without adding value.
Integration feasibility: Low. The package is redundant with Laravel's container, which natively supports resolving constructor and method parameters from arrays (e.g., app()->make(MyClass::class, $params)). Adding it would introduce unnecessary complexity.
Technical risk: High. Performance impact (50x slower than direct instantiation) would degrade application throughput. Low adoption (0 dependents, 5 stars) indicates limited testing and maintenance, increasing risk of undetected bugs. Potential conflicts with Laravel's container behavior.
Key questions:
Stack fit: Incompatible. Laravel's container is optimized for DI and handles named parameter resolution n
How can I help you explore Laravel packages today?