8000 [Validator] Added documentation for Traverse constraint by HeahDude · Pull Request #11310 · symfony/symfony-docs · GitHub
[go: up one dir, main page]

Skip to content

[Validator] Added documentation for Traverse constraint #11310

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 1 commit into from
Apr 6, 2019

Conversation

HeahDude
Copy link
Contributor
@HeahDude HeahDude commented Apr 6, 2019
versionadded:: 2.5

    The traverse constraint has been added in Symfony 2.5

x)

@HeahDude HeahDude added Validator ⭐️ EU-FOSSA Hackathon https://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming labels Apr 6, 2019
@HeahDude HeahDude added this to the 3.4 milestone Apr 6, 2019
@HeahDude HeahDude self-assigned this Apr 6, 2019
@wouterj wouterj force-pushed the validator/traverse branch from e7391ba to 86ee59e Compare April 6, 2019 13:31
@wouterj
Copy link
Member
wouterj commented Apr 6, 2019

Woohoo, yet another undocumented feature documented! #EUFOSSA

@wouterj wouterj merged commit 86ee59e into symfony:3.4 Apr 6, 2019
wouterj added a commit that referenced this pull request Apr 6, 2019
…t (HeahDude)

This PR was squashed before being merged into the 3.4 branch (closes #11310).

Discussion
----------

[Validator] Added documentation for Traverse constraint

```rst
versionadded:: 2.5

    The traverse constraint has been added in Symfony 2.5
```
x)

Commits
-------

86ee59e [Validator] Added documentation for Traverse constraint
@HeahDude HeahDude deleted the validator/traverse branch April 6, 2019 14:03
+----------------+-------------------------------------------------------------------------------------+
| Options | - `payload`_ |
+----------------+-------------------------------------------------------------------------------------+
| Class | :class:`Symfony\\Bridge\\Doctrine\\Validator\\Constraints\\Traverse` |
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, why isn't there any dedicated validator for this specific constraint?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

See #11320. Like Valid those constraints are handled by the recursive context itself to define the cascade strategy, so do not need custom validator.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ooh, TIL, thanks 😄

xabbuh added a commit that referenced this pull request Apr 6, 2019
xabbuh added a commit that referenced this pull request Apr 6, 2019
* 3.4:
  [#11310] fix reference
  [#11325] Use correct line lengths
  Link to review comments documentation
xabbuh added a commit that referenced this pull request Apr 6, 2019
* 4.2:
  [#11310] fix reference
@guilliamxavier
Copy link
Contributor

Sorry to be late (and thanks for improving the docs) but it seems that it doesn't work that way... the example throws;

Symfony\Component\Validator\Exception\ConstraintDefinitionException: "Traversal was enabled for "App\Entity\Book", but this class does not implement "\Traversable"." at [...]/vendor/symfony/validator/Validator/RecursiveContextualValidator.php

HeahDude added a commit that referenced this pull request Apr 12, 2020
This PR was merged into the 3.4 branch.

Discussion
----------

[Validator] Fixed `Traverse` constraint reference

I'm sorry I've messed up things in #11310. Now I see that I missed #12967, this fixes it.

Commits
-------

ef5c989 [Validator] Fixed `Traverse` constraint reference
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⭐️ EU-FOSSA Hackathon https://symfony.com/blog/the-symfony-and-api-platform-hackathon-is-coming Status: Reviewed Validator
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants
0