icanhazstring/foundry-bundle
Symfony bundle that integrates Foundry's PHP object factories into your app, giving you container-aware configuration for building test fixtures and model instances with less boilerplate. Use it to wire foundries as services and keep fixture setup clean and reusable across tests. Ideal for Symfony p...
Architecture fit — framework mismatch remains the headline finding; 0.3.0 does not change it. Despite the brief labeling this a Laravel/PHP package, icanhazstring/foundry-bundle is a Symfony bundle (Bundle subclass + DI compiler passes) built to smooth over friction in zenstruck/foundry. It has no Laravel service provider, no Eloquent integration, and no Facade/Container binding surface that a Laravel application could consume. For a Laravel codebase the architecture fit is effectively zero — there is nothing to register and nothing to boot. Even in a Symfony codebase, the package's value proposition is narrow: it adds config nodes and compiler passes that auto-tag/auto-register Foundry factory services, which is functionality Foundry itself absorbed in later releases.
What 0.3.0 actually is — a rename, not a feature. The release contains exactly two changes: the namespace moved to icanhazstring\FoundryBundle, and the bundle class was renamed to FoundryBundle. There are no new capabilities, no dependency constraint bumps, no PHP/Symfony version widening, no bug fixes, and no security-relevant change. In TPM terms this is a cosmetic refactor packaged as a release, and it is semver-breaking: 0.x permits it, but it breaks every consumer and every existing fork regardless.
Technical risk — still high, with one new category added. Last functional release was 2021-08-26; 0.3.0 arrives after roughly four years of drift and touches only naming. Zero stars and zero dependents remain the signal of an unmaintained, single-author, essentially unexercised artifact. The pre-existing risks stand unchanged:
container compile failure with no upstream fix.PersistentProxyObjectFactory) are almost certainly untested.New risk introduced by 0.3.0 — a hard namespace break with no BC shim. The FQCN change ripples through every place a bundle is referenced by name, and nothing in the notes suggests a class alias, deprecated shim, or upgrade guide was provided:
config/bundles.php registration (FoundryBundle::class) fails to resolve until edited.getContainerExtension() alias / config root name change with the class.icanhazstring\FoundryBundle" — the source namespace is literally omitted. A consumer cannot determine from the release notes what to search-and-replace. That is a documentation-discipline signal consistent with the rest of the evidence.The one charitable read: someone is still at the keyboard, so the project is not formally abandoned. That does not convert into a support commitment, and it does not retire a single item on the risk list.
Key questions for the team:
composer.json directly.)dama/doctrine-test-bundle + native Foundry?Verdict: unchanged — do not adopt; the composite score of 0.1 is consistent with the evidence. 0.3.0 is a breaking rename that resolves nothing on the risk register, so it reinforces rather than softens the recommendation.
Stack fit. Symfony + Doctrine only. If the target application is Laravel, stop here — there is no integration path, and the closest Laravel analog (Pest/PHPUnit + Eloquent model factories + DatabaseTransactions) needs no third-party glue. If the target is Symfony, fit is conditional on version pinning, and 0.3.0 makes the pinning decision more consequential, not less.
Migration path (Symfony, if genuinely needed). Treat this as a bridge to be removed, not a dependency to be adopted:
PassConfig code we own.Handling the 0.3.0 rename. There is no functional reason to take this release. Decide explicitly rather than drifting into it:
| Situation | Recommended action |
|---|---|
| Evaluating fresh (no consumer) | Do not install either version; write the native equivalent |
| Already on a pre-0.3.0 tag in a legacy app | Stay pinned to the existing tag; 0.3.0 buys nothing and costs a rename |
| Maintaining a vendor fork | Do not rebase onto 0.3.0; if you must, budget the FQCN sweep plus a regression run of container compile |
| Forced to take 0.3.0 | If the old namespace ships an alias, add it to autoload.classmap; if not, vendor-patch one in before upgrading |
| Cross-team / multi-repo | Publish the old→new FQCN mapping yourself; the upstream changelog did not |
Compatibility. Expect to fork and re-tag regardless of which version you land on:
| Concern | Action |
|---|---|
| Symfony constraint | Widen to ^5.4|^6|^7 in a vendor fork; re-run container compile |
| PHP constraint | Bump to ^8.1; check for removed dynamic-property / str_contains-era idioms |
| Foundry constraint | Confirm no overlap with Foundry's own bundle; guard with conflict rules |
| Namespace (0.3.0) | Verify the new FQCN against Zenstruck\Foundry for collisions; add alias for the old name if a fork depends on it |
| Autoloading | Re-run composer dump-autoload -o after any rename; stale classmaps are the likely first failure |
Sequencing. Do not sequence this into a migration as a dependency. Sequence it as: (a) spike in a throwaway branch, (b) prove the passes are redundant, (c) write the two-line native replacement, (d) close the spike. Time-box to a day. If a production legacy app truly depends on it, invert: fork → vendor → pin to a commit SHA on the pre-0.3.0 tag → ADR recording that we own it. Add an explicit note in the ADR that upstream has moved namespaces and we have chosen not to follow.
Maintenance. Effectively zero upstream maintenance, now with evidence of directionless churn. Four years of silence followed by a breaking rename — not a version bump, not a dependency widening — tells us the maintainer's attention is on cosmetics while the constraint drift that actually blocks consumers goes unfixed. Zero stars and zero dependents mean no issue triage, no PR review, no dependency bumps. Any ongoing cost is fully transferred to our team. Budget it as "we own a small fork," not "we consume a package."
Support. No community, no documentation beyond the README, no Stack Overflow corpus, no vendor. 0.3.0 makes this marginally worse: the changelog omits the source namespace, so even the one artifact a consumer would consult for upgrade guidance is incomplete. Knowledge is concentrated in one author and whatever source we can read. On-call runbooks must be written by us.
Scaling. Runtime overhead is negligible — compiler passes run once at container build and are then cached, so request-path performance is unaffected. The scaling concern is organizational: every PHP/Symfony upgrade, and now every upstream rename, is a potential container-compile blocker gated on a fork we may have forgotten about.
Failure modes to instrument:
cache:warmup on the target PHP matrix.dama/doctrine-test-bundle.composer audit allowlist review with an explicit owner.Ramp-up. Learning curve for the code itself is low (a bundle plus a few passes is readable in an hour). Ramp-up risk is bus factor, not complexity: no external references, so a new engineer must reverse-engineer intent from source — and after 0.3.0 must also reconstruct the namespace history, since upstream did not document it. Assume half a day of onboarding for whoever inherits the fork, plus an hour for the rename archaeology, and record decisions in an ADR at adoption time.
Bottom line for operations: 0.3.0 is a breaking rename that solves none of the problems that made this package a poor bet, and it adds a migration cost on top. The package remains a permanent, low-frequency, high-severity upgrade tax in exchange for solving a problem current Foundry configurations already solve. The defensible TPM position is to decline it, pin away from 0.3.0 if already entangled, and spend the half-day writing the native equivalent in-house.
How can I help you explore Laravel packages today?