sonata-project / SonataNewsBundle

[Abandoned] Symfony SonataNewsBundle
https://docs.sonata-project.org/projects/SonataNewsBundle
MIT License
151 stars 131 forks source link

The child node "db_driver" at path "fos_user" must be configured #532

Closed kniziol closed 5 years ago

kniziol commented 5 years ago

Environment

Sonata packages

$ composer show --latest 'sonata-project/*'

Restricting packages listed in "symfony/symfony" to "4.3.*"
sonata-project/admin-bundle              3.49.1 3.50.0 The missing Symfony Admin Generator
sonata-project/block-bundle              3.15.0 3.15.0 Symfony SonataBlockBundle
sonata-project/cache                     2.0.1  2.0.1  Cache library
sonata-project/classification-bundle     3.8.1  3.8.1  Symfony SonataClassificationBundle
sonata-project/core-bundle               3.17.0 3.17.0 Symfony SonataCoreBundle
sonata-project/datagrid-bundle           2.5.0  3.0.0  Symfony SonataDatagridBundle
sonata-project/doctrine-extensions       1.3.0  1.3.0  Doctrine2 behavioral extensions
sonata-project/doctrine-orm-admin-bundle 3.9.0  3.9.0  Symfony Sonata / Integrate Doctrine ORM into the SonataAdminBundle
sonata-project/easy-extends-bundle       2.5.0  2.5.0  Symfony SonataEasyExtendsBundle
sonata-project/exporter                  2.0.1  2.0.1  Lightweight Exporter library
sonata-project/formatter-bundle          4.1.3  4.1.3  Symfony SonataFormatterBundle
sonata-project/intl-bundle               2.6.0  2.6.0  Symfony SonataIntlBundle
sonata-project/media-bundle              3.20.1 3.20.1 Symfony SonataMediaBundle
sonata-project/news-bundle               3.8.0  3.8.0  Symfony SonataNewsBundle
sonata-project/user-bundle               4.4.0  4.4.0  Symfony SonataUserBundle

Symfony packages

$ composer show --latest 'symfony/*'

