sonata-project / SonataUserBundle

Symfony SonataUserBundle
https://docs.sonata-project.org/projects/SonataUserBundle
MIT License
339 stars 488 forks source link

The child config "resetting" under "sonata_user" must be configured. #1516

Closed ec-ecss closed 2 years ago

ec-ecss commented 2 years ago

Environment

Sonata packages

show

``` $ composer show --latest 'sonata-project/*' # Put the result here. sonata-project/admin-bundle 4.9.0 4.9.0 The missing Symfony Admin Generator sonata-project/block-bundle 4.10.0 4.10.0 Symfony SonataBlockBundle sonata-project/cache 2.2.0 2.2.0 Cache library sonata-project/doctrine-extensions 1.16.0 1.16.0 Doctrine2 behavioral extensions sonata-project/doctrine-orm-admin-bundle 4.2.6 4.2.6 Integrate Doctrine ORM into the SonataAdminBundle sonata-project/exporter 2.11.0 2.11.0 Lightweight Exporter library sonata-project/form-extensions 1.13.1 1.13.1 Symfony form extensions sonata-project/twig-extensions 1.9.1 1.9.1 Sonata twig extensions sonata-project/user-bundle 5.0.0-rc.1 5.0.0-rc.1 Symfony SonataUserBundle ```

Symfony packages

show

``` $ composer show --latest 'symfony/*' symfony/asset v6.0.3 v6.0.3 Manages URL generation and versioning of web assets such as CSS stylesheets, JavaScript files and image files symfony/cache v6.0.5 v6.0.5 Provides an extended PSR-6, PSR-16 (and tags) implementation symfony/cache-contracts v3.0.0 v3.0.0 Generic abstractions related to caching symfony/config v6.0.3 v6.0.3 Helps you find, load, combine, autofill and validate configuration values of any kind symfony/console v6.0.5 v6.0.5 Eases the creation of beautiful and testable command line interfaces symfony/dependency-injection v6.0.5 v6.0.5 Allows you to standardize and centralize the way objects are constructed in your application symfony/deprecation-contracts v3.0.0 v3.0.0 A generic function and convention to trigger deprecation notices symfony/doctrine-bridge v6.0.5 v6.0.5 Provides integration for Doctrine with various Symfony components symfony/dotenv v6.0.5 v6.0.5 Registers environment variables from a .env file symfony/error-handler v6.0.3 v6.0.3 Provides tools to manage errors and ease debugging PHP code symfony/event-dispatcher v6.0.3 v6.0.3 Provides tools that allow your application components to communicate with each other by dispatching events and listen... symfony/event-dispatcher-contracts v3.0.0 v3.0.0 Generic abstractions related to dispatching event symfony/expression-language v6.0.3 v6.0.3 Provides an engine that can compile and evaluate expressions symfony/filesystem v6.0.5 v6.0.5 Provides basic utilities for the filesystem symfony/finder v6.0.3 v6.0.3 Finds files and directories via an intuitive fluent interface symfony/flex v2.1.6 v2.1.6 Composer plugin for Symfony symfony/form v6.0.5 v6.0.5 Allows to easily create, process and reuse HTML forms symfony/framework-bundle v6.0.5 v6.0.5 Provides a tight integration between Symfony components and the Symfony full-stack framework symfony/http-foundation v6.0.5 v6.0.5 Defines an object-oriented layer for the HTTP specification symfony/http-kernel v6.0.5 v6.0.5 Provides a structured process for converting a Request into a Response symfony/mailer v6.0.5 v6.0.5 Helps sending emails symfony/mime v6.0.3 v6.0.3 Allows manipulating MIME messages symfony/options-resolver v6.0.3 v6.0.3 Provides an improved replacement for the array_replace PHP function symfony/password-hasher v6.0.3 v6.0.3 Provides password hashing utilities symfony/polyfill-intl-grapheme v1.24.0 v1.24.0 Symfony polyfill for intl's grapheme_* functions symfony/polyfill-intl-icu v1.24.0 v1.24.0 Symfony polyfill for intl's ICU-related data and classes symfony/polyfill-intl-idn v1.24.0 v1.24.0 Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions symfony/polyfill-intl-normalizer v1.24.0 v1.24.0 Symfony polyfill for intl's Normalizer class and related functions symfony/polyfill-mbstring v1.24.0 v1.24.0 Symfony polyfill for the Mbstring extension symfony/polyfill-php81 v1.24.0 v1.24.0 Symfony polyfill backporting some PHP 8.1+ features to lower PHP versions symfony/property-access v6.0.5 v6.0.5 Provides functions to read and write from/to an object or array using a simple string notation symfony/property-info v6.0.3 v6.0.3 Extracts information about PHP class' properties using metadata of popular sources symfony/routing v6.0.5 v6.0.5 Maps an HTTP request to a set of configuration variables symfony/runtime v6.0.5 v6.0.5 Enables decoupling PHP applications from global state symfony/security-acl v3.3.1 v3.3.1 Symfony Security Component - ACL (Access Control List) symfony/security-bundle v6.0.5 v6.0.5 Provides a tight integration of the Security component into the Symfony full-stack framework symfony/security-core v6.0.5 v6.0.5 Symfony Security Component - Core Library symfony/security-csrf v6.0.3 v6.0.3 Symfony Security Component - CSRF Library symfony/security-http v6.0.5 v6.0.5 Symfony Security Component - HTTP Integration symfony/service-contracts v3.0.0 v3.0.0 Generic abstractions related to writing services symfony/string v6.0.3 v6.0.3 Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified... symfony/translation v6.0.5 v6.0.5 Provides tools to internationalize your application symfony/translation-contracts v3.0.0 v3.0.0 Generic abstractions related to translation symfony/twig-bridge v6.0.5 v6.0.5 Provides integration for Twig with various Symfony components symfony/twig-bundle v6.0.3 v6.0.3 Provides a tight integration of Twig into the Symfony full-stack framework symfony/validator v6.0.5 v6.0.5 Provides tools to validate values symfony/var-dumper v6.0.5 v6.0.5 Provides mechanisms for walking through any arbitrary PHP variable symfony/var-exporter v6.0.3 v6.0.3 Allows exporting any serializable PHP data structure to plain PHP code symfony/yaml v6.0.3 v6.0.3 Loads and dumps YAML files ```

