yiisoft/dummy-provider
A small dummy provider package for Yii, useful for testing, prototyping, and demonstrating provider behavior without real integrations.
tests/Support folder in ~20 lines and avoid a third-party dependency entirely.yiisoft/*) package, not Laravel. For a Laravel codebase the direct value is essentially zero; the transferable asset is the null-object provider idiom, which Laravel already approximates via empty service providers, $this->instance() bindings, and container fakes. Frame any adoption proposal as "pattern, not package."composer require trivial utilities.Consider it (or, more accurately, consider its pattern) when all of the following hold:
yiisoft/* and the target code type-hints the framework's provider contract. Outside that ecosystem, the class will not satisfy your container's expected interface without an adapter, at which point writing your own is cheaper.Look elsewhere — i.e., write your own stub — when:
$this->instance(), empty service providers, Mail::fake()-style doubles) or a two-line anonymous class implementing the interface.To executives — recommendation: do not adopt as a dependency; adopt the pattern.
This is a very small, permissively licensed (BSD-3-Clause) Yii utility that provides a deliberate no-op implementation for testing. It carries essentially no runtime risk — it registers nothing and adds no overhead — but also negligible strategic value: 7 GitHub stars, zero dependent projects, and a code surface small enough to reimplement in an afternoon. The correct decision is to standardize the null-object provider idiom in our own test scaffolding and internal package templates, and decline the third-party dependency. Net cost: near zero. Net benefit: cleaner test isolation and fewer brittle mocks in DI-adjacent code. The main caveat for the room: this is a Yii package, not Laravel — for our Laravel services the deliverable is a convention in our engineering guidelines, not a Composer require.
To engineering — the actionable takeaway.
yiisoft/dummy-provider to Laravel services. No compatible contract, no dependents, no maintainer leverage if it breaks.NullProvider (or equivalent) to the shared test-support namespace: implements your provider interface, registers nothing, documented as "safe default for tests and scaffolds." Roughly 20 lines, fully under our control.How can I help you explore Laravel packages today?