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

Arguments Resolver Laravel Package

rybakit/arguments-resolver

Lightweight PHP library that resolves callable arguments via reflection, matching values from arrays or containers to parameter types, names, and defaults. Automatically fills optional parameters and helps build invokers or small DI containers. Works with closures, functions, methods, and invokable...

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature: extensibility / plugin surface. Any roadmap item where customers or internal teams register their own handlers — webhook receivers, automation actions, rules-engine predicates, custom notification channels, import/export transformers — needs to invoke an unknown callable with a known bag of context. This package is the narrow "map context → callable parameters" primitive behind that.
  • Feature: low-code / config-driven execution. If a workflow step is defined as { "handler": "...", "inputs": {...} }, you need name/type-based binding from the inputs map to the handler signature. That is exactly this problem, and it is not the same problem Laravel's container solves.
  • Build vs buy: mostly "borrow," not "buy." Laravel already ships app()->call() / Container::call() plus route model binding, which covers controller, listener, job, and command injection. Adopt this package only for the slice where arguments come from an arbitrary value map rather than the service container — or when a framework-agnostic package must not depend on Laravel.
  • Roadmap risk sizing. At 26 stars and a last release in mid-2021, this is a vendoring decision, not a platform decision. MIT + small surface area means a fork is cheap; treat it as an idea-and-code donation rather than a dependency you inherit a support contract with.
  • Anti-decision it supports: it gives you a defensible "we don't need a DI framework for this" answer when someone proposes pulling in a full container or a reflection-heavy abstraction for one feature.

When to Consider This Package

Consider it when all of the following hold:

  • You are invoking callables whose arguments come from a data map / context object (parsed config, request payload, event context), not from a service container.
  • You need named-parameter and type-based matching with defaults, optional parameters, and variadics handled correctly — hand-rolling this is where bugs live.
  • You are in a framework-agnostic package, or you want the same resolution logic across Laravel and non-Laravel code paths.
  • You value a small, auditable, MIT-licensed dependency you could fork in an afternoon.

Look elsewhere when:

  • The need is ordinary Laravel DI — controllers, jobs, listeners, middleware, policies. Use app()->call(), route model binding, and contextual binding. Adding a package here is pure duplication.
  • You require active maintenance, current PHP support, and security patching. Last release 2021 means unverified behavior on newer PHP versions; assume you own it.
  • You need attribute-driven resolution, tagged/contextual services, or autowiring graphs — that is container territory (Laravel or Symfony).
  • The call path is hot (per-request fan-out, high-throughput event handling). Reflection-based resolution needs benchmarking and a caching layer before it goes anywhere near a tight loop.
  • You need by-reference parameters, union/intersection type disambiguation, or promoted-constructor edge cases — validate these in a spike before committing; do not assume.

How to Pitch It (Stakeholders)

For executives: This is a small, MIT-licensed utility that solves one specific problem — passing the right arguments to a function we didn't write. It unblocks the extensibility story (customer-defined handlers, automation steps) without a platform commitment. The cost is a one-week spike plus a thin internal wrapper; the risk is staleness, not licensing or lock-in, and it is fully mitigated by forking or swapping in Laravel's built-in mechanism. Frame it as "we adopted ~200 lines of proven logic," not "we added a dependency."

For engineering: Wrap it behind our own ArgumentResolver interface from day one, with the Laravel container implementation as the default and this package as the fallback for context-map resolution. The spike must prove: PHP 8 union/intersection types, variadics, default and optional parameters, nullable handling, and named-argument behavior; plus a micro-benchmark of reflection cost with and without caching resolved signatures. If any of those fail, we fork — the license permits it and the surface is small enough to own. Either way, no call site should reference the package directly, so the decision stays reversible.

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.
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels