Skip to content

Document how to create a custom type guesser #3597

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

Merged
merged 3 commits into from
Mar 9, 2014

Conversation

wouterj
Copy link
Member

@wouterj wouterj commented Feb 22, 2014

Q A
Doc fix? no
New docs? yes
Applies to all
Fixed tickets #481

* :method:`Symfony\\Component\\Form\\FormTypeGuesserInterface::guessMaxLength` -
tries to guess the value of the ``max_length`` option;
* :method:`Symfony\\Component\\Form\\FormTypeGuesserInterface::guessPattern` -
tries to guess the value of the ``pattern`` option.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could link the option to their descriptions in the reference docs

@xabbuh
Copy link
Member

xabbuh commented Feb 22, 2014

👍 Great work! But I am wondering if this article should be moved to the cookbook.

@wouterj
Copy link
Member Author

wouterj commented Feb 22, 2014

But I am wondering if this article should be moved to the cookbook.

It's independent of the framework and very usefull if you are using the form component standalone.

@xabbuh
Copy link
Member

xabbuh commented Feb 22, 2014

It's independent of the framework and very usefull if you are using the form component standalone.

Actually, this also applies to a lot of cookbook articles, doesn't it?

@wouterj
Copy link
Member Author

wouterj commented Feb 22, 2014

this also applies to a lot of cookbook articles, doesn't it?

Only a few are fully framework independant and I really want to move them to the components section

---------------------

In this section, you are going to build a PHPDoc type guesser. At first, you
need to create a class which extends
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wich implements

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

AND, how about we change the header to "Create a PHPDoc Type Guesser" and then remove the first sentence (or replace it with something describing what this means - e.g. "In this section, you are going to build a guesser that reads information about fields from the PHPDoc above the properties").

@wouterj
Copy link
Member Author

wouterj commented Mar 9, 2014

Thank you, @weaverryan @xabbuh @ggam. I've fixed all of your comments.

@weaverryan
Copy link
Member

Awesome! So many new pieces coming into the docs lately - thanks!

weaverryan added a commit that referenced this pull request Mar 9, 2014
This PR was merged into the 2.3 branch.

Discussion
----------

Document how to create a custom type guesser

| Q   | A
| --- | ---
| Doc fix? | no
| New docs? | yes
| Applies to | all
| Fixed tickets | #481

Commits
-------

0d37a3b Applied comments
3b3cd6f Added references
f36fdb7 Documented FormTypeGuesserInterface
@weaverryan weaverryan merged commit 0d37a3b into symfony:2.3 Mar 9, 2014
@wouterj wouterj deleted the issue_481 branch March 9, 2014 22:04
@wouterj
Copy link
Member Author

wouterj commented Mar 9, 2014

@weaverryan yeah, I decided it was time to clear up the milestones. My goal is to have all milestoned issues at least tagged with "has pr" when 2.5 is released.

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.

4 participants