mekras/symfony-bundle-testing
Testing utilities for Symfony bundles: helpers for booting test kernels, configuring services, and writing functional and integration tests around your bundle code. Simplifies PHPUnit setup so you can focus on assertions.
TestContainerBuilder as the single, fluent entry point for configuring Symfony test containers (loading extensions, registering bundles, asserting definitions, controlling locatability and visibility). This gives us a clear target API for standardizing how our teams write integration tests, replacing ad-hoc calls scattered across base test cases.BaseSymfonyIntegrationTestCase methods are now formally deprecated (loadExtension(), registerBundle(), expectServiceExists(), addToLocator(), getFromLocator(), and the $public argument of createContainer()). Each has a named replacement on the builder, so we can size a mechanical, low-risk migration and decide whether to absorb it in one sprint or spread it across the next refactor cycle.createContainer() and createContainerFromFile() now return TestContainerBuilder instead of their prior return type. Code that chains off the return value or type-hints against the old contract is the primary audit surface. This is the one item that can turn a routine bump into a support incident, so it should gate the upgrade decision.Adopt / upgrade when:
createContainer() / createContainerFromFile() and confirm no caller depends on the previous return shape or chains old-style calls onto them.Defer or look elsewhere when:
For executives: A minor dependency release that consolidates our integration-test setup into one well-defined builder class. It is a hygiene upgrade, not a product feature: the value is lower maintenance cost and fewer bespoke test helpers. The risk is contained but non-zero — two container-creation methods changed their return type, and six older methods are deprecated. Recommendation is to schedule the bump with a short audit and migration ticket rather than take it as a blind patch.
For engineering: 0.3.0 adds TestContainerBuilder and moves the canonical way to load extensions, register bundles, assert definitions exist, mark services locatable, and set public visibility onto it. Every deprecated method maps 1:1 to a builder method, so migration is mostly search-and-replace. The action item is verifying nothing depends on the old return values of createContainer() and createContainerFromFile() — those now hand back a TestContainerBuilder, which is actually convenient for chaining but is a contract change. Deprecated methods still work for now; treat them as a burn-down list, and standardize new tests on the builder immediately so the deprecated path stops growing.
How can I help you explore Laravel packages today?