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
Object Factory

Object Factory Laravel Package

wikimedia/object-factory

Wikimedia ObjectFactory builds PHP objects from declarative specifications, mapping class names, constructor arguments, and factory callables to instances. Lightweight, dependency-free, and used by Wikibase and other Wikimedia projects.

View on GitHub
Deep Wiki
Context7

wikimedia/object-factory is a small PHP library for instantiating objects from declarative specifications. Give it an array describing a class name, a factory callable, or an already-constructed object, and it returns the object—handling constructor arguments, post-construction method calls, and validation along the way. It is particularly useful for dependency injection and service wiring in large applications.

  • Accepts class, factory, or object specifications
  • Supports constructor args and post-construction calls
  • Pluggable spec validator for custom requirements
  • Simple getObjectFromSpec() API
  • Lightweight, with no heavy runtime dependencies
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.
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core