Skip to content
This repository has been archived by the owner on Jul 28, 2022. It is now read-only.

Commit

Permalink
Merge 3d10b94 into 52dd3cb
Browse files Browse the repository at this point in the history
  • Loading branch information
wbloszyk committed Jun 8, 2020
2 parents 52dd3cb + 3d10b94 commit 6e9df70
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions composer.json
Expand Up @@ -24,9 +24,9 @@
"php": "^7.1",
"doctrine/doctrine-bundle": "^1.12 || ^2.0",
"doctrine/persistence": "^1.3",
"sonata-project/core-bundle": "^3.9",
"sonata-project/datagrid-bundle": "^2.5",
"sonata-project/doctrine-extensions": "^1.5",
"sonata-project/form-extensions": "^0.1 || ^1.4",
"symfony/config": "^4.4",
"symfony/console": "^4.4",
"symfony/dependency-injection": "^4.4",
Expand All @@ -48,7 +48,7 @@
"enqueue/amqp-lib": "^0.8",
"friendsofsymfony/rest-bundle": "^2.1",
"guzzlehttp/guzzle": "^3.8",
"jms/serializer-bundle": "^1.0 || ^2.0",
"jms/serializer-bundle": "^2.0 || ^3.0",
"liip/monitor-bundle": "^2.0",
"nelmio/api-doc-bundle": "^2.4",
"sonata-project/doctrine-orm-admin-bundle": "^3.4",
Expand Down
13 changes: 8 additions & 5 deletions src/Exception/InvalidParameterException.php
Expand Up @@ -15,9 +15,12 @@

use Sonata\CoreBundle\Exception\InvalidParameterException as CoreBundleException;

/**
* @deprecated Use Sonata\CoreBundle\Exception\InvalidParameterException instead
*/
class InvalidParameterException extends CoreBundleException
{
if (class_exists(CoreBundleException::class)) {
class InvalidParameterException extends CoreBundleException
{
}
} else {
class InvalidParameterException extends \RuntimeException
{
}
}
2 changes: 1 addition & 1 deletion src/Form/Type/MessageSerializationType.php
Expand Up @@ -13,7 +13,7 @@

namespace Sonata\NotificationBundle\Form\Type;

use Sonata\CoreBundle\Form\Type\BaseDoctrineORMSerializationType;
use Sonata\Form\Type\BaseDoctrineORMSerializationType;

class MessageSerializationType extends BaseDoctrineORMSerializationType
{
Expand Down
16 changes: 7 additions & 9 deletions src/SonataNotificationBundle.php
Expand Up @@ -21,19 +21,13 @@

class SonataNotificationBundle extends Bundle
{
/**
* {@inheritdoc}
*/
public function build(ContainerBuilder $container)
{
$container->addCompilerPass(new NotificationCompilerPass());

$this->registerFormMapping();
}

/**
* {@inheritdoc}
*/
public function boot()
{
if (!\defined('AMQP_DEBUG')) {
Expand All @@ -46,11 +40,15 @@ public function boot()

/**
* Register form mapping information.
*
* NEXT_MAJOR: remove this method
*/
public function registerFormMapping()
{
FormHelper::registerFormTypeMapping([
'sonata_notification_api_form_message' => MessageSerializationType::class,
]);
if (class_exists(FormHelper::class)) {
FormHelper::registerFormTypeMapping([
'sonata_notification_api_form_message' => MessageSerializationType::class,
]);
}
}
}

0 comments on commit 6e9df70

Please sign in to comment.