I'm guessing the object with id, name and members properties is a Group (or
something similar), which is your Member object references once or many
times? And the properties on that Group entity are private?

When a token is serialized, it in turn attempts to serialize your user
object with it. That means referenced entities/documents as well. Doctrine
uses Proxy objects to take the place of referenced entities/documents, which
basically holds its id. Once you attempt to access any other fields on the
Proxy object, Doctrine will issue a query to lazy-load the entire object.
For whatever reason, Proxy objects contain a __sleep() implementation that
references all of the properties in your parent class.

The problem you're seeing leads me to assume that your entity class (I'm
calling it Group) being proxied has its properties declared as private,
instead of protected. That would make the extending proxy class' __sleep()
method unable to access them, and throw this obscure error.

On Thu, Apr 28, 2011 at 9:16 AM, Louardi Abdeltif <[email protected]
> wrote:

> I have a problem in this file AbstractToken.php
>
> Notice: serialize() [function.serialize]: "id" returned as member variable
> from __sleep() but does not exist in
> PATH/vendor/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php
> on line 136
> Notice: serialize() [function.serialize]: "name" returned as member
> variable from __sleep() but does not exist in
> PATH/vendor/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php
> on line 136
> Notice: serialize() [function.serialize]: "members" returned as member
> variable from __sleep() but does not exist in
> PATH/vendor/symfony/src/Symfony/Component/Security/Core/Authentication/Token/AbstractToken.php
> on line 136
>
> my security.yml
> security:
>     encoders:
>         Application\HomeBundle\Entity\Member:
>             algorithm: plaintext
>
>     role_hierarchy:
>         ROLE_ADMIN:       ROLE_USER
>         ROLE_SUPER_ADMIN: [ROLE_USER, ROLE_ADMIN, ROLE_ALLOWED_TO_SWITCH]
>
>     providers:
>        main:
>             entity: { class: Application\HomeBundle\Entity\Member,
> property: username }
>
>     firewalls:
>         profiler:
>             pattern:  ^/_profiler
>             security: false
>
>         wdt:
>             pattern:  ^/_wdt
>             security: false
>
>         file:
>             pattern:  ^/file
>             security: false
>
>         login:
>             pattern:  ^/login$
>             security: false
>
>         my_secure_area:
>             pattern: /.*
>             form_login:
>                 check_path:                     /login_check
>                 login_path:                     /login
>             logout: true
>
>     access_control:
>         #- { path: /login, roles: IS_AUTHENTICATED_ANONYMOUSLY,
> requires_channel: https }
>
> --
> If you want to report a vulnerability issue on symfony, please send it to
> security at symfony-project.com
>
> You received this message because you are subscribed to the Google
> Groups "symfony developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/symfony-devs?hl=en
>



-- 
jeremy mikola

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

You received this message because you are subscribed to the Google
Groups "symfony developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/symfony-devs?hl=en

Reply via email to