ethsam/symfony-dropzone
Symfony Dropzone Bundle integrates Dropzone.js drag-and-drop uploads into Symfony Forms, with automatic Doctrine entity relationship handling, pre-populated edit forms, image resizing, and configurable single or multiple file modes.
symfony/doctrine-bridge is now a declared dependency. The bundle builds an
EntityType whenever multiple is false, and that class ships with the
bridge. Until now it only worked because doctrine/doctrine-bundle pulls the
bridge in transitively, so a project without it hit a fatal error on that
option alone.__toString(): the widget renders the entity
itself into the hidden field, so the documented example crashed any edit form
holding existing files. The requirement is now stated and the examples fixed.symfony-dropzone:sending, which is the case behind the formDataRaw
proposal in #2.EntityType resolves its choices through a ManagerRegistry, which a mock
cannot stand in for, so this path had never run outside a full application.JSON.parse, so the script
block is a constant. See SECURITY.md. Affects every version up
to 2.0.0 and the original emr-dev/symfony-dropzone.tests/Form/DropzoneWidgetRenderTest.php renders the widget with hostile
values and fails if any of them reaches the script block.maxFilesize option, mapping to Dropzone.js maxFilesize in MiB. Thanks to
[@nicodemuz](https://github.com/nicodemuz) for the proposal in #3.symfony-dropzone:init, symfony-dropzone:sending and
symfony-dropzone:removedfile DOM events, so
applications can extend the widget without overriding the template. This
covers the use case behind #2, appending a value computed in the browser to
the upload, without injecting JavaScript from PHP.SECURITY.md with a reporting channel and the rendering rule the bundle
follows.setAllowedTypes. A value of the wrong type
now raises an exception at form build time instead of being serialised into
the page.', &, < or > are displayed correctly. They used
to be shown as HTML entities, for instance O'Brien.pdf.<span hidden data-dropzone-config>,
next to the form field.#add_property_arrayIdMedia)transform() implementation in DropzoneTransformercomposer.json with all required dependencieslibrary to symfony-bundle.gitattributes for clean Composer installsuse App\Entity\File removed from transformer (broke in non-App namespaces)$options property in transformer (PHP 8.2 deprecation)true/false instead of 1/0)dropzone.php service config#add_property_arrayIdMedia referencesHow can I help you explore Laravel packages today?