Restricting packages listed in "symfony/symfony" to "4.3.*"
symfony/asset                      v4.3.1  v4.3.1  Symfony Asset Component
symfony/browser-kit                v4.3.1  v4.3.1  Symfony BrowserKit Component
symfony/cache                      v4.3.1  v4.3.1  Symfony Cache component with PSR-6, PSR-16, and tags
symfony/cache-contracts            v1.1.5  v1.1.5  Generic abstractions related to caching
symfony/class-loader               v3.4.28 v3.4.28 Symfony ClassLoader Component
symfony/config                     v4.3.1  v4.3.1  Symfony Config Component
symfony/console                    v4.3.1  v4.3.1  Symfony Console Component
symfony/contracts                  v1.1.0  v1.1.5  A set of abstractions extracted out of the Symfony components
symfony/css-selector               v4.3.1  v4.3.1  Symfony CssSelector Component
symfony/debug                      v4.3.1  v4.3.1  Symfony Debug Component
symfony/debug-bundle               v4.3.1  v4.3.1  Symfony DebugBundle
symfony/debug-pack                 v1.0.7  v1.0.7  A debug pack for Symfony projects
symfony/dependency-injection       v4.3.1  v4.3.1  Symfony DependencyInjection Component
symfony/doctrine-bridge            v4.3.1  v4.3.1  Symfony Doctrine Bridge
symfony/dom-crawler                v4.3.1  v4.3.1  Symfony DomCrawler Component
symfony/dotenv                     v4.3.1  v4.3.1  Registers environment variables from a .env file
symfony/event-dispatcher           v4.3.1  v4.3.1  Symfony EventDispatcher Component
symfony/event-dispatcher-contracts v1.1.5  v1.1.5  Generic abstractions related to dispatching event
symfony/expression-language        v4.3.1  v4.3.1  Symfony ExpressionLanguage Component
symfony/filesystem                 v4.3.1  v4.3.1  Symfony Filesystem Component
symfony/finder                     v4.3.1  v4.3.1  Symfony Finder Component
symfony/flex                       v1.2.7  v1.2.7  Composer plugin for Symfony
symfony/form                       v4.3.1  v4.3.1  Symfony Form Component
symfony/framework-bundle           v4.3.1  v4.3.1  Symfony FrameworkBundle
symfony/http-client                v4.3.1  v4.3.1  Symfony HttpClient component
symfony/http-client-contracts      v1.1.5  v1.1.5  Generic abstractions related to HTTP clients
symfony/http-foundation            v4.3.1  v4.3.1  Symfony HttpFoundation Component
symfony/http-kernel                v4.3.1  v4.3.1  Symfony HttpKernel Component
symfony/inflector                  v4.3.1  v4.3.1  Symfony Inflector Component
symfony/intl                       v4.3.1  v4.3.1  A PHP replacement layer for the C intl extension that includes additional data from the ICU library.
symfony/maker-bundle               v1.11.6 v1.11.6 Symfony Maker helps you create empty commands, controllers, form classes, tests and more so you can forget about writing boilerplate code.
symfony/mime                       v4.3.1  v4.3.1  A library to manipulate MIME messages
symfony/monolog-bridge             v4.3.1  v4.3.1  Symfony Monolog Bridge
symfony/monolog-bundle             v3.3.1  v3.4.0  Symfony MonologBundle
symfony/options-resolver           v4.3.1  v4.3.1  Symfony OptionsResolver Component
symfony/orm-pack                   v1.0.6  v1.0.6  A pack for the Doctrine ORM
symfony/panther                    v0.4.1  v0.4.1  A browser testing and web scraping library for PHP and Symfony.
symfony/phpunit-bridge             v4.2.9  v4.3.1  Symfony PHPUnit Bridge
symfony/polyfill-intl-icu          v1.11.0 v1.11.0 Symfony polyfill for intl's ICU-related data and classes
symfony/polyfill-intl-idn          v1.11.0 v1.11.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions
symfony/polyfill-mbstring          v1.11.0 v1.11.0 Symfony polyfill for the Mbstring extension
symfony/polyfill-php72             v1.11.0 v1.11.0 Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions
symfony/polyfill-php73             v1.11.0 v1.11.0 Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions
symfony/process                    v4.3.1  v4.3.1  Symfony Process Component
symfony/profiler-pack              v1.0.4  v1.0.4  A pack for the Symfony web profiler
symfony/property-access            v4.3.1  v4.3.1  Symfony PropertyAccess Component
symfony/property-info              v4.3.1  v4.3.1  Symfony Property Info Component
symfony/proxy-manager-bridge       v4.3.1  v4.3.1  Symfony ProxyManager Bridge
symfony/routing                    v4.3.1  v4.3.1  Symfony Routing Component
symfony/security-acl               v3.0.2  v3.0.2  Symfony Security Component - ACL (Access Control List)
symfony/security-bundle            v4.3.1  v4.3.1  Symfony SecurityBundle
symfony/security-core              v4.3.1  v4.3.1  Symfony Security Component - Core Library
symfony/security-csrf              v4.3.1  v4.3.1  Symfony Security Component - CSRF Library
symfony/security-guard             v4.3.1  v4.3.1  Symfony Security Component - Guard
symfony/security-http              v4.3.1  v4.3.1  Symfony Security Component - HTTP Integration
symfony/serializer                 v4.3.1  v4.3.1  Symfony Serializer Component
symfony/serializer-pack            v1.0.2  v1.0.2  A pack for the Symfony serializer
symfony/service-contracts          v1.1.5  v1.1.5  Generic abstractions related to writing services
symfony/stopwatch                  v4.3.1  v4.3.1  Symfony Stopwatch Component
symfony/swiftmailer-bundle         v3.2.8  v3.2.8  Symfony SwiftmailerBundle
symfony/templating                 v4.3.1  v4.3.1  Symfony Templating Component
symfony/test-pack                  v1.0.5  v1.0.6  A pack for functional and end-to-end testing within a Symfony app
symfony/translation                v4.3.1  v4.3.1  Symfony Translation Component
symfony/translation-contracts      v1.1.5  v1.1.5  Generic abstractions related to translation
symfony/twig-bridge                v4.3.1  v4.3.1  Symfony Twig Bridge
symfony/twig-bundle                v4.3.1  v4.3.1  Symfony TwigBundle
symfony/validator                  v4.3.1  v4.3.1  Symfony Validator Component
symfony/var-dumper                 v4.3.1  v4.3.1  Symfony mechanism for exploring and dumping PHP variables
symfony/var-exporter               v4.3.1  v4.3.1  A blend of var_export() + serialize() to turn any serializable data structure to plain PHP code
symfony/web-link                   v4.3.1  v4.3.1  Symfony WebLink Component
symfony/web-profiler-bundle        v4.3.1  v4.3.1  Symfony WebProfilerBundle
symfony/web-server-bundle          v4.3.1  v4.3.1  Symfony WebServerBundle
symfony/webpack-encore-bundle      v1.6.0  v1.6.0  Integration with your Symfony app & Webpack Encore!
symfony/yaml                       v4.3.1  v4.3.1  Symfony Yaml Component

