matthiasnoback/phpunit-test-service-container
Adopt When:
Look Elsewhere If:
createApplication()) → May already cover your needs.Testing facade) over third-party containers.Mockery or PestPHP.For Executives: "This package cuts test setup time by 30%+ by centralizing dependency injection for PHPUnit tests. It’s a lightweight, MIT-licensed tool that aligns with our Laravel stack, reducing flakiness in CI/CD and accelerating TDD. Think of it as ‘dependency injection for tests’—no reinventing the wheel, just faster, more reliable test suites."
For Engineers: *"We’re adopting this to replace manual DI setup in tests with a Pimple-based container that:
new DatabaseConnection() in every test).DatabaseProvider, ApiClientProvider).Example: Instead of this:
$client = new ApiClient(new HttpAdapter());
Use this:
$client = $this->container->get('api.client'); // Configured once in a provider.
Proposal: Pilot in the UserService test suite to measure setup time savings."*
How can I help you explore Laravel packages today?