Skip to content

Commit

Permalink
3.34 (#2147)
Browse files Browse the repository at this point in the history
  • Loading branch information
VincentLanglet authored Oct 5, 2021
1 parent 121f872 commit 21b198a
Show file tree
Hide file tree
Showing 29 changed files with 55 additions and 37 deletions.
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [3.34.0](https://github.com/sonata-project/SonataMediaBundle/compare/3.33.1...3.34.0) - 2021-10-05
### Added
- [[#2145](https://github.com/sonata-project/SonataMediaBundle/pull/2145)] Added twig functions to load medias, thumbnails or paths ([@jordisala1991](https://github.com/jordisala1991))
- [[#2138](https://github.com/sonata-project/SonataMediaBundle/pull/2138)] Added new Action to download medias ([@jordisala1991](https://github.com/jordisala1991))
- [[#2131](https://github.com/sonata-project/SonataMediaBundle/pull/2131)] Added optional integration with Symfony messenger to handle async thumbnail generation ([@jordisala1991](https://github.com/jordisala1991))

### Deprecated
- [[#2145](https://github.com/sonata-project/SonataMediaBundle/pull/2145)] Deprecated using twig tags to load media, thumbnails or paths ([@jordisala1991](https://github.com/jordisala1991))
- [[#2138](https://github.com/sonata-project/SonataMediaBundle/pull/2138)] Deprecated download medias through `MediaController` downloadAction. ([@jordisala1991](https://github.com/jordisala1991))
- [[#2139](https://github.com/sonata-project/SonataMediaBundle/pull/2139)] Deprecated SonataNotificationBundle integration. Use Symfony Messenger integration instead. ([@jordisala1991](https://github.com/jordisala1991))
- [[#2118](https://github.com/sonata-project/SonataMediaBundle/pull/2118)] Deprecated ReST API with FOSRest, Nelmio Api Docs and JMS Serializer. ([@jordisala1991](https://github.com/jordisala1991))
- [[#2113](https://github.com/sonata-project/SonataMediaBundle/pull/2113)] Deprecated Pixlr integration. ([@jordisala1991](https://github.com/jordisala1991))
- [[#2105](https://github.com/sonata-project/SonataMediaBundle/pull/2105)] Deprecate controller actions for showing media and galleries. ([@jordisala1991](https://github.com/jordisala1991))
- [[#2105](https://github.com/sonata-project/SonataMediaBundle/pull/2105)] Deprecate breadcrumb classes. ([@jordisala1991](https://github.com/jordisala1991))

### Fixed
- [[#2116](https://github.com/sonata-project/SonataMediaBundle/pull/2116)] Fixed deprecation when downloading media through `downloadAction()` ([@jordisala1991](https://github.com/jordisala1991))

## [3.33.1](https://github.com/sonata-project/SonataMediaBundle/compare/3.33.0...3.33.1) - 2021-09-10
### Fixed
- [[#2101](https://github.com/sonata-project/SonataMediaBundle/pull/2101)] Fixed missing upload after submit of MediaType field ([@jordisala1991](https://github.com/jordisala1991))
Expand Down
4 changes: 2 additions & 2 deletions UPGRADE-3.x.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
UPGRADE 3.x
===========

UPGRADE FROM 3.x to 3.x
=======================
UPGRADE FROM 3.33 to 3.34
=========================

### Deprecated custom Twig tags in favour of Twig functions

Expand Down
2 changes: 1 addition & 1 deletion src/Block/Breadcrumb/BaseGalleryBreadcrumbBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
*
* @author Sylvain Deloux <[email protected]>
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
abstract class BaseGalleryBreadcrumbBlockService extends BaseBreadcrumbMenuBlockService
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
*
* @author Sylvain Deloux <[email protected]>
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
class GalleryIndexBreadcrumbBlockService extends BaseGalleryBreadcrumbBlockService
{
Expand Down
2 changes: 1 addition & 1 deletion src/Block/Breadcrumb/GalleryViewBreadcrumbBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @author Sylvain Deloux <[email protected]>
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
class GalleryViewBreadcrumbBlockService extends BaseGalleryBreadcrumbBlockService
{
Expand Down
2 changes: 1 addition & 1 deletion src/Block/Breadcrumb/MediaViewBreadcrumbBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
*
* @author Sylvain Deloux <[email protected]>
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
class MediaViewBreadcrumbBlockService extends BaseGalleryBreadcrumbBlockService
{
Expand Down
2 changes: 1 addition & 1 deletion src/Consumer/CreateThumbnailConsumer.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
/**
* NEXT_MAJOR: remove this file.
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
class CreateThumbnailConsumer implements ConsumerInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Api/GalleryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
*
* @author Hugo Briand <[email protected]>
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
class GalleryController
{
Expand Down
2 changes: 1 addition & 1 deletion src/Controller/Api/MediaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
*
* @author Hugo Briand <[email protected]>
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
class MediaController
{
Expand Down
8 changes: 4 additions & 4 deletions src/Controller/GalleryController.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ class GalleryController extends Controller
*
* @return Response
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
public function indexAction()
{
@trigger_error(
'The '.__METHOD__.' method is deprecated since 3.x, to be removed in 4.0.',
'The '.__METHOD__.' method is deprecated since 3.34, to be removed in 4.0.',
\E_USER_DEPRECATED
);

Expand All @@ -54,12 +54,12 @@ public function indexAction()
*
* @return Response
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
public function viewAction($id)
{
@trigger_error(
'The '.__METHOD__.' method is deprecated since 3.x, to be removed in 4.0.',
'The '.__METHOD__.' method is deprecated since 3.34, to be removed in 4.0.',
\E_USER_DEPRECATED
);

Expand Down
8 changes: 4 additions & 4 deletions src/Controller/MediaController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
/**
* NEXT_MAJOR: Remove this class.
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
class MediaController extends Controller
{
Expand Down Expand Up @@ -57,7 +57,7 @@ public function getMedia($id)
*
* @return Response
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
public function downloadAction($id, $format = MediaProviderInterface::FORMAT_REFERENCE)
{
Expand All @@ -79,12 +79,12 @@ public function downloadAction($id, $format = MediaProviderInterface::FORMAT_REF
*
* @return Response
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
public function viewAction($id, $format = MediaProviderInterface::FORMAT_REFERENCE)
{
@trigger_error(
'The '.__METHOD__.' method is deprecated since 3.x, to be removed in 4.0.',
'The '.__METHOD__.' method is deprecated since 3.34, to be removed in 4.0.',
\E_USER_DEPRECATED
);

Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ private function addExtraSection(ArrayNodeDefinition $node): void
->arrayNode('pixlr')
->setDeprecated(...$this->getBackwardCompatibleArgumentsForSetDeprecated(
'The node "%node%" is deprecated and will be removed in version 4.0.',
'3.x'
'3.34'
))
->info('More info at https://pixlr.com/')
->addDefaultsIfNotSet()
Expand Down
2 changes: 1 addition & 1 deletion src/Document/GalleryManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public function update(GalleryInterface $gallery)
/**
* NEXT_MAJOR: remove this method.
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
public function getPager(array $criteria, $page, $limit = 10, array $sort = [])
{
Expand Down
2 changes: 1 addition & 1 deletion src/Document/MediaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public function save($entity, $andFlush = true)
/**
* NEXT_MAJOR: remove this method.
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
public function getPager(array $criteria, $page, $limit = 10, array $sort = [])
{
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/GalleryManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public function update(GalleryInterface $gallery)
/**
* NEXT_MAJOR: remove this method.
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
public function getPager(array $criteria, $page, $limit = 10, array $sort = [])
{
Expand Down
2 changes: 1 addition & 1 deletion src/Entity/MediaManager.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function save($entity, $andFlush = true)
/**
* NEXT_MAJOR: remove this method.
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
public function getPager(array $criteria, $page, $limit = 10, array $sort = [])
{
Expand Down
2 changes: 1 addition & 1 deletion src/Extra/ApiMediaFile.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* NEXT_MAJOR: Remove this file.
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
class ApiMediaFile extends File
{
Expand Down
2 changes: 1 addition & 1 deletion src/Extra/Pixlr.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
*
* @final since sonata-project/media-bundle 3.21.0
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
class Pixlr
{
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Type/ApiDoctrineMediaType.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* NEXT_MAJOR: Remove this file.
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
class ApiDoctrineMediaType extends BaseDoctrineORMSerializationType
{
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Type/ApiGalleryHasMediaType.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* NEXT_MAJOR: Remove this file.
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
class ApiGalleryHasMediaType extends BaseDoctrineORMSerializationType
{
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Type/ApiGalleryType.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
/**
* NEXT_MAJOR: Remove this file.
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
class ApiGalleryType extends BaseDoctrineORMSerializationType
{
Expand Down
2 changes: 1 addition & 1 deletion src/Form/Type/ApiMediaType.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
*
* @author Hugo Briand <[email protected]>
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
class ApiMediaType extends AbstractType implements LoggerAwareInterface
{
Expand Down
2 changes: 1 addition & 1 deletion src/Resources/views/Extra/pixlr_editor.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ file that was distributed with this source code.
#}

{% deprecated 'The "pixlr_editor.html.twig" template is deprecated since sonata-project/media-bundle 3.x' %}
{% deprecated 'The "pixlr_editor.html.twig" template is deprecated since sonata-project/media-bundle 3.34' %}

{% extends "@SonataAdmin/empty_layout.html.twig" %}

Expand Down
2 changes: 1 addition & 1 deletion src/Resources/views/Extra/pixlr_exit.html.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ file that was distributed with this source code.
#}

{% deprecated 'The "pixlr_exit.html.twig" template is deprecated since sonata-project/media-bundle 3.x' %}
{% deprecated 'The "pixlr_exit.html.twig" template is deprecated since sonata-project/media-bundle 3.34' %}

<!DOCTYPE html>
<html class="no-js">
Expand Down
2 changes: 1 addition & 1 deletion src/Serializer/GallerySerializerHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
* @author Sylvain Deloux <[email protected]>
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
class GallerySerializerHandler extends BaseSerializerHandler
{
Expand Down
2 changes: 1 addition & 1 deletion src/Serializer/MediaSerializerHandler.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
*
* @author Sylvain Deloux <[email protected]>
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
class MediaSerializerHandler extends BaseSerializerHandler
{
Expand Down
2 changes: 1 addition & 1 deletion src/Thumbnail/ConsumerThumbnail.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
/**
* NEXT_MAJOR: remove this file.
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
class ConsumerThumbnail implements ThumbnailInterface
{
Expand Down
6 changes: 3 additions & 3 deletions src/Twig/Extension/MediaExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ public function initRuntime(Environment $environment)
public function media($media, $format, $options = [])
{
@trigger_error(
'Render media through media twig tag is deprecated since sonata-project/media-bundle 3.x and will be removed'
'Render media through media twig tag is deprecated since sonata-project/media-bundle 3.34 and will be removed'
.' in version 4.0. Use "sonata_media()" twig function instead.',
\E_USER_DEPRECATED
);
Expand All @@ -126,7 +126,7 @@ public function media($media, $format, $options = [])
public function thumbnail($media, $format, $options = [])
{
@trigger_error(
'Render media through thumbnail twig tag is deprecated since sonata-project/media-bundle 3.x and will be removed'
'Render media through thumbnail twig tag is deprecated since sonata-project/media-bundle 3.34 and will be removed'
.' in version 4.0. Use "sonata_thumbnail()" twig function instead.',
\E_USER_DEPRECATED
);
Expand Down Expand Up @@ -165,7 +165,7 @@ public function render($template, array $parameters = [])
public function path($media, $format)
{
@trigger_error(
'Render media through path twig tag is deprecated since sonata-project/media-bundle 3.x and will be removed'
'Render media through path twig tag is deprecated since sonata-project/media-bundle 3.34 and will be removed'
.' in version 4.0. Use "sonata_path()" twig function instead.',
\E_USER_DEPRECATED
);
Expand Down
2 changes: 1 addition & 1 deletion src/Twig/GlobalVariables.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct(ContainerInterface $container)
*
* @return Pixlr|bool
*
* @deprecated since sonata-project/media-bundle 3.x, to be removed in 4.0.
* @deprecated since sonata-project/media-bundle 3.34, to be removed in 4.0.
*/
public function getPixlr()
{
Expand Down

0 comments on commit 21b198a

Please sign in to comment.