[Abandoned] Symfony SonataNotificationBundle

Overview

SonataNotificationBundle

Symfony SonataNotificationBundle

Latest Stable Version Latest Unstable Version Psalm Type Coverage License

Total Downloads Monthly Downloads Daily Downloads

Branch Github Actions Code Coverage Documentation
3.x Test Coverage Status Documentation Status
4.x Test Coverage Status Documentation Status

WARNING: This repository is abandoned

There is no active support on it.

Feel free to ask if you want to help to keep this project up to date.

Documentation

Check out the documentation on the official website.

Support

For general support and questions, please use StackOverflow.

If you think you found a bug or you have a feature idea to propose, feel free to open an issue after looking at the contributing guide.

License

This package is available under the MIT license.

Comments
  • Migrate to AMQP interop.

    Migrate to AMQP interop.

    I am targeting this branch, because it contains BC breaks.

    Closes https://github.com/sonata-project/SonataNotificationBundle/issues/275

    Changelog

    ### Changed
    - The [php-amqplib](https://github.com/php-amqplib/php-amqplib) is replaced with [enqueue/amqp-lib](https://github.com/php-enqueue/enqueue-dev/blob/master/docs/transport/amqp_lib.md). This is BC change cuz it still uses php-amqplib internally. The change adopts [amqp interop](https://github.com/queue-interop/queue-interop#amqp-interop) standard which allows decouple the bundle from php-amqplib and use other its implementations in future. 
    

    To do

    • [x] Changelog
    • [x] Update the tests
    • [x] Update the documentation
    • [x] Add an upgrade note

    Subject

    The PR replaces php-amqplib usage with the solution based on AMQP interop. There are several reasons for that:

    • The code does not rely on an implementation but interoperable interfaces.
    • The biggest advantage among others is that it would work with not only php-amqplib but amqp-ext, and bunny, or any amqp interop compatible libraries.
    • cleaner OO API.
    • less code, fewer bugs.
    • no need for dealing with low-level details ( the right type for queue argument).
    • supports delaying out of the box
    • supports secure connections.
    minor 
    opened by makasim 60
  • use guzzlehttp/guzzle instead of deprecated guzzle/guzzle

    use guzzlehttp/guzzle instead of deprecated guzzle/guzzle

    I am targetting this branch, because this is a BC change.

    Changelog

    ### Changed
    - dependency from `guzzle/guzzle` to `guzzlehttp/guzzle`, because it is deprecated
    

    Subject

    Package guzzle/guzzle is abandoned, you should avoid using it. Use guzzlehttp/guzzle instead.

    Old one: https://packagist.org/packages/guzzle/guzzle New one: https://packagist.org/packages/guzzlehttp/guzzle

    patch 
    opened by OskarStark 24
  • Update SwiftMailerConsumer.php

    Update SwiftMailerConsumer.php

    Add ability to set the returnPath for mail messages sent via the notificationBundle

    Subject

    I am targeting this branch, because the change is backward compatible and adds another email parameter setting option but does not affect if it is not submitted.

    Closes #363

    Changelog

    
    ### Changed
    
    sendEmail function to allow for there setting of a return path 
    
    minor 
    opened by red-smeg 22
  • [WIP] added support for multiple queues/routing keys (refs #20)

    [WIP] added support for multiple queues/routing keys (refs #20)

    This PR adds support for multiple rabbitMQ backend queues. The rabbitMQ configuration has been changed to make the definition of multiple queue/route_key combinations possible, e.g.:

    sonata_notification: 
        backend: sonata.notification.backend.rabbitmq
    
        backends: 
          rabbitmq:
              connection:
                  host:     %rabbitmq_host%
                  user:     %rabbitmq_user%
                  pass:     %rabbitmq_pass%
                  port:     %rabbitmq_port%
                  vhost:    %rabbitmq_vhost%
              exchange: main
              default_queue: mailnotification
              queues: 
                transcoding: 
                  queue: transcoding
                  routing_key:  transcoder
                mailnotification: 
                  queue: notification
                  routing_key:  mail
                facebooknotification: 
                  queue: notification
                  routing_key:  facebook
    

    To start a consumerHandler for a specific queue, simply pass the --queue argument to the command:

    php app/console sonata:notification:start --env=prod --iteration=250 --queue=transcoding
    

    A specific queue backend can be retrieved with the service id sonata.notification.backend.queue_<QUEUE_NAME>, e.g. sonata.notification.backend.queue_transcoding

    opened by pulse00 20
  • notification:start randomly caps cpu at 100%

    notification:start randomly caps cpu at 100%

    Environment

    AWS EC2 small instances, running amazon linux and php 7.1. RabbitMQ installed locally. RabbitMQ as well as sonata notifications are set up to auto restart should they go down via supervisor.

    Sonata packages

    $ composer show --latest 'sonata-project/*'
    `sonata-project/admin-bundle              3.31.0             The missing Symfony Admin Generator
    sonata-project/block-bundle              3.11.0             Symfony SonataBlockBundle
    sonata-project/cache                     2.0.1              Cache library
    sonata-project/classification-bundle     3.x-dev 0f3f55f    Symfony SonataClassificationBundle
    sonata-project/core-bundle               3.9.0              Symfony SonataCoreBundle
    sonata-project/datagrid-bundle           2.3.1              Symfony SonataDatagridBundle
    sonata-project/doctrine-extensions       1.0.2              Doctrine2 behavioral extensions
    sonata-project/doctrine-orm-admin-bundle 3.4.1              Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
    sonata-project/easy-extends-bundle       2.4.0              Symfony SonataEasyExtendsBundle
    sonata-project/exporter                  1.8.0              Lightweight Exporter library
    sonata-project/notification-bundle       3.3.0              Symfony SonataNotificationBundle
    sonata-project/user-bundle               dev-master 7a210f8 Symfony SonataUserBundle
    `
    

    Symfony packages

    $ composer show --latest 'symfony/*'
    `symfony/monolog-bundle                   v3.1.2             Symfony MonologBundle
    symfony/phpunit-bridge                   v3.4.3             Symfony PHPUnit Bridge
    symfony/polyfill-apcu                    v1.6.0             Symfony polyfill backporting apcu_* functions to lower PHP versions
    symfony/polyfill-intl-icu                v1.6.0             Symfony polyfill for intl's ICU-related data and classes
    symfony/polyfill-mbstring                v1.6.0             Symfony polyfill for the Mbstring extension
    symfony/polyfill-php56                   v1.6.0             Symfony polyfill backporting some PHP 5.6+ features to lower PHP versions
    symfony/polyfill-php70                   v1.6.0             Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions
    symfony/polyfill-util                    v1.6.0             Symfony utilities for portability of PHP codes
    symfony/security-acl                     v3.0.1             Symfony Security Component - ACL (Access Control List)
    symfony/swiftmailer-bundle               v2.6.7             Symfony SwiftmailerBundle
    symfony/symfony                          v3.4.3             The Symfony PHP framework
    `
    

    PHP version

    $ php -v
    `PHP 7.1.7 (cli) (built: Sep 14 2017 15:47:38) ( NTS )
    Copyright (c) 1997-2017 The PHP Group
    Zend Engine v3.1.0, Copyright (c) 1998-2017 Zend Technologies
        with Zend OPcache v7.1.7, Copyright (c) 1999-2017, by Zend Technologies`
    

    Subject

    So since updating to version 3.3.0 of the message bundle I have that problem that it maxes out my CPU at 100% randomly. Apparently something at the startup of a new iteration cycle goes bad causing it to cap at 100% and stay there. Sadly it will not generate logs when it does this so I'm having a hard time pinpointing the issue. (The log below is the only thing that was in my rotated log)

    Steps to reproduce

    Unknown, maybe the connection refusal causes it somehow?

    Expected results

    That it starts normally each time without causing the CPU to go to 100% and stay there till you kill the php process running sonata:notification:start

    Actual results

    [Mon, 05 Feb 2018 22:48:30 +0000] Retrieving backend ...22:48:30 ERROR     [console] Error thrown while running command "sonata:notification:start --env=prod --iteration=250". Message: "stream_socket_client(): unable to connect to tcp://localhost:5672 (Connection refused)" ["error" => ErrorException { …},"command" => "sonata:notification:start --env=prod --iteration=250","message" => "stream_socket_client(): unable to connect to tcp://localhost:5672 (Connection refused)"] []
    
    In StreamIO.php line 138:
    
      stream_socket_client(): unable to connect to tcp://localhost:5672 (Connecti
      on refused)
    
    
    sonata:notification:start [-i|--iteration [ITERATION]] [--type [TYPE]] [-d|--show-details [SHOW-DETAILS]] [-h|--help] [-q|--quiet] [-v|vv|vvv|--verbose] [-V|--version] [--ansi] [--no-ansi] [-n|--no-interaction] [-e|--env ENV] [--no-debug] [--] <command>
    

    I've also got a new relic transaction case of such a long running action:

    Custom	Enqueue\AmqpLib\AmqpConsumer::receiveBasicGet	230	989,000 ms	77%
    Custom	Enqueue\AmqpLib\AmqpConsumer::receive	230	283,000 ms	22%
    Custom	Sonata\NotificationBundle\Iterator\AMQPMessageIterator::next	230	6,350 ms	0%
    Custom	PhpAmqpLib\Wire\IO\StreamIO::select	125	5,380 ms	0%
    Custom	Sonata\NotificationBundle\Command\ConsumerHandlerCommand::execute	1	1,330 ms	0%
    Custom	PhpAmqpLib\Channel\AbstractChannel::wait	132	181 ms	0%
    Total time			1,280,000 ms	100%
    
    
    bug unconfirmed 
    opened by KDederichs 15
  • Removed usage of deprecated ContainerAwareEventDispatcher

    Removed usage of deprecated ContainerAwareEventDispatcher

    I am targeting this branch, because I removed the deprecated ContainerAwareEventDispatcher and according to your contributing guide that goes here .

    Closes #247

    Changelog

    ### Fixed
    - Use `EventDispatcher` instead of deprecated `ContainerAwareEventDispatcher`
    

    Subject

    As of Symfony 3.3 the ContainerAwareEventDispatcher is deprecated and throws deprecation notices during Unit tests. This PR fixes the deprecation by using the proposed EventDispatcher

    patch 
    opened by KDederichs 14
  • Admin class not found fatal error

    Admin class not found fatal error

    This bundle now depends on Admin Bundle to be installed.

    PHP Fatal error: Class 'Sonata\AdminBundle\Admin\Admin' not found in /Users/gabriel/Zend/workspaces/PM2/PMAppMIBundle/vendor/sonata-project/notification-bundle/Sonata/NotificationBundle/Admin/MessageAdmin.php on line 21

    @rande, Can this dependency be removed as it breaks the usefulness of the notification bundle.

    opened by gmoreira 13
  • Running tasks simultaneously

    Running tasks simultaneously

    Feature Request

    Would be nice to have ability to run tasks all together and not one by one, when sonata:notification:start is called... but maybe I'm a dreamer?

    feature 
    opened by jo66 11
  • Call to undefined method  JMSDiExtraExtension::blacklistControllerFile()

    Call to undefined method JMSDiExtraExtension::blacklistControllerFile()

    This reverts commit 1d9462fcec356c5a3773d4a06100487af6313dbd.

    Fatal error: Call to undefined method JMS\DiExtraBundle\DependencyInjection\JMSDiExtraExtension::blacklistControllerFile()

    this commit broke with JMSDiExtraBundle dev-master because blacklist is in a different branch (https://github.com/lsmith77/JMSDiExtraBundle/blob/controller_blacklist/DependencyInjection/JMSDiExtraExtension.php)

    opened by SeoFood 10
  • remove deprecated corebundle

    remove deprecated corebundle

    Subject

    Remove deprecated SonataCoreBundle

    I am targeting 3.x, because there's no BC break.

    Closes #423

    Changelog

    ### Fixed
    - Fix SonataCoreBundle deprecations
    
    opened by garak 9
  • Disable admin by default

    Disable admin by default

    I am targeting this branch, because this is BC break

    Changelog

    ### Changed
    - Disable admin configuration by default
    

    Subject

    I believe, that disabling admin in configuration is more correct, because it can be enabled only when sonata.notification.backend.doctrine was enabled.

    A default configuration, i.e. recipe for sonata-project/notification-bundle could be like this:

    sonata_notification:
        consumers:
            register_default: false
        admin:
            enabled: false
    

    Also, default configuration could contain commented configuration for backend: sonata.notification.backend.rabbitmq. Anyway, i have already created PR with recipe for this bundle in febuary https://github.com/symfony/recipes-contrib/pull/302

    Additional configuration, i.e. a recipe for a new package sonata-project/notification-orm-pack could be like this (i created a gist with entity class):

    sonata_notification:
        backend: sonata.notification.backend.doctrine
        backends:
            doctrine: ~
        class:
            message: App\Entity\SonataNotificationMessage
        admin:
            enabled: true
    

    So, additional configuration will override default.

    major 
    opened by covex-nn 9
Releases(3.13.0)
  • 3.13.0(Jun 30, 2021)

  • 3.12.0(Mar 24, 2021)

  • 3.11.0(Jan 27, 2021)

  • 3.10.0(Sep 22, 2020)

    Changed

    • [#457] Support for deprecated "rest" routing type in favor for xml (@wbloszyk)
    • [#471] Bump sonata-project/datagrid-bundle version (@core23)

    Fixed

    • [#458] Make ErroneousMessagesSelector service public again (@core23)
    Source code(tar.gz)
    Source code(zip)
  • 3.9.0(Jul 26, 2020)

    Added

    • [#448] Added public alias Sonata\NotificationBundle\Controller\Api\MessageController for sonata.notification.controller.api.message service (@wbloszyk)

    Changed

    • [#452] SonataEasyExtendsBundle is now optional, using SonataDoctrineBundle is preferred (@jordisala1991)
    • [#452] Use Laminas instead of deprecated Zend (@jordisala1991)

    Deprecated

    • [#452] Using SonataEasyExtendsBundle to add Doctrine mapping information (@jordisala1991)

    Fixed

    • [#448] Fix RestFul API - Class could not be determined for Controller identified Error (@wbloszyk)

    Removed

    • [#451] Removed support for deprecated "rest" routing type (@wbloszyk)
    • [#450] Support for PHP < 7.2 (@wbloszyk)
    Source code(tar.gz)
    Source code(zip)
  • 3.8.0(Jun 26, 2020)

  • 3.7.0(Mar 26, 2020)

  • 3.6.2(Jul 20, 2019)

  • 3.6.1(Mar 13, 2019)

  • 3.6.0(Feb 25, 2019)

    Added

    • Added Sonata\NotificationBundle\Backend\BackendInterface service alias
    • Added Sonata\NotificationBundle\Entity\MessageManager service alias

    Changed

    • Update RestartCommand check count message only for not pulling mode
    • sendEmail function to allow for the setting of a return path
    • Do not use deprecated AMQPBackendDispatcher::getChannel method.
    • made the sonata.notification.dispatcher service public to fix a bug when running sonata:notification:start

    Fixed

    • Fix deprecation for symfony/config 4.2+
    • Make services public

    Removed

    • support for php 5 and php 7.0
    Source code(tar.gz)
    Source code(zip)
  • 3.5.1(May 25, 2018)

    Changed

    • Force use existing translation strings in breadcrumb for Message entity in Admin panel
    • enqueue/amqp-lib is an optional dependency now

    Fixed

    • API and Admin services are only available when using Doctrine as a backend
    Source code(tar.gz)
    Source code(zip)
  • 3.5.0(Apr 26, 2018)

    Added

    • Added possibility to add an attachment to SwiftMailer Consumer

    Fixed

    • Data fetched from stats counts are now properly manipulated (in case of doctrine backend is used)
    • Typo in message status
    Source code(tar.gz)
    Source code(zip)
  • 3.4.0(Feb 23, 2018)

    Changed

    • Require symfony/security-core instead of symfony/security
    • Refactored bundle configuration
    • Notification backend services are marked as public

    Fixed

    • each() is deprecated since PHP 7.2
    • Remove var definition override
    • Commands not working on symfony4

    Removed

    • Removed compatibility with older versions of FOSRestBundle (<2.1)
    Source code(tar.gz)
    Source code(zip)
  • 3.3.1(Jan 26, 2018)

    Changed

    • Auto-register all aliases as public
    • Auto-register consumer as public service

    Fixed

    • isRequired() was removed since a default is specified
    • MessageAdmin loads correct ChoiceType for the state filter (instead of ChoiceFilter)
    Source code(tar.gz)
    Source code(zip)
  • 3.3.0(Dec 7, 2017)

    Added

    • Added Russian translations

    Changed

    • Migrate from php-amqplib/php-amqplib to enqueue/amqp-lib package

    Fixed

    • It is now allowed to install Symfony 4

    Removed

    • Support for old versions of PHP and Symfony.
    • Support deprecations for old form alias usage
    Source code(tar.gz)
    Source code(zip)
  • 3.2.0(Sep 14, 2017)

    Added

    • Support for CC/BCC fields in SwiftMailerConsumer
    • Added prefetch count configuration in AMQPBackend

    Fixed

    • Fixed hardcoded paths to classes in .xml.skeleton files of config
    • Use EventDispatcher instead of deprecated ContainerAwareEventDispatcher
    Source code(tar.gz)
    Source code(zip)
  • 3.1.0(Feb 3, 2017)

    Added

    • Add dead letter handling in AMQPBackend
    • Added per-queue message TTL in AMQPBackend

    Changed

    • Changes the name of the vendor videlalvaro/php-amqplib to its new name php-amqplib/php-amqplib
    • dependency from guzzle/guzzle to guzzlehttp/guzzle, because it is deprecated
    • array QueryParam parameter to map
    • FosRest SerializationContext to Context

    Fixed

    • Fix deprecated usage of Admin class
    • Fixed duplicate translation of batch actions
    • Missing italian translation

    Removed

    • internal test classes are now excluded from the autoloader
    Source code(tar.gz)
    Source code(zip)
  • 2.3.3(Feb 25, 2016)

  • 2.3.1(Jun 13, 2015)

Dockerise Symfony Application (Symfony 6 + Clean Architecture+ DDD+ CQRS + Docker + Xdebug + PHPUnit + Doctrine ORM + JWT Auth + Static analysis)

Symfony Dockerise Symfony Application Install Docker Install Docker Compose Docker PHP & Nginx Create Symfony Application Debugging Install Xdebug Con

null 48 Jan 5, 2023
A Symfony Feature Flag Bundle which easily allows you to configure and use your favorite feature flag provider.

Metro Markets FF Metro Markets FF is a Feature Flag Symfony Bundle. It easily allows you to configure and use your favorite feature flag provider. Ins

METRO Markets 14 May 23, 2022
A Symfony bundle built to schedule/consume repetitive tasks

Daily runs Code style Infection PHPUnit Rector Security Static analysis A Symfony bundle built to schedule/consume repetitive tasks Main features Exte

Guillaume Loulier 98 Jan 4, 2023
ENI Ecole Informatique, PHP Symfony projet

ENI Ecole project La société ENI souhaite développer pour ses stagiaires actifs ainsi que ses anciens stagiaires une plateforme web leur permettant d’

null 2 Jan 29, 2022
A complete stack for running Symfony 5 into Docker containers using docker-compose tool and with Certbot for the HTTPS certificate.

?? Docker + PHP 7.4 + MySQL8.0 + Nginx + Certbot(HTTPS) + Symfony 5 Boilerplate ?? Edited from https://github.com/ger86/symfony-docker version -> http

null 6 Nov 9, 2022
This is a PHP library developed for Symfony to collect address information.

Goldbach Algorithms Address Info Getter (fondly nicknamed AIG) is a PHP library developed for Symfony to collect address information.

Goldbach Algorithms 1 Nov 3, 2021
Tabler.io bundle for Symfony - a backend/admin theme for easy integration

Tabler Bundle for Symfony This repository contains a Symfony bundle, integrating the fantastic Tabler.io HTML Template into your Symfony project. It s

Kevin Papst 22 Jan 2, 2023
Instrument commands/workers/custom code with datadog, newrelic, tideways, symfony, spx.

sourceability/instrumentation This library provides a simple interface to start and stop instrumenting code with APMs. Symfony commands and messenger

null 15 Jun 6, 2022
This component provides a collection of functions/classes using the symfony/intl package when the Intl extension is not installed.

Symfony Polyfill / Intl: ICU This package provides fallback implementations when the Intl extension is not installed. It is limited to the "en" locale

Symfony 2.4k Jan 6, 2023
Enraged Xenomorph - DDD/CQRS Symfony Application Boilerplate

Enraged Xenomorph - DDD/CQRS Symfony Application Boilerplate This project is very opinionated attempt to compile a bit of experience, few good practic

Gniewomir Świechowski 1 Jan 10, 2022
Sanitize untrustworthy HTML user input (Symfony integration for https://github.com/tgalopin/html-sanitizer)

html-sanitizer is a library aiming at handling, cleaning and sanitizing HTML sent by external users (who you cannot trust), allowing you to store it and display it safely. It has sensible defaults to provide a great developer experience while still being entierely configurable.

Titouan Galopin 86 Oct 5, 2022
Symfony bundle for class/method memoization

Symfony service memoization bundle This bundle provides memoization for your services - every time you call the same method with the same arguments a

Dominik Chrástecký 16 Oct 31, 2022
Twig extensions for common navigation widgets for symfony.

Twig Navigation Extension This bundle provides a Twig extensions for common navigation widgets. Installation composer require m2mtech/twig-navigation-

Martin Mandl 1 Feb 23, 2022
A Symfony2 bundle that integrates Select2 as a drop-in replacement for a standard entity field on a Symfony form.

select2entity-bundle Introduction This is a Symfony bundle which enables the popular Select2 component to be used as a drop-in replacement for a stand

Ross Keatinge 214 Nov 21, 2022
Symfony Polyfill / Intl: Grapheme

This component provides a partial, native PHP implementation of the Grapheme functions from the Intl extension.

Symfony 1.3k Jan 6, 2023
Google Analytics Measurement Protocol Package for Symfony

Google Analytics Measurement Protocol Package for Symfony. Supports all GA Measurement Protocol API methods.

Four Labs 31 Jan 5, 2023
AccessibleBundle provides an Accessible integration for your Symfony projects

AccessibleBundle AccessibleBundle provides an Accessible integration for your Symfony projects. This will allow you to define your class behavior usin

Antares Tupin 13 Apr 2, 2022
Simple php-imap integration for Symfony 2.8, 3.x and 4.x.

PHP-IMAP integration bundle Simple php-imap integration for Symfony 4.x, 5.x and 6.x. The version 1.5 and above are only compatible with Symfony 4+. P

null 52 Dec 20, 2022
Road to Symfony certification

Road to Symfony certification Welcome to the repository dedicated to help you with the Symfony certification exam, based on Symfony 6. Table of Conten

Mario Blazek 7 Oct 10, 2022