Skip to content

Commit 9fdc66a

Browse files
committed
docs: fix markdown formatting (prettier)
The Lint CI job runs `prettier --check "**/*.md"` repo-wide. Reformat the files it flags: doctrine-filters.md and upgrade-guide.md (prose wrap + table alignment on recently merged content) plus the pre-existing serialization.md and state-providers.md so the gate goes green.
1 parent 6467309 commit 9fdc66a

4 files changed

Lines changed: 31 additions & 30 deletions

File tree

core/doctrine-filters.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1373,8 +1373,8 @@ class Offer
13731373
```
13741374

13751375
`DateFilter` is kept: only the declaration style changes. The URL syntax is unchanged
1376-
(`?createdAt[before]=2025-01-01`, `?createdAt[after]=2025-01-01`, and the `strictly_*` variants), and
1377-
per-property null management still applies.
1376+
(`?createdAt[before]=2025-01-01`, `?createdAt[after]=2025-01-01`, and the `strictly_*` variants),
1377+
and per-property null management still applies.
13781378

13791379
### Example: Migrating a RangeFilter
13801380

core/serialization.md

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -308,22 +308,22 @@ class Book
308308
# api/config/api_platform/resources/Book.yaml
309309
App\ApiResource\Book:
310310
normalizationContext:
311-
groups: ['get']
311+
groups: ["get"]
312312
operations:
313313
ApiPlatform\Metadata\Get: ~
314314
ApiPlatform\Metadata\Get: ~
315315
ApiPlatform\Metadata\Patch:
316316
normalizationContext:
317-
groups: ['patch']
317+
groups: ["patch"]
318318
319319
# The YAML syntax is only supported for Symfony
320320
# api/config/serializer/Book.yaml
321321
App\ApiResource\Book:
322322
attributes:
323323
name:
324-
groups: ['get', 'patch']
324+
groups: ["get", "patch"]
325325
author:
326-
groups: ['get']
326+
groups: ["get"]
327327
```
328328

329329
```xml
@@ -452,16 +452,16 @@ class Book
452452
# api/config/api_platform/resources/Book.yaml
453453
App\ApiResource\Book:
454454
normalizationContext:
455-
groups: ['book']
455+
groups: ["book"]
456456
457457
# The YAML syntax is only supported for Symfony
458458
# api/config/serializer/Book.yaml
459459
App\ApiResource\Book:
460460
attributes:
461461
name:
462-
groups: ['book']
462+
groups: ["book"]
463463
author:
464-
groups: ['book']
464+
groups: ["book"]
465465
```
466466

467467
</code-selector>
@@ -597,18 +597,18 @@ class Person
597597
# api/config/api_platform/resources/Person.yaml
598598
App\ApiResource\Person:
599599
normalizationContext:
600-
groups: ['person']
600+
groups: ["person"]
601601
denormalizationContext:
602-
groups: ['person']
602+
groups: ["person"]
603603
604604
# The YAML syntax is only supported for Symfony
605605
# api/config/serializer/Person.yaml
606606
App\ApiResource\Person:
607607
attributes:
608608
name:
609-
groups: ['person']
609+
groups: ["person"]
610610
parent:
611-
groups: ['person']
611+
groups: ["person"]
612612
```
613613

614614
</code-selector>
@@ -870,18 +870,18 @@ App\Entity\Greeting:
870870
operations:
871871
ApiPlatform\Metadata\GetCollection:
872872
normalizationContext:
873-
groups: 'greeting:collection:get'
873+
groups: "greeting:collection:get"
874874
875875
# The YAML syntax is only supported for Symfony
876876
# api/config/serializer/Greeting.yaml
877877
App\Entity\Greeting:
878878
attributes:
879879
id:
880-
groups: 'greeting:collection:get'
880+
groups: "greeting:collection:get"
881881
name:
882-
groups: 'greeting:collection:get'
882+
groups: "greeting:collection:get"
883883
sum:
884-
groups: 'greeting:collection:get'
884+
groups: "greeting:collection:get"
885885
```
886886

887887
</code-selector>
@@ -932,18 +932,18 @@ class Book
932932
# api/config/api_platform/resources/Book.yaml
933933
App\ApiResource\Book:
934934
normalizationContext:
935-
groups: ['book:output']
935+
groups: ["book:output"]
936936
denormalizationContext:
937-
groups: ['book:input']
937+
groups: ["book:input"]
938938
939939
# The YAML syntax is only supported for Symfony
940940
# api/config/serializer/Book.yaml
941941
App\ApiResource\Book:
942942
attributes:
943943
active:
944-
groups: ['book:output', 'admin:input']
944+
groups: ["book:output", "admin:input"]
945945
name:
946-
groups: ['book:output', 'book:input']
946+
groups: ["book:output", "book:input"]
947947
```
948948

949949
</code-selector>

core/state-providers.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -435,13 +435,13 @@ use the following snippet:
435435
services:
436436
# ...
437437
App\State\BlogPostProvider:
438-
tags: [ 'api_platform.state_provider' ]
438+
tags: ["api_platform.state_provider"]
439439

440440
# api/config/services.yaml
441441
services:
442442
# ...
443443
App\State\BookRepresentationProvider:
444444
arguments:
445-
$itemProvider: '@api_platform.doctrine.orm.state.item_provider'
446-
tags: [ 'api_platform.state_provider' ]
445+
$itemProvider: "@api_platform.doctrine.orm.state.item_provider"
446+
tags: ["api_platform.state_provider"]
447447
```

core/upgrade-guide.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@ upgrade to the next major a no-op.
1212

1313
The legacy Doctrine filter API is deprecated in favor of parameter-based filters declared with the
1414
`#[QueryParameter]` attribute. The `#[ApiFilter]` attribute, the `Operation::$filters` property, and
15-
the `AbstractFilter` base class (Doctrine ORM and MongoDB ODM) are all deprecated and removed in 6.0.
15+
the `AbstractFilter` base class (Doctrine ORM and MongoDB ODM) are all deprecated and removed in
16+
6.0.
1617

1718
There are two kinds of migration:
1819

1920
- **Replaced filters** — removed in 6.0, swap the class:
2021

21-
| Legacy filter | Replacement |
22-
| ------------- | ----------- |
23-
| `SearchFilter` | `ExactFilter` / `PartialSearchFilter` / `IriFilter` (depending on the strategy) |
24-
| `BooleanFilter`, `NumericFilter`, `BackedEnumFilter` | `ExactFilter` |
25-
| `OrderFilter` | `SortFilter` |
22+
| Legacy filter | Replacement |
23+
| ---------------------------------------------------- | ------------------------------------------------------------------------------- |
24+
| `SearchFilter` | `ExactFilter` / `PartialSearchFilter` / `IriFilter` (depending on the strategy) |
25+
| `BooleanFilter`, `NumericFilter`, `BackedEnumFilter` | `ExactFilter` |
26+
| `OrderFilter` | `SortFilter` |
2627

2728
- **Kept filters**`DateFilter`, `RangeFilter` and `ExistsFilter` survive. Only the way you
2829
_declare_ them is deprecated: move the declaration from `#[ApiFilter]` to `#[QueryParameter]`. The

0 commit comments

Comments
 (0)