makasim/yadm-bundle
Symfony bundle that integrates the yadm Yandex Direct API client, providing service definitions and configuration for accessing Yandex Direct advertising campaign data from Symfony applications.
Architecture fit. The package is not a Laravel package — it is a Symfony bundle (makasim/yadm-bundle) wrapping makasim/yadm, a lightweight MongoDB document mapper positioned as a faster alternative to Doctrine MongoDB ODM. The bundle provides the Symfony-specific surface: a DI extension, configuration tree, compiler passes, console commands, and (likely) a profiler data collector. The value — "extremely fast persistence and hydration" — lives in the underlying yadm core library, which is framework-agnostic. For a Laravel codebase, the bundle itself is architecturally inert; only the core library is a candidate.
Integration feasibility. Low for the bundle, moderate for the core library.
symfony/framework-bundle, symfony/dependency-injection, and symfony/config to the 3.4/4.x line and PHP to 7.x. A modern Laravel app pulls Symfony 6.x/7.x components transitively, so composer require will either fail resolution outright or require --with-all-dependencies surgery that leaves two incompatible Symfony majors in the tree.yadm library can be instantiated manually (DocumentManager + mapping config + hydrator generation) inside a Laravel service provider, but that is us writing the integration layer that the bundle used to provide.Technical risk. High.
ReflectionParameter::getClass() deprecation, typed property semantics, dynamic property deprecation). Expect fatal errors or silent mis-hydration on 8.1+ until patched. Validate with a spike, do not assume.mongodb/mongodb library and ext-mongodb assumptions predate several driver majors. Some aggregation/session/bulk-write APIs will be unavailable or behave differently.Key questions.
mongodb/mongodb suffice?mongodb/laravel-mongodb (official, maintained) on our real document shapes?Stack fit. Decouple the decision. If the host is Laravel, do not install the bundle; bind the core library behind our own DocumentManager interface in a service provider so the persistence engine is swappable. The default recommendation for a Laravel + MongoDB stack is mongodb/laravel-mongodb (official, actively maintained) or raw mongodb/mongodb with a hand-rolled repository layer; both eliminate the framework-glue and PHP-8 support problems entirely.
Migration path. Treat persistence as an interchangeable adapter from day one:
_id generation strategies, embedded-document ordering assumptions) in the persisted schema.Compatibility. Validate in this order during the spike, on the exact target PHP and MongoDB server versions:
composer require makasim/yadm (not the bundle) resolves cleanly.ext-mongodb and mongodb/mongodb versions align with what the platform team supports.If the bundle is genuinely required (legacy Symfony app), pin the whole Symfony minor line for that service and isolate it — do not let it contaminate shared libraries.
Sequencing.
Decision gate: proceed past step 2 only if the benchmark shows a material (>20–30%) improvement on a workload we actually run. Absent that, the risk is uncompensated.
Maintenance. We become the maintainer. Budget roughly 1–2 engineer-weeks of initial hardening plus ~0.1 FTE ongoing (PHP minor upgrades, dependency bumps, hydration regressions). All patching is manual by definition — there is no upstream to consume. The internal fork should drop the Symfony bundle surface entirely; keeping it multiplies the upgrade cost every time Symfony ships a major.
Support. Effectively none. 7 stars, 0 dependents, no community, no vendor, negligible Stack Overflow coverage, and thin documentation (README-level). Debugging falls entirely to the adopting team, and the fastest diagnostic path is reading library source. Add an explicit knowledge-concentration risk: the maintainer's attention has visibly moved to other projects.
Scaling. The choice of mapper does not change MongoDB's scaling characteristics — sharding, replica sets, and index strategy are unaffected. What it changes is PHP-side cost per document (CPU for hydration, memory per unit of work), which matters for high-volume read APIs and queue consumers. Two caveats: the unit-of-work/identity map retains hydrated objects, so large result sets inflate worker memory and can push long-running consumers toward OOM; and horizontal scaling of PHP workers is unchanged, so the win is density-per-worker, not capacity. Validate on a replica set with production-shaped documents.
Failure modes.
mongodb/mongodb, old symfony/*) with no CVE response path.Ramp-up. A Symfony-fluent engineer needs 2–3 days for yadm's concepts (explicit mapping, unit of work, hydrator generation). A Laravel-only team should plan 1–2 weeks including fork mechanics, plus separate MongoDB schema-design competency. Internal documentation, a mapping cookbook, and a hydration regression suite must be authored — none of it exists upstream.
TPM recommendation. Do not adopt for a Laravel stack; the bundle is structurally inapplicable and the core library is unmaintained and PHP-8-at-risk. Run the two-week benchmark against the official mongodb/laravel-mongodb package first — lean projections on a maintained driver typically capture most of the hydration win with none of the ownership burden. Reserve a yadm PoC for the narrow case of an existing Symfony 3.4/4.x service already depending on it, where the question is migration cost rather than adoption.
How can I help you explore Laravel packages today?