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

[Documentation] Deprecate annotations#18590

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

Conversation

@alexandre-daubois
Copy link
Member

My take on#18589, feedbacks always welcome! 🙂

Comment on lines -210 to -211
If your PHP version doesn't support attributes yet, use annotations, which is
similar but requires installing some extra dependencies in your project.
Copy link
Member

Choose a reason for hiding this comment

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

We can probably remove that paragraph from 6.2 as well. Symfony 6 does not support PHP versions that don't support attributes.

Copy link
MemberAuthor

Choose a reason for hiding this comment

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

Comment on lines 301 to 303
..deprecated::6.4

Annotations are deprecated since Symfony 6.4, use attributes instead.
Copy link
Member

Choose a reason for hiding this comment

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

Instead of adding this deprecation block, I'd remove thedoctrine/annotations dependency from the command below. We should not recommend to install that package anymore fro new applications.

``html+twig`` Twig markup blended with HTML
``html+php`` PHP code blended with HTML
``ini`` INI
``php-annotations`` 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, we will have to keep this line as long as we still have examples with annotation syntax.

Comment on lines 231 to 233
..deprecated::6.4

Annotations are deprecated since Symfony 6.4, use attributes instead.
Copy link
Member

Choose a reason for hiding this comment

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

No, just remove theaddDefaultDoctrineAnnotationReader() call from the example above.

routing.rst Outdated
Comment on lines 2651 to 2653
..deprecated::6.4

Annotations are deprecated since Symfony 6.4, use attributes instead.
Copy link
Member

Choose a reason for hiding this comment

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

Let's change the code snippets and the paragraph above to use the term "attribute(s)" instead of "annotation(s)" instead.

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

You can add:ref:`#[Groups] attributes<component-serializer-attributes-groups-annotations>`
You can add:ref:`#[Groups] attributes<component-serializer-attributes-groups-attributes>`
Copy link
Member

Choose a reason for hiding this comment

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

The extra whitespaces at the start of the line look like a mistake.

alexandre-daubois reacted with thumbs up emoji
@alexandre-dauboisalexandre-dauboisforce-pushed thedoctrine-annotations-removal branch from9918c6f to0380429CompareJuly 21, 2023 07:25
@alexandre-daubois
Copy link
MemberAuthor

Thank you for the review@derrabus, PR updated 🙂

@javiereguiluz
Copy link
Member

javiereguiluz commentedJul 21, 2023
edited
Loading

Alex, thanks for another stellar contribution 🙇 Thanks Alexander for your thorough review too!

While merging I did a minor change (seedc0ec9f) related to changes like this:

-.. _security-securing-controller-annotations:+.. _security-securing-controller-attributes:

These internal references are publicly exposed as page anchors. E.g.:https://symfony.com/doc/current/security.html#security-securing-controller-annotations

If we remove the old reference, that anchor disappears and the link "breaks" (it doesn't break, but the user is not redirect to a specific section and that can be confusing).

For these reasons, we never delete internal references, we just add new ones. Thanks!

derrabus reacted with heart emoji

@alexandre-daubois
Copy link
MemberAuthor

Got it, thank you for the explanation about link! 🙏

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

Reviewers

@xabbuhxabbuhAwaiting requested review from xabbuhxabbuh is a code owner

1 more reviewer

@derrabusderrabusderrabus requested changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

6.4

Development

Successfully merging this pull request may close these issues.

4 participants

@alexandre-daubois@javiereguiluz@derrabus@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp