security:
    password_hashers:
        Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface: 'auto'
    
    providers:
        users_in_memory:
            memory: ~
    
    firewalls:
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false
        
        main:
            lazy: true
            provider: users_in_memory
            stateless: true  # Ensure stateless to prevent session usage

    access_control:
        # Remove IP restriction from here since it will be handled by the listener
        - { path: ^/, roles: PUBLIC_ACCESS }  # Allow public access, listener will handle /api restrictions

when@test:
    security:
        password_hashers:
            Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface:
                algorithm: auto
                cost: 4
                time_cost: 3
                memory_cost: 10