Php Symfony2 SonataAdmin和x2B;PROD环境中具有特定角色的EDBlogBundle

Php Symfony2 SonataAdmin和x2B;PROD环境中具有特定角色的EDBlogBundle,php,symfony,security,sonata,Php,Symfony,Security,Sonata,我今天切换到prod环境并开始测试。我的管理员用户一切都很好。问题是当我切换到另一个用户时,该用户具有角色提供者。此用户只能在管理面板中添加或导入产品。但是,当我转到管理仪表板时,会出现以下错误: Warning: Missing argument 1 for Sonata\AdminBundle\Admin\Admin::__construct(), called in C:\wamp\www\karpedeal_b2c\vendor\ed\blog-bundle\Security\Auth

我今天切换到prod环境并开始测试。我的管理员用户一切都很好。问题是当我切换到另一个用户时,该用户具有角色
提供者
。此用户只能在管理面板中添加或导入产品。但是,当我转到管理仪表板时,会出现以下错误:

 Warning: Missing argument 1 for Sonata\AdminBundle\Admin\Admin::__construct(), called in C:\wamp\www\karpedeal_b2c\vendor\ed\blog-bundle\Security\Authorization\Voter\ArticleVoter.php on line 37 and defined in C:\wamp\www\karpedeal_b2c\app\cache\prod\classes.php on line 5473
不知道发生了什么,因为在开发环境中一切都正常。我可以与供应商用户登录,导入产品等。。。在普罗德,我不能

出于某种原因,它正在尝试访问博客捆绑包中的某些内容,但是该用户没有任何博客权限。。。那有什么问题

role_hierarchy:
        ROLE_PROVIDER:    [ROLE_USER, ROLE_SONATA_PROVIDER]
        ROLE_ADMIN:       [ROLE_USER, ROLE_SONATA_PROVIDER, ROLE_SONATA_ADMIN, ROLE_BLOG_USER, ROLE_BLOG_ADMIN]
        ROLE_SUPER_ADMIN: [ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
        ROLE_SONATA_PROVIDER:
            - ROLE_MP_SHOP_ADMIN_PRODUCT_LIST
            - ROLE_MP_SHOP_ADMIN_PRODUCT_VIEW
            - ROLE_MP_SHOP_ADMIN_IMPORTER_LIST
            - ROLE_MP_SHOP_ADMIN_IMPORT_SCHEMA_CREATE
            - ROLE_MP_SHOP_ADMIN_IMPORT_SCHEMA_LIST
        SONATA:
            - ROLE_SONATA_PAGE_ADMIN_PAGE_EDIT  # if you are using acl then this line must be commented
        ROLE_SONATA_EMPLOYEE:
            - ROLE_MP_SHOP_ADMIN_PRODUCT_LIST
            - ROLE_MP_SHOP_ADMIN_PRODUCT_VIEW

firewalls:
        # disables authentication for assets and the profiler, adapt it according to your needs
        dev:
            pattern: ^/(_(profiler|wdt)|css|images|js)/
            security: false

        admin:
            pattern:            /admin(.*)
            context:            user
            form_login:
                provider:       fos_userbundle
                login_path:     /admin/login
                use_forward:    false
                check_path:     /admin/login_check
                failure_path:   null
            logout:
                path:           /admin/logout
            anonymous:          true

        main:
            pattern:             ^/
            context:             user
            form_login:
                provider:       fos_userbundle
                csrf_provider: form.csrf_provider
                login_path:     /login
                #use_forward:    false
                check_path:     fos_user_security_check
                #failure_path:   null
                always_use_default_target_path: false
                default_target_path: profile
            logout:
                path:   fos_user_security_logout
            oauth:
                resource_owners:
                    facebook:      "/login/check-facebook"
                login_path:        /login
                failure_path:      /login
                oauth_user_provider:
                    service: my_user_provider
            anonymous:          true
        default:
            anonymous: ~
            # activate different ways to authenticate
    access_control:
        # URL of FOSUserBundle which need to be available to anonymous users
        - { path: ^/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/register, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/resetting, role: IS_AUTHENTICATED_ANONYMOUSLY }

        # Admin login page needs to be access without credential
        - { path: ^/admin/login$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin/logout$, role: IS_AUTHENTICATED_ANONYMOUSLY }
        - { path: ^/admin/login_check$, role: IS_AUTHENTICATED_ANONYMOUSLY }

        # Secured part of the site
        # This config requires being logged for the whole site and having the admin role for the admin part.
        # Change these rules to adapt them to your needs
        - { path: ^/admin/, role: [ROLE_PROVIDER, ROLE_ADMIN, ROLE_SONATA_ADMIN, ROLE_SONATA_PROVIDER] }
        - { path: ^/.*, role: IS_AUTHENTICATED_ANONYMOUSLY }

    acl:
        connection: default
更新:

更改AppKernel
$kernel=new AppKernel('prod',true)时一切正常,所以调试器导致了问题?这怎么可能