swp/menu-bundle
SWP Menu Bundle offers a flexible way to define, organize, and render menus in Symfony applications. Build menu trees in PHP or configuration, integrate with Twig, and handle active states and access control with minimal setup.
What this package actually is. swp/menu-bundle is a read-only subtree split of SuperdeskWebPublisher/SWPMenuBundle, extracted from the Superdesk Web Publisher monorepo. That provenance matters more than the package name: it is a Symfony bundle, not a Laravel package. It ships a Bundle subclass, a DI Extension with a configuration tree, compiler passes, Doctrine ORM entities/repositories, and Symfony event subscribers — all of which assume a Symfony Kernel and a compiled dependency-injection container.
Architecture fit: poor. Laravel has no bundle concept. Laravel's container is not compiled the way Symfony's is, so compiler passes, tagged services, and prepend()/Extension::load() config merging have no native execution path. Wiring this in means either (a) embedding a Symfony micro-container inside Laravel to host the bundle, (b) forking and rewriting the bundle as a Laravel service provider, or (c) lifting the domain model and reimplementing. Options (a) and (b) are multi-week projects whose cost dwarfs the value of a menu tree.
Dependency-constraint blocker (the decisive issue). Last release is 2018-06-11, which places the constraint set in the Symfony 3.4/4.x and PHP 7.1–7.3 era. Current Laravel (10/11/12) pins symfony/* at ^6.2/^7.x and requires PHP 8.1+. Composer will not resolve both trees; installation fails on version conflicts before any code runs. Clearing that requires replace/--ignore-platform-reqs hacks or a fork that bumps every Symfony constraint — and once bumped, the 2018-era code (annotations, deprecated form/event APIs, nullable-typing assumptions) will not run unmodified on PHP 8. Verification step: read the split's composer.json and the parent repo's composer.json at the matching tag before any further work; confirm the symfony/framework-bundle, doctrine/orm, and php constraints.
Technical risk: high.
swp/* packages (menu domain, common utilities, templates system). Expect a transitive fan-out into Superdesk-specific abstractions that are meaningless outside that CMS, plus Doctrine entity mappings and schema assumptions (tree/nested-set columns, ordering fields, publication state) that will not match a Laravel app's schema conventions.Key questions for the team.
kalnoy/nestedset, or a small custom model) dominate on every axis.SWPMenuBundle is materially newer than this 2018 split, in which case the split is simply stale and should not be consumed at all.Recommendation: Do not install. Treat as a reference implementation — mine the domain model (menu → menu items, tree reordering, publication scoping) for requirements and edge cases, implement natively in Laravel.
Stack fit. Laravel + this bundle is a cross-framework integration, not a dependency addition. There is no supported path where composer require swp/menu-bundle results in working code in a Laravel app.
Migration path (if reuse is mandated). Ranked by cost:
Bundle + Extension with a ServiceProvider + published config, convert Doctrine annotation mappings to attributes or Laravel migrations, reimplement compiler-pass logic as explicit bindings. Highest fidelity, highest cost, and you own the fork forever.symfony/dependency-injection standalone) invoked from a Laravel provider. Avoids rewriting the bundle but introduces two containers, two service lifecycles, and duplicated Doctrine management. Rejected unless the bundle is enormous.Compatibility. Expect incompatibility at four layers: PHP (7.x → 8.x), Symfony components (4.x → 6/7.x), Doctrine (annotation driver removed in ORM 3), and Laravel's own conventions (routing, validation, serialization, config). Each is independently blocking.
Sequencing (if pursuing option 3, the realistic path).
composer.json requirements; confirm the Symfony/PHP wall. Document the finding; this decision memo justifies the "no install" call.path-column strategy depending on read/write ratio; API resources for the read path.swp/* at any point — assert this in CI (composer why swp/menu-bundle must be empty).Maintenance. Option 3 (reimplementation) leaves zero third-party surface: the menu model is ordinary Laravel code under normal review, dependency-bot, and static-analysis coverage. Options 1 and 2 create a permanent fork obligation — framework upgrades (Laravel major, PHP minor), security triage on abandoned transitives, and a bus-factor of one unless a second engineer is deliberately onboarded.
Support. There is no support channel. Zero dependents and zero stars mean no community, no Stack Overflow corpus, no issue history to search. Any defect is yours alone. Escalation to upstream is unrealistic for a read-only split of a CMS whose roadmap is driven by its own product.
Scaling. Largely a function of the tree strategy, not the package. A nested-set implementation reads cheaply and writes expensively (reordering touches a subtree of rows); an adjacency list reads recursively. For menu data — read-heavy, small row counts, admin-time writes — either is fine at typical scale. The real scaling caution is the shim option: a second DI container bootstrapped per request adds latency and makes profiling and queue-worker behaviour harder to reason about. Avoid it.
Failure modes to plan for.
swp/* package resolves to an unexpected tag and behaviour changes invisibly. Mitigate by pinning exact versions if any Superdesk code is ever vendored.lft, rgt, root, level, position) conflicting with existing tables. Mitigate by explicit migration ownership.Ramp-up. For a Laravel team, reading this codebase costs 1–2 days (Symfony bundle idioms are unfamiliar but not exotic). Porting costs 3–6 weeks. Reimplementing natively costs under a week including tests. The asymmetry is the whole argument.
Verdict. Score 0 with 0 dependents and a 2018 release is an accurate signal here, not a measurement artefact. Use the package as a design reference; do not take a runtime dependency on it.
How can I help you explore Laravel packages today?