NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
Packagist · #4158 most downloaded on Packagist
Symfony SonataMediaBundle
Last release 9 months ago
19 Dec 2025
Release timing varies
gaps range from 8 days to 7 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
14 years old
117 releases · first in 2012
[#1767] Support for deprecated rest routing type in favor for xml (@wbloszyk)
Sonata\MediaBundle\Controller\Api\GalleryController for
sonata.media.controller.api.gallery service
(@wbloszyk)Sonata\MediaBundle\Controller\Api\MediaController for
sonata.media.controller.api.media service
(@wbloszyk)friendsofsymfony/rest-bundle:^3.0
(@wbloszyk)image_too_small error message
(@romainjanvier)twig/string-extra dependency.
(@franmomu)MediaManagerInterface to NoDriverManager
(@core23)ContainerAwareCommand to Command and
inject services instead container (@wbloszyk)truncate filter with u filter.
(@franmomu)One column per quarter.
Added support for symfony/mime:^5.0
symfony/mime:^5.0maxFileSize as a parameter in the validation messageCleanMediaCommandbin/console lint:container command and pass an object of class
NoDriverManager of the expected GalleryManagerInterface interfaceAPI routes config, made them public for the FOSRest routeloader.
Sonata\MediaBundle\Command\DefaultGenerator into Sonata\MediaBundle\Command\IdGeneratorSonata\MediaBundle\Command\ODMGenerator into Sonata\MediaBundle\Command\UuidGeneratorSonata\MediaBundle\Command\PHPCRGenerator into Sonata\MediaBundle\Command\PathGeneratorDeprecations about commands not returning an exit code
Added support for "knplabs/gaufrette:0.9".
sonata.media.metadata.amazon service.SimpleResizer and SquareResizer resizers now use ImagineCompatibleResizerTrait
^1.0 supportSimpleResizer and SquareResizer resizers now use ImagineCompatibleResizerTraitaddResizer method call on the thumbnail service only if the method exists.AmazonMetadataBuilderChanged usages of {% spaceless %} tag, which is deprecated as of Twig 1.38 with {% apply spaceless %} filter;
MediaInterface::setCdnFlushIdentifierbreadcrumb as default context for seo blocks{% spaceless %} tag, which is deprecated as of Twig 1.38
with {% apply spaceless %} filter;{% for .. if .. %}, which is deprecated as of Twig 2.10
with filter filter'.\Twig_ classes without namespace.list_image.html.twig instead of using hardcoded "edit".Sonata\MediaBundle\Admin\GalleryAdminSonata\MediaBundle\Admin\GalleryHasMediaAdminSonata\MediaBundle\Admin\ODM\MediaAdminSonata\MediaBundle\Admin\ORM\MediaAdminSonata\MediaBundle\Admin\PHPCR\GalleryAdminSonata\MediaBundle\Admin\PHPCR\MediaAdminSonata\MediaBundle\Block\Breadcrumb\GalleryIndexBreadcrumbBlockServiceSonata\MediaBundle\Block\Breadcrumb\GalleryViewBreadcrumbBlockServiceSonata\MediaBundle\Block\Breadcrumb\MediaViewBreadcrumbBlockServiceSonata\MediaBundle\Block\FeatureMediaBlockServiceSonata\MediaBundle\Block\GalleryBlockServiceSonata\MediaBundle\Block\GalleryListBlockServiceSonata\MediaBundle\Block\MediaBlockServiceSonata\MediaBundle\CDN\CloudFrontSonata\MediaBundle\CDN\FallbackSonata\MediaBundle\CDN\PantherPortalSonata\MediaBundle\CDN\ServerSonata\MediaBundle\Command\AddMassMediaCommandSonata\MediaBundle\Command\AddMediaCommandSonata\MediaBundle\Command\CleanMediaCommandSonata\MediaBundle\Command\FixMediaContextCommandSonata\MediaBundle\Command\MigrateToJsonTypeCommandSonata\MediaBundle\Command\RefreshMetadataCommandSonata\MediaBundle\Command\RemoveThumbsCommandSonata\MediaBundle\Command\SyncThumbsCommandSonata\MediaBundle\Command\UpdateCdnStatusCommandSonata\MediaBundle\Consumer\CreateThumbnailConsumerSonata\MediaBundle\Controller\Api\GalleryControllerSonata\MediaBundle\Controller\Api\MediaControllerSonata\MediaBundle\Controller\GalleryAdminControllerSonata\MediaBundle\Controller\GalleryControllerSonata\MediaBundle\Controller\MediaAdminControllerSonata\MediaBundle\Controller\MediaControllerSonata\MediaBundle\DependencyInjection\Compiler\AddProviderCompilerPassSonata\MediaBundle\DependencyInjection\Compiler\GlobalVariablesCompilerPassSonata\MediaBundle\DependencyInjection\Compiler\SecurityContextCompilerPassSonata\MediaBundle\DependencyInjection\Compiler\ThumbnailCompilerPassSonata\MediaBundle\DependencyInjection\ConfigurationSonata\MediaBundle\DependencyInjection\SonataMediaExtensionSonata\MediaBundle\Document\GalleryManagerSonata\MediaBundle\Document\MediaManagerSonata\MediaBundle\Entity\GalleryManagerSonata\MediaBundle\Entity\MediaManagerSonata\MediaBundle\Extra\ApiMediaFileSonata\MediaBundle\Extra\PixlrSonata\MediaBundle\Filesystem\LocalSonata\MediaBundle\Filesystem\ReplicateSonata\MediaBundle\Form\DataTransformer\ProviderDataTransformerSonata\MediaBundle\Form\DataTransformer\ServiceProviderDataTransformerSonata\MediaBundle\Form\Type\ApiDoctrineMediaTypeSonata\MediaBundle\Form\Type\ApiGalleryHasMediaTypeSonata\MediaBundle\Form\Type\ApiGalleryTypeSonata\MediaBundle\Form\Type\ApiMediaTypeSonata\MediaBundle\Form\Type\MediaTypeSonata\MediaBundle\Generator\DefaultGeneratorSonata\MediaBundle\Generator\ODMGeneratorSonata\MediaBundle\Generator\PHPCRGeneratorSonata\MediaBundle\Listener\ODM\MediaEventSubscriberSonata\MediaBundle\Listener\ORM\MediaEventSubscriberSonata\MediaBundle\Listener\PHPCR\MediaEventSubscriberSonata\MediaBundle\Metadata\AmazonMetadataBuilderSonata\MediaBundle\Metadata\NoopMetadataBuilderSonata\MediaBundle\Metadata\ProxyMetadataBuilderSonata\MediaBundle\PHPCR\BaseGalleryHasMediaRepositorySonata\MediaBundle\PHPCR\BaseGalleryRepositorySonata\MediaBundle\PHPCR\BaseMediaRepositorySonata\MediaBundle\PHPCR\GalleryManagerSonata\MediaBundle\PHPCR\MediaManagerSonata\MediaBundle\Provider\DailyMotionProviderSonata\MediaBundle\Provider\FileProviderSonata\MediaBundle\Provider\ImageProviderSonata\MediaBundle\Provider\PoolSonata\MediaBundle\Provider\VimeoProviderSonata\MediaBundle\Provider\YouTubeProviderSonata\MediaBundle\Resizer\SimpleResizerSonata\MediaBundle\Resizer\SquareResizerSonata\MediaBundle\Security\ForbiddenDownloadStrategySonata\MediaBundle\Security\PublicDownloadStrategySonata\MediaBundle\Security\RolesDownloadStrategySonata\MediaBundle\Security\SessionDownloadStrategySonata\MediaBundle\Serializer\GallerySerializerHandlerSonata\MediaBundle\Serializer\MediaSerializerHandlerSonata\MediaBundle\SonataMediaBundleSonata\MediaBundle\Thumbnail\ConsumerThumbnailSonata\MediaBundle\Thumbnail\FormatThumbnailSonata\MediaBundle\Thumbnail\LiipImagineThumbnailSonata\MediaBundle\Twig\Extension\FormatterMediaExtensionSonata\MediaBundle\Twig\Extension\MediaExtensionSonata\MediaBundle\Twig\GlobalVariablesSonata\MediaBundle\Twig\Node\MediaNodeSonata\MediaBundle\Twig\Node\PathNodeSonata\MediaBundle\Twig\Node\ThumbnailNodeSonata\MediaBundle\Twig\TokenParser\MediaTokenParserSonata\MediaBundle\Twig\TokenParser\PathTokenParserSonata\MediaBundle\Twig\TokenParser\ThumbnailTokenParserSonata\MediaBundle\Validator\Constraints\ValidMediaFormatSonata\MediaBundle\Validator\FormatValidatorUpdated _controller attribute for routes which were using deprecated syntax.
_controller attribute for routes which were using deprecated syntax.Added compatibility with jms/serializer-bundle:^3.0
jms/serializer-bundle:^3.0resizer_options.$media->getBinaryContent()->getClientSize() return nullreturn type for CategoryManager::find()
CategoryManager::find()setFormTheme when viewing the gallery listAdded configuration option for the media helper to generate a instead of
SimpleResizer::computeBox() will return the size of the resulting image
instead of just the scaled image before the cropping step.nullsetFormTheme when viewing the media listTypeError on media upload when validation fails for another fieldcrash about wrong provider argument type when trying to upload a media
Removed CoreBundle deprecations
Sonata\MediaBundle\Provider\Metadata classMediaProviderInterface::getProviderMetadata return type in PHPDoccrashes on pages with null medias
Fix deprecation for symfony/config 4.2+
Sonata\CoreBundle\Model\BaseEntityManagerMediaManagerInterfaceAdded missing methods to FormatterMediaExtension
FormatterMediaExtensionFix dailymotion regex to extract the video reference from the url.
Prevent incompatible sonata-project/formatter-bundle 4 from being installed
sonata-project/formatter-bundle 4 from being installedS3 Connection without use of credentials (access and secret keys) but with IAM roles (Amazon instances must have been configured with it).
Added getters for allowedExtensions and allowedMimeTypes properties
allowedExtensions and allowedMimeTypes propertiesMake service alias sonata.media.manager.category public
sonata.media.manager.category publicDeprecations from controllers still using deprecated render instead of renderWithExtraParams()
render instead of renderWithExtraParams()A db_driver configuration parameter is optional now with no_driver default value
db_driver configuration parameter is optional now with no_driver default valuesonata:media:sync-thumbnails command when running this command with PHPCR or ODM document mapper.Changed Vimeo endpoint to https
SonataNotificationBundle as a required dependencyadded block title translation domain option
^0.4 and ^0.5^0.16AmazonMetadataBuilder now relies on Psr7 mimeType guessersonata- classes from templates^0.1and ^0.2^0.13Added support for latest imagine version
Added missing SquareResizer::$metadata property
getMockBuilder with createMock where it was possibleAdded automatically adding src format to srcset
Added option to set the img srcset tag by giving it an array of format names.
srcset tag by giving it an array of format names.translationBundle cannot be nullsonata:media:remove-thumbnails command when running this command without arguments.Support for old versions of php and Symfony.
deprecation notices related to addClassesToCompile
'onDelete' => 'CASCADE' for mapping from GalleryHasMedia to Media and GalleryaddClassesToCompileThe Image Provider returns responsive images to the twig media helper.
jms/serializer-bundle ^2.0Psr\Log\LoggerInterface in order to log any exception that could arise from $provider->transform() to get form errors when uploads are too big!.xml.skeleton files of configMediaExtension classReplace missing providers column by providerName on clean command
knplabs/gaufrette v0.3.0providers column by providerName on clean commandOptional dependency to SonataFormatterBundle is now on ^3.2
^3.2AddProviderCompilerPassFixed BlockBundle deprecation messages
getRequest method on controller for BC with Symfony 2.3+MediaAdminControllerBaseAdmin incorrectly retrieved providerNameAdmin/BaseMediaAdmin.phpMediaAdmincascade_validation from GalleryAdminDeprecation warning for addDownloadSecurity
addDownloadSecurityAdded config key to define default resizer
provider and context options are now required$request instead of $this->get('request')Fixed deprecated call of downloadSecurity in Resources/views/MediaAdmin/edit.html.twig template.
getReferenceUrl method for all video providersknplabs/gaufrette ^0.2Pool::getDownloadSecuritydownloadSecurity in Resources/views/MediaAdmin/edit.html.twig template.Deprecated Pool::$downloadSecurities for Pool::$downloadStrategies property
Sonata\MediaBundle\Listener\ORM\MediaEventSubscriber::onClear to clear the rootCategories cache when the EntityManager is clearedregion key to S3Client configalt attribute to thumbnail twig tagSession instead of the whole Container in Security/SessionDownloadStrategySonata\MediaBundle\Listener\ORM\MediaEventSubscriber::onClear now subscribes to onClear too$container property in Security/SessionDownloadStrategyPool::$downloadSecurities for Pool::$downloadStrategies propertyPool::addDownloadSecurity for Pool::addDownloadStrategy methodPool::getDownloadSecurity for Pool::getDownloadStrategy methodApiDoc and QueryParam use statements in Api/GalleryControllersonata-project/block-bundle dependencyApiMediaType::getParent compatibility with Symfony3 formsMediaType::buildForm compatibility with Symfony3 formsMediaType::getParent compatibility with Symfony3 formsBaseVideoProvider::buildEditForm compatibility with Symfony3 formsBaseVideoProvider::buildCreateForm compatibility with Symfony3 formsBaseVideoProvider:: buildMediaType compatibility with Symfony3 formsFileProvider::buildEditForm compatibility with Symfony3 formsFileProvider::buildCreateForm compatibility with Symfony3 formsFileProvider::buildMediaType compatibility with Symfony3 formsAdmin classBaseProvider::$name propertyNothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →