Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[instanceOf] Resolve Doctrine entities to the real class name #92

Closed
victorb opened this issue Aug 1, 2014 · 1 comment
Closed

[instanceOf] Resolve Doctrine entities to the real class name #92

victorb opened this issue Aug 1, 2014 · 1 comment

Comments

@victorb
Copy link
Contributor

victorb commented Aug 1, 2014

Currently, when using instanceOf validator with Doctrine entities, it will always fail since Doctrine is using Proxy classes (See: http://docs.doctrine-project.org/en/2.0.x/reference/working-with-objects.html ). Is possible to get real class name by using ClassUtils::getRealClass (From: http://stackoverflow.com/a/14895345/360186 )

@vlucas
Copy link
Owner

vlucas commented Aug 1, 2014

I am not going to build something specific for a single project into Valitron. A possible solution here though is to allow for a closure as the class name instead of just a string or object. Then, you could create all that extra code that Doctrine requires yourself :p.

@victorb victorb closed this as completed Jun 17, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants