Weave 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.
mehedimi/laravel-amp-mail
happones/laravel-vue-i18n-generator
jwerd/inertia-table
siberfx/flysystem-wasabi
hollyit/token-replace
ippanelcom/laravel-sdk
adachsoft/changelog-linter
adachsoft/collection
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel