laravel/symfony-components or spatie/symfony).symfony/form, symfony/ux). Requires:
CollectionType with UxCollectionType, requiring minimal changes to existing form logic.controllers.json (Encore) or AssetMapper could break styling.prototype_name to avoid conflicts.position_selector or disabled sorting.LiveCollectionType instead).ux-collection events?position_selector?symfony/form).composer require arkounay/ux-collection symfony/ux-stimulus-bundle symfony/webpack-encore-bundle
npm install @hotwired/stimulus @arkounay/ux-collection
StimulusBundle and register it in config/bundles.php.CollectionType:
UxCollectionType (e.g., ->add('items', UxCollectionType::class, [...])).CollectionType to UxCollectionType (e.g., allow_add, allow_drag_and_drop).controllers.json for asset auto-import (Bootstrap 5 or custom CSS).CollectionType with enhanced UX.position_selector or disable sorting for VichUploaderBundle.min, max constraints).CollectionType in critical forms (start with non-critical paths).ux-collection:change) can be logged for troubleshooting.| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Stimulus bundle not loaded | Collection UI broken | Fallback to static CollectionType + JS polyfill. |
| Webpack Encore/AssetMapper misconfig | CSS/JS not loaded | Verify controllers.json and rebuild assets. |
| Drag-and-drop conflicts | Items not sortable | Disable drag-and-drop or adjust drag_and_drop_filter. |
| File uploads with sorting | Uploaded files lost on submit | Use position_selector or disable sorting. |
| Custom Stimulus controller errors | Events not firing | Check browser console for Stimulus errors. |
| Bootstrap 5 CSS conflicts | Styling issues | Override CSS or use style-when-not-using-bootstrap-5.css. |
How can I help you explore Laravel packages today?