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.
milito/query-filter
apiboxsym/user-bundle
apiboxsym/health-check-bundle
jayeshmepani/jpl-moshier-ephemeris-php
elnasnato/laraliveui
labrodev/rest-sdk
sampaui/sampaui
babelqueue/php-sdk
facebook/capi-param-builder-php
babelqueue/symfony
hamzi/corewatch
minionfactory/raw-hydrator
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours