Closed 4d4ch4u32 closed 6 months ago
Hi!
Can you post what your security.yaml
looks like at the time of running the command? It may be part of the cause (the error is about trying to update that file)
Cheers!
This is the content of the security.yaml
:
security:
# role_hierarchy:
# ROLE_ADMIN: [ROLE_USER]
#
# enable_authenticator_manager: true
# # https://symfony.com/doc/current/security.html#registering-the-user-hashing-passwords
# password_hashers:
# Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
# App\Entity\User:
# algorithm: auto
#
# # https://symfony.com/doc/current/security.html#loading-the-user-the-user-provider
# providers:
# # used to reload user from session & other features (e.g. switch_user)
# app_user_provider:
# id: App\Security\UserProvider
firewalls:
dev:
pattern: ^/(_(profiler|wdt)|css|images|js)/
security: false
# api:
# pattern: ^/api/
# stateless: true
# provider: app_user_provider
# jwt: ~
# main:
# stateless: true
# provider: app_user_provider
# json_login:
# check_path: /authentication_token
# username_path: email
# password_path: password
# success_handler: lexik_jwt_authentication.handler.authentication_success
# failure_handler: lexik_jwt_authentication.handler.authentication_failure
# activate different ways to authenticate
# https://symfony.com/doc/current/security.html#the-firewall
# https://symfony.com/doc/current/security/impersonating_user.html
# switch_user: true
# Easy way to control access for large sections of your site
# Note: Only the *first* access control that matches will be used
access_control:
- { path: ^/docs, roles: PUBLIC_ACCESS } # Allows accessing the Swagger UI
- { path: ^/authentication_token, roles: PUBLIC_ACCESS }
#- { path: ^/api, roles: IS_AUTHENTICATED_FULLY }
when@test:
security:
password_hashers:
# By default, password hashers are resource intensive and take time. This is
# important to generate secure password hashes. In tests however, secure hashes
# are not important, waste resources and increase test times. The following
# reduces the work factor to the lowest possible values.
Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
algorithm: auto
cost: 4 # Lowest possible value for bcrypt
time_cost: 3 # Lowest possible value for argon
memory_cost: 10 # Lowest possible value for argon
thanks! I'm wondering if some of those comments are confusing the system.
If you have some time, you could try to create a reproducer test case for YamlSourceManipulator. It's quite easy: create a new file - like this one - https://github.com/symfony/maker-bundle/blob/main/tests/Util/yaml_fixtures/add_array_to_null.test - the 3 sections represent the "starting YAML", the "changes we make to the data", then the final YAML expected. If you create a file in that directory, the YamlSourceManipulatorTest
will automatically run it.
Cheers!
Source Yaml:
security:
firewalls:
dev:
security: false
# main: <------------ Comment is the cause
access_control:
- path
Symfony version(s) affected
6.2.5
Description
php bin/console make:user
fails with errorThe indentation must be greater than zero.
.I'm using Symfony in combination with api-platform and doctrine. All yaml files are validated successfully.
How to reproduce
Command with values I used:
Possible Solution
No response
Additional Context