Weave Code
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

Invoke Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Enables safe deserialization of external data (API payloads, config files) into objects by validating parameters against class signatures, eliminating manual validation boilerplate and reducing bugs.
  • Supports build-vs-buy decisions by providing a lightweight, MIT-licensed solution for PHP's lack of native named parameters—avoiding reinvention for a common pain point.
  • Critical for use cases involving dynamic object creation from untrusted inputs (e.g., command handlers, service instantiation from configuration), ensuring consistency and correctness without runtime surprises.

When to Consider This Package

Consider when:

  • Your application processes dynamic inputs (HTTP requests, config files) where object creation requires strict parameter validation.
  • Development velocity and code clarity outweigh microsecond-level performance needs (e.g., request setup, background jobs).
  • Manual array-to-object mapping is error-prone across multiple code paths.

Avoid when:

  • Performance is critical (e.g., high-throughput loops, real-time systems) where 50x slower instantiation would bottleneck throughput.
  • Your stack already has
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.
davejamesmiller/laravel-breadcrumbs
artisanry/parsedown
christhompsontldr/phpsdk
enqueue/dsn
bunny/bunny
enqueue/test
enqueue/null
enqueue/amqp-tools
milesj/emojibase
bower-asset/punycode
bower-asset/inputmask
bower-asset/jquery
bower-asset/yii2-pjax
laravel/nova
spatie/laravel-mailcoach
spatie/laravel-superseeder
laravel/liferaft
nst/json-test-suite
danielmiessler/sec-lists
jackalope/jackalope-transport