-
Notifications
You must be signed in to change notification settings - Fork 139
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
Rewrite the symfony/form integration #66
Comments
I'm working on a PR for this, using symfony forms |
I have added support for Symfony Forms, it can use a custom translator and also, if installed, it uses symfony/translation to translate the labels of the form. I have one problem though, Address doesn't have setters using the standard set* functions, so the Symfony property accessor used by Symfony fails. I have arguably added a magic setter here as a workaround but maybe we should add the proper setters to Address or we could leave it alone and not use a data_class in AddressType to prevent more coupling with Symfony. Have a look at 78c70fd and we can discuss further or if you're happy with it I can prepare a PR. I think I will also be working on a Symfony Bundle using Addressing |
Great! I'm out of town so I won't be able to look at the code for another day or two. For the Address setter problem you want to define a custom data mapper, as described here: https://webmozart.io/blog/2015/09/09/value-objects-in-symfony-forms/ |
Sorry for the radio silence. I though of that, but I don't like using a custom mapper if the entity has it's own setters and getters, specially when we have trouble just with the setters. Let me know your thoughts. |
Any update on the PR? |
@abdfork Sorry, I've definitely been the bottleneck for this issue. A big reason for that is because I personally don't use Symfony (Forms). Thinking about it some more, I definitely think that the form integration should live in the Symfony Bundle (which registers our repositories and formatters in the container, provides the form bits, etc). Would you be willing to create and maintain one? I could then link it from the README here. Pointing #44 to this issue, since it was about the old form integration's inability to have translated labels. Also pointing #55, which has a reasonable feature request (allow to choose which address fields will be rendered). |
Hey there |
Looks like the bundle to follow is https://github.com/daften/addressing-bundle |
The old integration was removed in 8b770ff.
Needs to be updated for the new subdivision storage, and for Symfony 3.0.
Also needs to be finished, in regards to AJAX.
The Drupal form implementation is a good one to investigate, but it won't be a 1-1 mapping cause symfony/form is a lot less flexible.
The text was updated successfully, but these errors were encountered: