Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Validator] Add docs for bridge twig validator #20836#20863

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged

Conversation

sfmok
Copy link
Contributor

This pull request adds documentation for the new Twig Validator constraint introduced in the Twig Bridge.

Changes:

  • Added a page to document the Twig validator constraint, including:
  • Installation instructions for the symfony/twig-bridge package.
  • Usage of the constraint in Symfony applications.
  • Detailed options available, includingmessage andskipDeprecations.
  • Updatedindex.rst to include the new page under the "Topics" section for theTwig Bridge.

Related Issue:
Issue #20836 - Add docs for Twig validator

Related PR:
Symfony PR #58805 – Introduced the Twig validator constraint in the Twig Bridge.

rvanlaak reacted with rocket emoji
@carsonbotcarsonbot added this to the7.3 milestoneApr 7, 2025
Comment on lines 23 to 25
Twig template:

.. code-block:: php
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
Twig template:
..code-block::php
Twig template::

sfmok reacted with thumbs up emoji
Comment on lines 53 to 55
set this to `false`.

.. code-block:: php
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
set this to `false`.
..code-block::php
set this to `false`::

sfmok reacted with thumbs up emoji
@sfmoksfmokforce-pushed thedocs/bridge-twig-validator branch from90b3c8e to7f3faf7CompareApril 8, 2025 18:54
@sfmoksfmokforce-pushed thedocs/bridge-twig-validator branch from7f3faf7 toac9e20cCompareApril 8, 2025 19:05
@sfmok
Copy link
ContributorAuthor

@OskarStark done, but I think this#20872 needs to be merged first

OskarStark reacted with thumbs up emoji

@carsonbotcarsonbot changed the titleAdd docs for bridge twig validator #20836[Validator] Add docs for bridge twig validator #20836Apr 10, 2025
@javiereguiluzjaviereguiluz merged commit6a73077 intosymfony:7.3Apr 10, 2025
2 of 3 checks passed
@sfmoksfmok deleted the docs/bridge-twig-validator branchApril 10, 2025 07:16
@javiereguiluz
Copy link
Member

@sfmok thanks a lot for contributing these docs!

Your contribution was perfectly correct, but we changed some things while merging. The fact that this constraint is stored in the Twig Bridge is an "implementation detail" that most users don't care about. We have other similar constraints (e.g.UniqueEntity from Doctrine Bridge) that are documented like a normal constraint, without explaining in detail that it belongs to a bridge.

So, we made some changes (see344d8ba) to remove the newtwig_bridge/ docs and move the contents toreference/constraints/Twig.rst.

Also, even if the constraint page titles only use the name of the constraint (e.g. justJson,IsNull, etc.) we decided to title the new page asTwig Constraint to avoid confusion with the pages related to Twig templating (in Google search results, in symfony.com search engine, etc.)

Thanks!

sfmok reacted with thumbs up emoji

@sfmok
Copy link
ContributorAuthor

@sfmok thanks a lot for contributing these docs!

Your contribution was perfectly correct, but we changed some things while merging. The fact that this constraint is stored in the Twig Bridge is an "implementation detail" that most users don't care about. We have other similar constraints (e.g.UniqueEntity from Doctrine Bridge) that are documented like a normal constraint, without explaining in detail that it belongs to a bridge.

So, we made some changes (see344d8ba) to remove the newtwig_bridge/ docs and move the contents toreference/constraints/Twig.rst.

Also, even if the constraint page titles only use the name of the constraint (e.g. justJson,IsNull, etc.) we decided to title the new page asTwig Constraint to avoid confusion with the pages related to Twig templating (in Google search results, in symfony.com search engine, etc.)

Thanks!

Got it, that makes perfect sense. Thanks!

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

@OskarStarkOskarStarkOskarStark left review comments

Assignees
No one assigned
Projects
None yet
Milestone
7.3
Development

Successfully merging this pull request may close these issues.

4 participants
@sfmok@javiereguiluz@OskarStark@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp