Symfony 2缓存清除错误

Symfony 2 cache clearing error

我的 Symfony 2 网站最近在尝试清除缓存时遇到问题。我在终端中输入以下命令:

php app/console cache:clear

并得到以下错误:

[Symfony\Component\Config\Definition\Exception\InvalidConfigurationException]
No authentication listener registered for firewall "dev".

感谢任何帮助!

这是我的 security.yml 文件:

security:
encoders:
    FOS\UserBundle\Model\UserInterface: bcrypt

role_hierarchy:
    ROLE_USER:       ROLE_USER
    ROLE_SUPER_ADMIN: ROLE_ADMIN

providers:
    fos_userbundle:
        id: fos_user.user_provider.username

firewalls:
    dev:
        pattern:  ^/(css|images|js)/
    main:
        pattern: ^/
        form_login:
            provider: fos_userbundle
            csrf_provider: security.csrf.token_manager # Use form.csrf_provider instead for Symfony <2.4
            success_handler: Redirectionpages

        logout:      

            success_handler: Redirectionpages
        anonymous:    true

access_control:
    - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }
    - { path: ^/admin/, role: ROLE_ADMIN }

尝试禁用指定防火墙的安全性,所以尝试此行:

dev:
    pattern:  ^/(css|images|js)/
    security: false

希望对您有所帮助