From 6340e584b3138c8636b0bd095056cb4c52e195be Mon Sep 17 00:00:00 2001 From: Jacob Thomason Date: Tue, 21 Apr 2026 19:46:09 -0400 Subject: [PATCH] docs: fix broken anchors and stale Doctrine annotation references MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Doctrine annotation support was dropped in #677, and the relevant section headings were subsequently renamed from "annotation"/"annotations" to "attribute"/"attributes". A handful of in-repo links and wording were missed in that rename: - annotations-reference.md #[Type] section: `#input-annotation` / `#factory-annotation` → `#input` / `#factory` (sections are now `## #[Input]` and `## #[Factory]`). - authentication-authorization.mdx + fine-grained-security.mdx: `#logged-and-right-annotations` → `#logged-and-right-attributes` (section is `## #[Logged]` and `#[Right]` attributes`). - queries.mdx "About attributes": the Doctrine example was shown as `#[Query]`, which is the new-style syntax. Corrected to `@Query` and rephrased the line so the old-vs-new distinction actually reads. - annotations-reference.md intro: reworded to reflect that only the PHP 8 attribute format exists now; kept the link to the migration guide since existing users still need it. - annotations-reference.md #[Assertion]: Type column said `annotation` while the description said `attributes` — aligned to `attribute`. Intentionally left alone: CHANGELOG.md (historical), migrating.md (historical migration guide), doctrine-annotations-attributes.mdx (migration guide, still useful), and the `annotations` parameter on #[SourceField] / #[MagicField] (actual PHP parameter name in the source). PHP namespace references (TheCodingMachine\GraphQLite\ Annotations\*) are real symbol names and not stale. --- website/docs/annotations-reference.md | 8 ++++---- website/docs/authentication-authorization.mdx | 4 ++-- website/docs/fine-grained-security.mdx | 2 +- website/docs/queries.mdx | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/website/docs/annotations-reference.md b/website/docs/annotations-reference.md index 98c66c3943..bee1aec3ea 100644 --- a/website/docs/annotations-reference.md +++ b/website/docs/annotations-reference.md @@ -4,8 +4,8 @@ title: Attributes reference sidebar_label: Attributes reference --- -Note: all annotations are available in PHP 8 attribute format (`#[Query]`), support of Doctrine annotation format was dropped. -See [Doctrine annotations vs PHP 8 attributes](doctrine-annotations-attributes.mdx) for more details. +All attributes use PHP 8 native attribute syntax (e.g., `#[Query]`). The legacy Doctrine annotations format (`@Query`) is no longer supported. +See [migrating from Doctrine annotations to PHP 8 attributes](doctrine-annotations-attributes.mdx) for details. Attributes are listed in alphabetical order. @@ -21,7 +21,7 @@ It is available out of the box if you use the Symfony bundle. Attribute | Compulsory | Type | Definition ---------------|------------|------|-------- *for* | *yes* | string | The name of the PHP parameter -*constraint* | *yes | annotation | One (or many) Symfony validation attributes. +*constraint* | *yes | attribute | One (or many) Symfony validation attributes. ## #[Autowire] @@ -294,7 +294,7 @@ description | *no* | string | Description of the subscription in the do ## #[Type] The `#[Type]` attribute is used to declare a GraphQL object type. This is used with standard output -types, as well as enum types. For input types, use the [#[Input] attribute](#input-annotation) directly on the input type or a [#[Factory] attribute](#factory-annotation) to make/return an input type. +types, as well as enum types. For input types, use the [#[Input] attribute](#input) directly on the input type or a [#[Factory] attribute](#factory) to make/return an input type. **Applies on**: classes. diff --git a/website/docs/authentication-authorization.mdx b/website/docs/authentication-authorization.mdx index 9842e2a3d3..6b7012835a 100644 --- a/website/docs/authentication-authorization.mdx +++ b/website/docs/authentication-authorization.mdx @@ -10,8 +10,8 @@ queries/mutations/subscriptions or fields reserved to some users. GraphQLite offers some control over what a user can do with your API. You can restrict access to resources: -- based on authentication using the [`#[Logged]` attribute](#logged-and-right-annotations) (restrict access to logged users) -- based on authorization using the [`#[Right]` attribute](#logged-and-right-annotations) (restrict access to logged users with certain rights). +- based on authentication using the [`#[Logged]` attribute](#logged-and-right-attributes) (restrict access to logged users) +- based on authorization using the [`#[Right]` attribute](#logged-and-right-attributes) (restrict access to logged users with certain rights). - based on fine-grained authorization using the [`#[Security]` attribute](fine-grained-security.mdx) (restrict access for some given resources to some users).
diff --git a/website/docs/fine-grained-security.mdx b/website/docs/fine-grained-security.mdx index 3fac998ff4..c27f6dfb43 100644 --- a/website/docs/fine-grained-security.mdx +++ b/website/docs/fine-grained-security.mdx @@ -5,7 +5,7 @@ sidebar_label: Fine grained security --- -If the [`#[Logged]` and `#[Right]` attributes](authentication-authorization.mdx#logged-and-right-annotations) are not +If the [`#[Logged]` and `#[Right]` attributes](authentication-authorization.mdx#logged-and-right-attributes) are not granular enough for your needs, you can use the advanced `#[Security]` attribute. Using the `#[Security]` attribute, you can write an *expression* that can contain custom logic. For instance: diff --git a/website/docs/queries.mdx b/website/docs/queries.mdx index 138e4812eb..5a1f37e36a 100644 --- a/website/docs/queries.mdx +++ b/website/docs/queries.mdx @@ -44,7 +44,7 @@ As you can see, GraphQLite will automatically do the mapping between PHP types a GraphQLite relies a lot on attributes. -It supports the new PHP 8 attributes (`#[Query]`), the "Doctrine annotations" style (`#[Query]`) was dropped. +GraphQLite uses native PHP 8 attribute syntax (e.g., `#[Query]`). The legacy "Doctrine annotations" style (`@Query`) is no longer supported. ## Testing the query