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

[UserManagementBundle] workaround for custom user entity class #1131

Merged
merged 1 commit into from
Apr 26, 2016

Conversation

ro0NL
Copy link
Contributor

@ro0NL ro0NL commented Apr 26, 2016

Q A
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Fixed tickets ~

Fixes

The form's view data is expected to be an instance of class Kunstmaan\AdminBundle\Entity\User, but is an instance of class Company\Entity\User. You can avoid this error by setting the "data_class" option to null or by adding a view transformer that transforms an instance of class Company\Entity\User to an instance of Kunstmaan\AdminBundle\Entity\User.

at /admin/settings/users/add and #/admin/settings/users/xxx/edit

as we configured fos.user_class in config.yml

@ro0NL ro0NL changed the title workaround for custom user entity class [UserManagementBundle] workaround for custom user entity class Apr 26, 2016
@jockri jockri merged commit 108bdb9 into Kunstmaan:master Apr 26, 2016
@jockri jockri added this to the 3.5.2 milestone Apr 26, 2016
@ro0NL ro0NL deleted the bugfix/custom-user-class branch April 26, 2016 15:47
@ro0NL
Copy link
Contributor Author

ro0NL commented Apr 26, 2016

Btw, this still requires some custom ORM configuration, i.e. skipping the Kunstmaan\AdminBundle\Entity\User entity in doctrine:schema:update and such. Otherwise our custom entity conflicts (table already exists).

To clearify, we've added additional properties to our user class while we want to maintain the kuma_users table, we can alter the table now. 🎉

jockri pushed a commit that referenced this pull request Apr 27, 2016
* master:
  [Global] Add flash and modal translations (#1125)
  Documentation fix (Elasticsearch version) (#1129)
  workaround for custom user entity class (#1131)
  Load modules in sidebar (#1132)
  Instanceof check always fails with a custom user class (#1135)
  [NodeBundle]: add group by clause for mysql 5.7 for symfony 2 (#1136)
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

Successfully merging this pull request may close these issues.

None yet

2 participants