PHP version

$ php -v
PHP 8.1.2 (cli) (built: Jan 26 2022 11:25:38) (NTS)

Subject

Minimal repository with the bug

Steps to reproduce

composer require sonata-project/user-bundle:^5.0.0-rc.1

Result:

Symfony operations: 1 recipe (02a695e116bd296d4f68c67e6eeec933)
  - Configuring sonata-project/user-bundle (>=5.0.0-rc.1): From auto-generated recipe
Executing script cache:clear [KO]
 [KO]
Script cache:clear returned with error code 1
!!  
!!  In ArrayNode.php line 226:
!!                                                                          
!!    The child config "resetting" under "sonata_user" must be configured.  
!!                                                                          
!!  
!!  
Script @auto-scripts was called via post-update-cmdv

Full stack :

Exception trace:
  at /var/www/html/public/public/my_project_directory/vendor/symfony/config/Definition/ArrayNode.php:226
 Symfony\Component\Config\Definition\ArrayNode->finalizeValue() at /var/www/html/public/public/my_project_directory/vendor/symfony/config/Definition/BaseNode.php:391
 Symfony\Component\Config\Definition\BaseNode->finalize() at /var/www/html/public/public/my_project_directory/vendor/symfony/config/Definition/Processor.php:36
 Symfony\Component\Config\Definition\Processor->process() at /var/www/html/public/public/my_project_directory/vendor/symfony/config/Definition/Processor.php:46
 Symfony\Component\Config\Definition\Processor->processConfiguration() at /var/www/html/public/public/my_project_directory/vendor/sonata-project/user-bundle/src/DependencyInjection/SonataUserExtension.php:42
 Sonata\UserBundle\DependencyInjection\SonataUserExtension->load() at /var/www/html/public/public/my_project_directory/vendor/symfony/dependency-injection/Compiler/MergeExtensionConfigurationPass.php:76
 Symfony\Component\DependencyInjection\Compiler\MergeExtensionConfigurationPass->process() at /var/www/html/public/public/my_project_directory/vendor/symfony/http-kernel/DependencyInjection/MergeExtensionConfigurationPass.php:42
 Symfony\Component\HttpKernel\DependencyInjection\MergeExtensionConfigurationPass->process() at /var/www/html/public/public/my_project_directory/vendor/symfony/dependency-injection/Compiler/Compiler.php:73
 Symfony\Component\DependencyInjection\Compiler\Compiler->compile() at /var/www/html/public/public/my_project_directory/vendor/symfony/dependency-injection/ContainerBuilder.php:716
 Symfony\Component\DependencyInjection\ContainerBuilder->compile() at /var/www/html/public/public/my_project_directory/vendor/symfony/http-kernel/Kernel.php:540
 Symfony\Component\HttpKernel\Kernel->initializeContainer() at /var/www/html/public/public/my_project_directory/vendor/symfony/http-kernel/Kernel.php:769
 Symfony\Component\HttpKernel\Kernel->preBoot() at /var/www/html/public/public/my_project_directory/vendor/symfony/http-kernel/Kernel.php:128
 Symfony\Component\HttpKernel\Kernel->boot() at /var/www/html/public/public/my_project_directory/vendor/symfony/framework-bundle/Console/Application.php:166
 Symfony\Bundle\FrameworkBundle\Console\Application->registerCommands() at /var/www/html/public/public/my_project_directory/vendor/symfony/framework-bundle/Console/Application.php:72
 Symfony\Bundle\FrameworkBundle\Console\Application->doRun() at /var/www/html/public/public/my_project_directory/vendor/symfony/console/Application.php:171
 Symfony\Component\Console\Application->run() at /var/www/html/public/public/my_project_directory/vendor/symfony/runtime/Runner/Symfony/ConsoleApplicationRunner.php:54
 Symfony\Component\Runtime\Runner\Symfony\ConsoleApplicationRunner->run() at /var/www/html/public/public/my_project_directory/vendor/autoload_runtime.php:29
 require_once() at /var/www/html/public/public/my_project_directory/bin/console:11

Note: No file config/packages/sonata_user.yaml was generated at all

jordisala1991 commented 2 years ago

There is no flex recipe for the bundle atm. Also docs needs some update, but there is no bug here, you need to follow the error message and configure the bundle.

jordisala1991 commented 2 years ago

You might want to take a look at: https://github.com/Runroom/archetype-symfony/blob/main/config/packages/sonata_user.yaml for some basic defaults.