Skip to content

Conversation

@alexmart
Copy link

Q A
Doc fix? no
New docs? no
Applies to >= 2.3
Fixed tickets #4144
@alexmart alexmart changed the title [WIP][Constraints] Add shorter examples using the default option [WIP][Validator] Add shorter examples using the default option May 21, 2016

.. configuration-block::

.. code-block:: php-annotations
Copy link
Member

Choose a reason for hiding this comment

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

I think you can still use the "default" option version - i.e.:

/**  * @Assert\Type("integer", message="The value..")  */

Obviously, this doesn't apply to all formats (like YAML)

@alexmart
Copy link
Author

I made some new changes. Already spotted some formatting mistakes.

@weaverryan regarding your previous comment, should I add the message part for the simple examples? I thought the idea is to show the simplest thing that works.

@alexmart alexmart changed the title [WIP][Validator] Add shorter examples using the default option [Validator] Add shorter examples using the default option Jun 2, 2016
than ``18``, you could do the following:
The following constraints ensure that:
- the number of ``siblings`` of a ``Person`` is greater than ``5``
- the ``age`` of a ``Person`` class is greater than ``18``
Copy link
Member

Choose a reason for hiding this comment

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

we commonly use * as list indicator (can be fixed during the merge though)

@wouterj
Copy link
Member

wouterj commented Jun 24, 2016

👍 I like it a lot

Status: Reviewed

If you want to ensure that the ``age`` of a ``Person`` class is greater
than ``18``, you could do the following:
The following constraints ensure that:
- the number of ``siblings`` of a ``Person`` is greater than ``5``
Copy link
Member

Choose a reason for hiding this comment

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

Please leave a blank line before the list items. Otherwise, it will be displayed like this:

rst_syntax_error

xabbuh added a commit that referenced this pull request Jun 30, 2016
… (alexmart) This PR was submitted for the 2.3 branch but it was merged into the 2.7 branch instead (closes #6597). Discussion ---------- [Validator] Add shorter examples using the default option | Q | A | ------------- | --- | Doc fix? | no | New docs? | no | Applies to | >= 2.3 | Fixed tickets | #4144 Commits ------- d3cde84 [Validator] Add shorter examples using the default option
xabbuh added a commit that referenced this pull request Jun 30, 2016
@xabbuh
Copy link
Member

xabbuh commented Jun 30, 2016

Thank you @alexmart. I have merged your pull request into the 2.7 branch (the oldest still maintained branch) and made the requested changes in 04edf66.

@xabbuh xabbuh closed this Jun 30, 2016
xabbuh added a commit that referenced this pull request Jun 30, 2016
* 2.7: [#6597] some tweaks [Validator] Add shorter examples using the default option Typo fix Updated the CS rule about return null; and return; Update date.rst - Fixes typo NullOutput should be passed to $command->run() Hard values for the driver option
xabbuh added a commit that referenced this pull request Jun 30, 2016
* 2.8: [#6597] some tweaks [Validator] Add shorter examples using the default option Typo fix Add missing parameter Updated the CS rule about return null; and return; [#6690] fix syntax error Update date.rst - Fixes typo [#6690] add versionadded directive Added an example for a different method of verbosity level usage. NullOutput should be passed to $command->run() Hard values for the driver option Fix ldap security examples
xabbuh added a commit that referenced this pull request Jun 30, 2016
* 3.0: [#6597] some tweaks [Validator] Add shorter examples using the default option Typo fix Add missing parameter Updated the CS rule about return null; and return; [#6690] fix syntax error Update date.rst - Fixes typo [#6690] add versionadded directive Added an example for a different method of verbosity level usage. NullOutput should be passed to $command->run() Hard values for the driver option Fix ldap security examples
xabbuh added a commit that referenced this pull request Jun 30, 2016
* 3.1: [#6597] some tweaks [Validator] Add shorter examples using the default option Typo fix Added the documentation for the Cache component Add missing parameter Updated the CS rule about return null; and return; [#6690] fix syntax error Update date.rst - Fixes typo [#6690] add versionadded directive Added an example for a different method of verbosity level usage. NullOutput should be passed to $command->run() Hard values for the driver option Fix ldap security examples
chancegarcia pushed a commit to chancegarcia/symfony-docs that referenced this pull request Jul 2, 2016
@alexmart
Copy link
Author

alexmart commented Jul 5, 2016

Thanks everybody for helping me with my first contribution!

@xabbuh
Copy link
Member

xabbuh commented Jul 5, 2016

@alexmart We are happy to have you onboard. Hope we see you again with some other nice contribution. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

6 participants