sonata-project / SonataCoreBundle

[deprecated] SonataCoreBundle
MIT License
318 stars 138 forks source link

No flash messages anymore since 3.19.0 #748

Closed dmaicher closed 4 years ago

dmaicher commented 4 years ago

Environment

Sonata packages

$ composer show --latest 'sonata-project/*'
sonata-project/admin-bundle              3.66.0 3.66.0 The missing Symfony Admin Generator
sonata-project/block-bundle              3.18.5 4.2.0  Symfony SonataBlockBundle
sonata-project/cache                     2.0.1  2.0.1  Cache library
sonata-project/core-bundle               3.19.0 3.19.0 Symfony SonataCoreBundle (abandoned)
sonata-project/doctrine-extensions       1.6.0  1.6.0  Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.17.1 3.17.1 Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/exporter                  2.2.0  2.2.0  Lightweight Exporter library

Symfony packages

$ composer show --latest 'symfony/*'
Restricting packages listed in "symfony/symfony" to "4.4.*"
symfony/asset                      v4.4.8  v4.4.8  Symfony Asset Component
symfony/browser-kit                v4.4.8  v4.4.8  Symfony BrowserKit Component
symfony/cache                      v4.4.8  v4.4.8  Symfony Cache component with PSR-6, PSR-16, and tags
symfony/cache-contracts            v2.0.1  v2.0.1  Generic abstractions related to caching
symfony/config                     v4.4.8  v4.4.8  Symfony Config Component
symfony/console                    v4.4.8  v4.4.8  Symfony Console Component
symfony/css-selector               v4.4.8  v4.4.8  Symfony CssSelector Component
symfony/debug                      v4.4.8  v4.4.8  Symfony Debug Component
symfony/debug-bundle               v4.4.8  v4.4.8  Symfony DebugBundle
symfony/dependency-injection       v4.4.8  v4.4.8  Symfony DependencyInjection Component
symfony/doctrine-bridge            v4.4.8  v4.4.8  Symfony Doctrine Bridge
symfony/dom-crawler                v4.4.8  v4.4.8  Symfony DomCrawler Component
symfony/error-handler              v4.4.8  v4.4.8  Symfony ErrorHandler Component
symfony/event-dispatcher           v4.4.8  v4.4.8  Symfony EventDispatcher Component
symfony/event-dispatcher-contracts v1.1.7  v2.0.1  Generic abstractions related to dispatching event
symfony/expression-language        v4.4.8  v4.4.8  Symfony ExpressionLanguage Component
symfony/filesystem                 v4.4.8  v4.4.8  Symfony Filesystem Component
symfony/finder                     v4.4.8  v4.4.8  Symfony Finder Component
symfony/form                       v4.4.8  v4.4.8  Symfony Form Component
symfony/framework-bundle           v4.4.8  v4.4.8  Symfony FrameworkBundle
symfony/http-foundation            v4.4.8  v4.4.8  Symfony HttpFoundation Component
symfony/http-kernel                v4.4.8  v4.4.8  Symfony HttpKernel Component
symfony/inflector                  v4.4.8  v4.4.8  Symfony Inflector Component
symfony/intl                       v4.4.8  v4.4.8  A PHP replacement layer for the C intl extension that includes additional data from the ICU library.
symfony/mime                       v4.4.8  v4.4.8  A library to manipulate MIME messages
symfony/monolog-bridge             v4.4.8  v4.4.8  Symfony Monolog Bridge
symfony/monolog-bundle             v3.5.0  v3.5.0  Symfony MonologBundle
symfony/options-resolver           v4.4.8  v4.4.8  Symfony OptionsResolver Component
symfony/phpunit-bridge             v5.0.8  v5.0.8  Symfony PHPUnit Bridge
symfony/polyfill-ctype             v1.17.0 v1.17.0 Symfony polyfill for ctype functions
symfony/polyfill-intl-grapheme     v1.17.0 v1.17.0 Symfony polyfill for intl's grapheme_* functions
symfony/polyfill-intl-idn          v1.17.0 v1.17.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-intl-normalizer   v1.17.0 v1.17.0 Symfony polyfill for intl's Normalizer class and related functions
symfony/polyfill-php73             v1.17.0 v1.17.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/process                    v4.4.8  v4.4.8  Symfony Process Component
symfony/property-access            v4.4.8  v4.4.8  Symfony PropertyAccess Component
symfony/property-info              v4.4.8  v4.4.8  Symfony Property Info Component
symfony/proxy-manager-bridge       v4.4.8  v4.4.8  Symfony ProxyManager Bridge
symfony/psr-http-message-bridge    v2.0.0  v2.0.0  PSR HTTP message bridge
symfony/routing                    v4.4.8  v4.4.8  Symfony Routing Component
symfony/security                   v4.4.8  v4.4.8  Symfony Security Component
symfony/security-acl               v3.0.4  v3.0.4  Symfony Security Component - ACL (Access Control List)
symfony/security-bundle            v4.4.8  v4.4.8  Symfony SecurityBundle
symfony/serializer                 v4.4.8  v4.4.8  Symfony Serializer Component
symfony/service-contracts          v2.0.1  v2.0.1  Generic abstractions related to writing services
symfony/stopwatch                  v4.4.8  v4.4.8  Symfony Stopwatch Component
symfony/string                     v5.0.8  v5.0.8  Symfony String component
symfony/swiftmailer-bundle         v3.2.4  v3.4.0  Symfony SwiftmailerBundle
symfony/templating                 v4.4.8  v4.4.8  Symfony Templating Component
symfony/translation                v4.4.8  v4.4.8  Symfony Translation Component
symfony/translation-contracts      v2.0.1  v2.0.1  Generic abstractions related to translation
symfony/twig-bridge                v4.4.8  v4.4.8  Symfony Twig Bridge
symfony/twig-bundle                v4.4.8  v4.4.8  Symfony TwigBundle
symfony/validator                  v4.4.8  v4.4.8  Symfony Validator Component
symfony/var-dumper                 v4.4.8  v4.4.8  Symfony mechanism for exploring and dumping PHP variables
symfony/var-exporter               v4.4.8  v4.4.8  A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code
symfony/web-profiler-bundle        v4.4.8  v4.4.8  Symfony WebProfilerBundle
symfony/webpack-encore-bundle      v1.7.3  v1.7.3  Integration with your Symfony app & Webpack Encore!
symfony/yaml                       v4.4.8  v4.4.8  Symfony Yaml Component

PHP version

$ php -v
PHP 7.4.5 (cli) (built: Apr 19 2020 08:43:53) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
    with Zend OPcache v7.4.5, Copyright (c), by Zend Technologies

Subject

Since I updated from 3.18.0 to 3.19.0 I don't have any flash messages anymore when I update an entity for example.

Steps to reproduce

maybe caused by something here? https://github.com/sonata-project/SonataCoreBundle/compare/3.18.0..3.19.0#diff-b44f3757f5ff122a77c8315f137cba81

VincentLanglet commented 4 years ago

Thanks for the report !

CC @wbloszyk

wbloszyk commented 4 years ago

@dmaicher I checking it. Flash messages are added.

Bug is in this line: https://github.com/sonata-project/SonataCoreBundle/blob/2a2169b557bd753b3bf209777f09c013e351c347/src/CoreBundle/Resources/config/twig/flash.xml#L17

Change to:

<argument type="service" id="sonata.core.flashmessage.manager"/> 

I will try make alias to sonata.twig.flashmessage.manager. This will resolve this issue too.

wbloszyk commented 4 years ago

@dmaicher Fixed. Thanks for the report !