Skip to content

Commit 2d643f8

Browse files
authored
docs: fix broken anchors and stale Doctrine annotation references (#799)
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.
1 parent 5070ef9 commit 2d643f8

4 files changed

Lines changed: 8 additions & 8 deletions

File tree

website/docs/annotations-reference.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ title: Attributes reference
44
sidebar_label: Attributes reference
55
---
66

7-
Note: all annotations are available in PHP 8 attribute format (`#[Query]`), support of Doctrine annotation format was dropped.
8-
See [Doctrine annotations vs PHP 8 attributes](doctrine-annotations-attributes.mdx) for more details.
7+
All attributes use PHP 8 native attribute syntax (e.g., `#[Query]`). The legacy Doctrine annotations format (`@Query`) is no longer supported.
8+
See [migrating from Doctrine annotations to PHP 8 attributes](doctrine-annotations-attributes.mdx) for details.
99

1010
Attributes are listed in alphabetical order.
1111

@@ -21,7 +21,7 @@ It is available out of the box if you use the Symfony bundle.
2121
Attribute | Compulsory | Type | Definition
2222
---------------|------------|------|--------
2323
*for* | *yes* | string | The name of the PHP parameter
24-
*constraint* | *yes | annotation | One (or many) Symfony validation attributes.
24+
*constraint* | *yes | attribute | One (or many) Symfony validation attributes.
2525

2626
## #[Autowire]
2727

@@ -294,7 +294,7 @@ description | *no* | string | Description of the subscription in the do
294294
## #[Type]
295295

296296
The `#[Type]` attribute is used to declare a GraphQL object type. This is used with standard output
297-
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.
297+
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.
298298

299299
**Applies on**: classes.
300300

website/docs/authentication-authorization.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ queries/mutations/subscriptions or fields reserved to some users.
1010
GraphQLite offers some control over what a user can do with your API. You can restrict access to
1111
resources:
1212

13-
- based on authentication using the [`#[Logged]` attribute](#logged-and-right-annotations) (restrict access to logged users)
14-
- based on authorization using the [`#[Right]` attribute](#logged-and-right-annotations) (restrict access to logged users with certain rights).
13+
- based on authentication using the [`#[Logged]` attribute](#logged-and-right-attributes) (restrict access to logged users)
14+
- based on authorization using the [`#[Right]` attribute](#logged-and-right-attributes) (restrict access to logged users with certain rights).
1515
- based on fine-grained authorization using the [`#[Security]` attribute](fine-grained-security.mdx) (restrict access for some given resources to some users).
1616

1717
<div class="alert alert--info">

website/docs/fine-grained-security.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ sidebar_label: Fine grained security
55
---
66

77

8-
If the [`#[Logged]` and `#[Right]` attributes](authentication-authorization.mdx#logged-and-right-annotations) are not
8+
If the [`#[Logged]` and `#[Right]` attributes](authentication-authorization.mdx#logged-and-right-attributes) are not
99
granular enough for your needs, you can use the advanced `#[Security]` attribute.
1010

1111
Using the `#[Security]` attribute, you can write an *expression* that can contain custom logic. For instance:

website/docs/queries.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ As you can see, GraphQLite will automatically do the mapping between PHP types a
4444

4545
GraphQLite relies a lot on attributes.
4646

47-
It supports the new PHP 8 attributes (`#[Query]`), the "Doctrine annotations" style (`#[Query]`) was dropped.
47+
GraphQLite uses native PHP 8 attribute syntax (e.g., `#[Query]`). The legacy "Doctrine annotations" style (`@Query`) is no longer supported.
4848

4949
## Testing the query
5050

0 commit comments

Comments
 (0)