PHP version

$ php -v

PHP 7.3.5 (cli) (built: May  8 2019 02:47:29) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.5, Copyright (c) 1998-2018 Zend Technologies
    with Zend OPcache v7.3.5, Copyright (c) 1999-2018, by Zend Technologies
    with Xdebug v2.7.2, Copyright (c) 2002-2019, by Derick Rethans

Subject

Cannot install sonata-project/news-bundle package, because of errors:

$ composer require sonata-project/news-bundle

(...)

  - Configuring sonata-project/formatter-bundle (>=4.1.3): From auto-generated recipe
  -  WARNING  sonata-project/classification-bundle (>=3.7): From github.com/symfony/recipes-contrib:master
    The recipe for this package comes from the "contrib" repository, which is open to community contributions.
    Review the recipe at https://github.com/symfony/recipes-contrib/tree/master/sonata-project/classification-bundle/3.7

    Do you want to execute this recipe?
    [y] Yes
    [n] No
    [a] Yes for all packages, only for the current installation session
    [p] Yes permanently, never ask again for this project
    (defaults to n): y
  - Configuring sonata-project/classification-bundle (>=3.7): From github.com/symfony/recipes-contrib:master
  - Configuring sonata-project/news-bundle (>=3.8.0): From auto-generated recipe
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!  
!!  In ArrayNode.php line 228:
!!                                                                       
!!    The child node "db_driver" at path "fos_user" must be configured.

I created config/packages/fos_user.yaml file manually:

fos_user:
    db_driver: orm # other valid values are 'mongodb' and 'couchdb'
    firewall_name: main
    user_class: App\Entity\User
    from_email:
        address: fake@email.com
        sender_name: Fake Sender

and then:

$ composer require sonata-project/news-bundle

(...)

Nothing to install or update
Generating autoload files
ocramius/package-versions:  Generating version class...
ocramius/package-versions: ...done generating version class
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!  
!!  In ArrayNode.php line 228:
!!                                                                                 
!!    The child node "default_formatter" at path "sonata_formatter" must be confi  
!!    gured.

Steps to reproduce

Run command:

composer require sonata-project/news-bundle

as described here: https://sonata-project.org/bundles/news/3-x/doc/reference/installation.html

Expected results

Installation of all packages and all recipes will be successful

Actual results

Installation failed

core23 commented 5 years ago

Please have a look at the fos installation documentation. Not a bug related to this project

kniziol commented 5 years ago

@core23 OK, but this:

$ composer require sonata-project/news-bundle

(...)

Nothing to install or update
Generating autoload files
ocramius/package-versions:  Generating version class...
ocramius/package-versions: ...done generating version class
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!  
!!  In ArrayNode.php line 228:
!!                                                                                 
!!    The child node "default_formatter" at path "sonata_formatter" must be confi  
!!    gured.

is directly related to this project, IMO.

L-KamiL commented 5 years ago

@core23 OK, but this:

$ composer require sonata-project/news-bundle

(...)

Nothing to install or update
Generating autoload files
ocramius/package-versions:  Generating version class...
ocramius/package-versions: ...done generating version class
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!  
!!  In ArrayNode.php line 228:
!!                                                                                 
!!    The child node "default_formatter" at path "sonata_formatter" must be confi  
!!    gured.

is directly related to this project, IMO.

Hi, i have the same problem. Did you solved it ?

core23 commented 5 years ago

Please have a look at: https://sonata-project.org/bundles/formatter/3-x/doc/reference/installation.html

kniziol commented 5 years ago

@core23 Does the configuration may be loaded/created automatically by Symfony Recipe?

core23 commented 5 years ago

There is no recipe so far: https://github.com/symfony/recipes-contrib/tree/master/sonata-project :disappointed:

kniziol commented 5 years ago

@core23 Could you create it, please?

core23 commented 5 years ago

I think it's not so complicated, so you can try it @kniziol

Actually I don't have much time for this. We try to release a new major release of the block bundle

L-KamiL commented 5 years ago

Please have a look at: https://sonata-project.org/bundles/formatter/3-x/doc/reference/installation.html

Solved ! Thanks !