-
-
Notifications
You must be signed in to change notification settings - Fork 495
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
15 changed files
with
106 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
src/Messenger/BackwardCompatibleMessageHandlerInterface.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/* | ||
* This file is part of the Sonata Project package. | ||
* | ||
* (c) Thomas Rabaix <[email protected]> | ||
* | ||
* For the full copyright and license information, please view the LICENSE | ||
* file that was distributed with this source code. | ||
*/ | ||
|
||
namespace Sonata\MediaBundle\Messenger; | ||
|
||
use Symfony\Component\Messenger\Handler\MessageHandlerInterface; | ||
|
||
// `Symfony\Component\Messenger\Handler\MessageHandlerInterface` was removed in "symfony/messenger" 7. | ||
// @todo: Remove this interface when dropping support for "symfony/messenger" < 7. | ||
/** @psalm-suppress UndefinedClass */ | ||
if (interface_exists(MessageHandlerInterface::class)) { | ||
class_alias(MessageHandlerInterface::class, __NAMESPACE__.'\BackwardCompatibleMessageHandlerInterface'); | ||
} else { | ||
/** | ||
* @internal | ||
* | ||
* @psalm-suppress UnrecognizedStatement | ||
*/ | ||
interface BackwardCompatibleMessageHandlerInterface | ||
{ | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,15 +16,16 @@ | |
use Sonata\MediaBundle\Model\MediaManagerInterface; | ||
use Sonata\MediaBundle\Provider\Pool; | ||
use Sonata\MediaBundle\Thumbnail\GenerableThumbnailInterface; | ||
use Symfony\Component\Messenger\Attribute\AsMessageHandler; | ||
use Symfony\Component\Messenger\Exception\UnrecoverableMessageHandlingException; | ||
use Symfony\Component\Messenger\Handler\MessageHandlerInterface; | ||
|
||
/** | ||
* @author Jordi Sala Morales <[email protected]> | ||
* | ||
* @psalm-suppress DeprecatedInterface | ||
* NEXT_MAJOR: Stop implementing `BackwardCompatibleMessageHandlerInterface`. | ||
*/ | ||
final class GenerateThumbnailsHandler implements MessageHandlerInterface | ||
#[AsMessageHandler] | ||
final class GenerateThumbnailsHandler implements BackwardCompatibleMessageHandlerInterface | ||
{ | ||
public function __construct( | ||
private GenerableThumbnailInterface $thumbnail, | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.