-
-
Notifications
You must be signed in to change notification settings - Fork 5.2k
Error on Cookbook #4032
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
Comments
There is no error. The form field defined in the doc puts |
@stof it's not an error in the code, but I think that @ajouve is right about being something that we should improve. Right now, this is the only information that readers can get from the code: public function buildForm(FormBuilderInterface $builder, array $options)
{
// ...
// this assumes that the entity manager was passed in as an option
$entityManager = $options['em']; "This assumes that the EM was passed ..." I don't think it's clear enough who passed it, where and how. |
What do you think about changing the comment to this:
The usage example ( |
@weaverryan I like your proposal. The new comment is definitely much better! Thank you. |
@raulfraile I see your commit related to this minor change (raulfraile@b241206) but I don't know if you finally managed to create a pull request to the symfony-docs repo. If not, can we do something to help you? Thanks! |
This issue seems to be fixed in raulfraile/symfony-docs@b241206 but it was never merged. Can we do anything about this? |
ping @raulfraile |
@javiereguiluz @xabbuh I just created a PR for this, I hope it's ok! |
* 2.3: [#5015] Very small tweak [#5011] Adding one more fix I missed [#5011] Fixing minor build issue improved link fixed intendation and shortened the link Adding a break statement to improve the sample code Added an example about how to get the impersonating user object #4032 improved comments about em option tip for mapping definition
I don't know if this is really an error, on this page:
https://github.com/symfony/symfony-docs/blob/master/cookbook/form/data_transformers.rst
or
http://symfony.com/doc/current/cookbook/form/data_transformers.html
I have an error when I am using $options['em'], the key does not exists
The text was updated successfully, but these errors were encountered: