- Is mysam/sortable-behavior-bundle compatible with Laravel?
- No. It is a Symfony bundle built around the Symfony kernel, DI extensions, Doctrine and Sonata Admin, and it ships no service provider, facade, Eloquent trait or Blade/Inertia UI. For Laravel you should use spatie/eloquent-sortable or a small in-house position trait instead.
- How do I install pixSortableBehaviorBundle in a Symfony project?
- Require the package with Composer, register the bundle in config/bundles.php (or AppKernel on older Symfony), and enable the Gedmo/Stof Sortable extension with a position column on your entity. You then configure the Sonata Admin sortable field so the up, down and top controls appear. Expect to pin Symfony, Doctrine and Sonata versions that match the package's 2020-era constraints.
- What does this bundle actually do?
- It adds sortable behavior to Doctrine models by persisting an integer position column and exposing move up, move down and move to top actions in Sonata Admin listings. The underlying sorting logic comes from the Gedmo/Stof Sortable extension, and the bundle wires it into the admin UI. It is not a general-purpose PHP reordering library.
- Which Symfony, Sonata Admin and Doctrine versions does it support?
- The last release is dated 2020-10-16, so it targets Symfony 4/5-era wiring, Sonata Admin 3/4 and Doctrine ORM 2.x with stof/doctrine-extensions-bundle. It predates PHP 8.1, 8.2, 8.3, Doctrine 3 and Sonata Admin 5, so Composer constraint conflicts are likely. Check the bundle's composer.json before planning any upgrade.
- Is there a maintained alternative to this fork?
- Yes. Use the canonical upstream Pix pixSortableBehaviorBundle first, since this Software-For-Asset-Management copy has 0 stars, no visible issue triage and no CI signals. For Symfony without Sonata, the Gedmo/Stof Sortable extension alone covers most needs. For Laravel, spatie/eloquent-sortable is the actively maintained, Eloquent-native choice.
- Does it provide drag-and-drop reordering in the admin panel?
- It provides server-rendered move up, move down and move to top controls inside Sonata Admin listings, not a drag-and-drop widget. Real drag-and-drop needs custom JavaScript calling an endpoint, and this bundle ships nothing for Blade, Inertia or a headless API. If you need drag-and-drop within filtered or paginated subsets, you will write that layer yourself.
- Can I use this package with Eloquent models?
- No. The behavior is tied to Doctrine ORM entities and the Gedmo Sortable extension, with no Eloquent trait or query builder integration. Laravel has no bundle or compiler-pass lifecycle, so the package's service registration and admin controllers cannot be reused. Porting it is a rewrite, not an integration.
- Is this package safe and maintained for production use?
- Treat it as unmaintained: last release in 2020, a single maintainer, 0 stars, 0 dependents and no security policy or CVE feed. It runs inside an authenticated, high-privilege admin panel, which raises the cost of an unpatched issue. If you adopt it, fork it, vendor it and assign a permanent owner for patches.
- How would I implement sortable records in Laravel without this bundle?
- Add a nullable, indexed integer position column plus a composite index on the scope columns such as position and category_id or tenant_id. Encapsulate reordering behind a small service with moveTo, moveBefore and moveAfter, using a transaction and SELECT FOR UPDATE on the affected scope before renumbering the window. Expose a single PATCH endpoint that accepts the new index, debounce drag events in the UI, or simply install spatie/eloquent-sortable.
- Why does Composer fail to install this package on PHP 8.2?
- Conflicts usually come from the package's 2020-era constraints on PHP, symfony/*, doctrine/orm and sonata-admin, which exclude PHP 8.1+, Doctrine 3 and Sonata Admin 5. Its dependencies on stof/doctrine-extensions-bundle and the Gedmo Sortable extension must also resolve against your pinned versions. Run composer why-not to identify the blocking constraint, and be prepared to fork and relax it.