Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/1_Support_question.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
name: ⛔ Support Question
about: See https://api-platform.com/support/ for questions about using API Platform
about: See https://api-platform.com/community/ for questions about using API Platform
---

# Support question

We use GitHub issues only to discuss bugs and new features. For this kind of questions about using
API Platform, please use any of the support alternatives shown in
[API Platform support](https://api-platform.com/support/).
[API Platform support](https://api-platform.com/community/).

Thanks!
2 changes: 1 addition & 1 deletion admin/advanced-customization.md
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ backend agnostic, fully customizable solutions to common Admin requirements.

Here are some examples, from the simplest to the most complete solutions:

- [PrevNextButton](https://marmelab.com/react-admin/PrevNextButton.html)
- [PrevNextButtons](https://marmelab.com/react-admin/PrevNextButtons.html)
- [MenuLive](https://marmelab.com/react-admin/MenuLive.html)
- [FilterList](https://marmelab.com/react-admin/FilterList.html)
- [RevisionsButton](https://marmelab.com/react-admin/RevisionsButton.html)
Expand Down
2 changes: 1 addition & 1 deletion core/content-negotiation.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ defined in the `formats` configuration key (see below). If the request format is
returned.

Examples showcasing how to use the different mechanisms are available
[in the API Platform test suite](https://github.com/api-platform/core/blob/main/features/main/content_negotiation.feature).
[in the API Platform test suite](https://github.com/api-platform/core/blob/main/tests/Functional/ContentNegotiationTest.php).

## Configuring Formats Globally

Expand Down
2 changes: 1 addition & 1 deletion core/deprecations.md
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ properties:
[a `deprecated` property](https://swagger.io/docs/specification/2-0/paths-and-operations/) will be
added
- With GraphQL, the
[`isDeprecated` and `deprecationReason` properties](https://facebook.github.io/graphql/June2018/#sec-Deprecation)
[`isDeprecated` and `deprecationReason` properties](https://spec.graphql.org/June2018/#sec-Deprecation)
will be added to the schema

## Setting the `Sunset` HTTP Header to Indicate When a Resource or an Operation Will Be Removed
Expand Down
2 changes: 1 addition & 1 deletion core/external-vocabularies.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ according to the specified attributes:
```

An extended list of existing open vocabularies is available on
[the Linked Open Vocabularies (LOV) database](https://lov.linkeddata.es/dataset/lov/).
[the Linked Open Vocabularies (LOV) database](https://lov.linkeddata.es/dataset/lov/vocabs).

By default, when using [validations](validation.md) API Platform will try to define known
[Schema.org](https://schema.org) types as IRIs for your properties if you did not provide any in
Expand Down
4 changes: 2 additions & 2 deletions core/graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -669,7 +669,7 @@ Note also that:
- If you have added your [own custom types](#custom-types), you can use them directly for your
arguments types (it's the case here for `DateTime`).
- You can also add a custom description for your custom arguments. You can see the
[field arguments documentation](https://webonyx.github.io/graphql-php/type-system/object-types/#field-arguments)
[field arguments documentation](https://webonyx.github.io/graphql-php/type-definitions/object-types/#field-argument-configuration-options)
for more options.

The arguments you have defined or the default ones and their value will be in `$context['args']` of
Expand Down Expand Up @@ -798,7 +798,7 @@ The arguments will be in `$context['args']['input']` of your resolvers.
## Subscriptions

Subscriptions are an
[RFC](https://github.com/graphql/graphql-spec/blob/master/rfcs/Subscriptions.md#rfc-graphql-subscriptions)
[RFC](https://github.com/graphql/graphql-wg/blob/main/rfcs/Subscriptions.md#rfc-graphql-subscriptions)
to allow a client to receive pushed realtime data from the server.

In API Platform, the built-in subscription support is handled by using
Expand Down
3 changes: 1 addition & 2 deletions core/json-schema.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ documents. A variant of JSON Schema is also used [in OpenAPI specifications](ope
API Platform provides an infrastructure to generate JSON Schemas for any resource, represented in
any format (including JSON-LD). The generated schema can be used with libraries such as
[react-json-schema-form](https://github.com/rjsf-team/react-jsonschema-form) to build forms for the
documented resources, or to
[be used for validation](https://json-schema.org/implementations.html#validators).
documented resources, or to [be used for validation](https://json-schema.org/tools).

## Generating a JSON Schema

Expand Down
2 changes: 1 addition & 1 deletion core/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ particular its
to leverage all the possibilities of the database.

Doctrine MongoDB ODM 2 relies on the [mongodb](https://secure.php.net/manual/en/set.mongodb.php) PHP
extension and not on the legacy [mongo](https://secure.php.net/manual/en/book.mongo.php) extension.
extension and not on the legacy [mongo](https://pecl.php.net/package/mongo) extension.

## Enabling MongoDB Support

Expand Down
4 changes: 2 additions & 2 deletions core/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ yet support v3.2.0, you can ask for the legacy v3.0.0 format instead thanks to t
query parameter: `/docs.jsonopenapi?spec_version=3.0.0`

It also integrates a customized version of [Swagger UI](https://swagger.io/swagger-ui/),
[ReDoc](https://rebilly.github.io/ReDoc/) and
[ReDoc](https://redocly.github.io/redoc/) and
[Scalar API Reference](https://github.com/scalar/scalar), some nice tools to display the API
documentation in a user friendly way.

Expand Down Expand Up @@ -614,7 +614,7 @@ resources:
## Choosing Between Swagger UI, ReDoc and Scalar

When the HTML format is served, API Platform can render three different documentation UIs:
[Swagger UI](https://swagger.io/swagger-ui/), [ReDoc](https://rebilly.github.io/ReDoc/) and
[Swagger UI](https://swagger.io/swagger-ui/), [ReDoc](https://redocly.github.io/redoc/) and
[Scalar API Reference](https://github.com/scalar/scalar). All three are backed by the same
documentation route (`/docs` by default) and the same generated OpenAPI document; which one is
rendered is chosen with the `ui` query parameter, for instance:
Expand Down
8 changes: 4 additions & 4 deletions core/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
## Enabling the Built-in HTTP Cache Invalidation System

Exposing a hypermedia API has
[many advantages](http://blog.theamazingrando.com/in-band-vs-out-of-band.html). One is the ability
to know exactly which resources are included in HTTP responses created by the API. We used this
specificity to make API Platform apps blazing fast.
[many advantages](https://blog.theamazingrando.com/posts/in-band-vs-out-of-band.html). One is the
ability to know exactly which resources are included in HTTP responses created by the API. We used
this specificity to make API Platform apps blazing fast.

When the cache mechanism [is enabled](configuration.md), API Platform collects identifiers of every
resource included in a given HTTP response (including lists, embedded documents, and subresources)
Expand Down Expand Up @@ -547,7 +547,7 @@ the Symfony Serializer) before sending it. For large payloads this is costly bot
time to first byte.

API Platform can instead use the
[Symfony JsonStreamer](https://symfony.com/doc/current/components/json_streamer.html) component to
[Symfony JsonStreamer](https://symfony.com/doc/current/serializer/streaming_json.html) component to
stream the response. JsonStreamer generates optimized, ahead-of-time-compiled encoders from the
typed properties of your resources and writes the JSON directly to a `StreamedResponse`, without
holding the full output in memory.
Expand Down
4 changes: 2 additions & 2 deletions core/serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -214,9 +214,9 @@ will also be available to write (`PUT` / `PATCH` / `POST`). The `author` propert
write-only; it will not be visible when serialized responses are returned by the API.

Internally, API Platform passes the value of the `normalizationContext` as the 3rd argument of
[the `Serializer::serialize()` method](https://api.symfony.com/master/Symfony/Component/Serializer/SerializerInterface.html#method_serialize)
[the `Serializer::serialize()` method](https://github.com/symfony/symfony/blob/7.4/src/Symfony/Component/Serializer/SerializerInterface.php)
during the normalization process. `denormalizationContext` is passed as the 4th argument of
[the `Serializer::deserialize()` method](https://api.symfony.com/master/Symfony/Component/Serializer/SerializerInterface.html#method_deserialize)
[the `Serializer::deserialize()` method](https://github.com/symfony/symfony/blob/7.4/src/Symfony/Component/Serializer/SerializerInterface.php)
during denormalization (writing).

To configure the serialization groups of classes's properties, you must use directly
Expand Down
6 changes: 3 additions & 3 deletions core/upgrade-guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ public Status $status;
```

Alternatively, enable Symfony Validator's
[auto-mapping](https://symfony.com/doc/current/validation/auto_mapping.html) on the resource class.
Auto-mapping generates an implicit `Type` constraint from the PHP type declaration, which is
sufficient for the 422 promotion to apply.
[auto-mapping](https://symfony.com/doc/current/reference/constraints/EnableAutoMapping.html) on the
resource class. Auto-mapping generates an implicit `Type` constraint from the PHP type declaration,
which is sufficient for the 422 promotion to apply.

**What to do (Laravel)**: add a rule for the property in `rules`:

Expand Down
2 changes: 1 addition & 1 deletion extra/philosophy.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ In 25 years of PHP, the web changed dramatically and is now evolving faster than
[PHP.net](https://www.php.net), [Symfony](https://symfony.com), [Facebook](https://hhvm.com/) and
many others have worked hard to improve and professionalize the PHP ecosystem. The PHP world has
closed the gap with most backend solutions and is often [more innovative](https://wiki.php.net/rfc)
and [faster](https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/php-python3.html)
and [faster](https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/python3-php.html)
than them.

However in critical areas I've described previously, many things can be improved. Almost all
Expand Down
7 changes: 4 additions & 3 deletions laravel/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,8 @@ The API Platform Demo

You may also be interested in these alternative testing tools (not included by default):

- [Hoppscotch](https://docs.hoppscotch.io/features/tests), create functional test for your API
- [Hoppscotch](https://docs.hoppscotch.io/documentation/features/scripts), create functional test
for your API
- [Behat](https://behat.org), a
[behavior-driven development (BDD)](https://en.wikipedia.org/wiki/Behavior-driven_development)
framework to write the API specification as user stories and in natural language then execute
Expand All @@ -487,8 +488,8 @@ You may also be interested in these alternative testing tools (not included by d

### API Test Assertions with Laravel

In addition to [the built-in ones](https://phpunit.readthedocs.io/en/main/assertions.html), API
Platform provides convenient PHPUnit assertions dedicated to API testing:
In addition to [the built-in ones](https://docs.phpunit.de/en/11.5/assertions.html), API Platform
provides convenient PHPUnit assertions dedicated to API testing:

```php
<?php
Expand Down
3 changes: 2 additions & 1 deletion schema-generator/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,8 @@ vocabularies:
```

You can also use any other vocabulary. Check the
[Linked Open Vocabularies](https://lov.linkeddata.es/dataset/lov/) to find one fitting your needs.
[Linked Open Vocabularies](https://lov.linkeddata.es/dataset/lov/vocabs) to find one fitting your
needs.

For instance, to generate a data model from the
[Video Game Ontology](http://purl.org/net/VideoGameOntology), use the following config file:
Expand Down
4 changes: 2 additions & 2 deletions symfony/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ You may have noticed that some keys start with the `@` symbol in the generated J
allows to build smart clients, with auto-discoverability capabilities such as the API Platform Admin
that we will discover in a few lines. It is useful for open data, SEO and interoperability,
especially when
[used with open vocabularies such as Schema.org](http://blog.schema.org/2013/06/schemaorg-and-json-ld.html)
[used with open vocabularies such as Schema.org](https://blog.schema.org/2013/06/03/schema-org-and-json-ld/)
and allows to
[give access to Google to your structured data](https://developers.google.com/search/docs/guides/intro-structured-data)
or to query your APIs in [SPARQL](https://en.wikipedia.org/wiki/SPARQL) using
Expand Down Expand Up @@ -695,7 +695,7 @@ of HTTP requests). You can even

The other interesting thing is how API Platform handles dates (the `publicationDate` property). API
Platform understands
[any date format supported by PHP](https://www.php.net/manual/en/datetime.formats.date.php). In
[any date format supported by PHP](https://www.php.net/manual/en/datetime.formats.php). In
production we strongly recommend using the format specified by the
[RFC 3339](https://tools.ietf.org/html/rfc3339), but, as you can see, most common formats including
`September 21, 2016` can be used.
Expand Down
2 changes: 1 addition & 1 deletion symfony/migrate-from-fosrestbundle.md
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ access.
#### In API Platform (Security)

Use the `security` attribute in the `ApiResource` and `ApiProperty` attributes. It is an
[Expression language](https://symfony.com/doc/current/components/expression_language.md) string
[Expression language](https://symfony.com/doc/current/components/expression_language.html) string
describing who can access your resources or who can see the properties of your resources. By
default, everything is accessible without authentication.

Expand Down
4 changes: 2 additions & 2 deletions symfony/validation.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ API Platform takes care of validating the data sent to the API by the client (us
entered through forms). By default, the framework relies on
[the powerful Symfony Validator Component](https://symfony.com/doc/current/validation.html) for this
task, but you can replace it with your preferred validation library such as
[the PHP filter extension](https://www.php.net/manual/en/intro.filter.php) if you want to.
[the PHP filter extension](https://www.php.net/manual/en/book.filter.php) if you want to.

<p align="center" class="symfonycasts"><a href="https://symfonycasts.com/screencast/api-platform/validation?cid=apip"><img src="../symfony/images/symfonycasts-player.png" alt="Validation screencast"><br>Watch the Validation screencast</a></p>

Expand Down Expand Up @@ -826,7 +826,7 @@ If `year` had no validator constraint at all, both requests would receive HTTP 4
### Tip: use Symfony Validator auto-mapping

When
[`framework.validation.auto_mapping`](https://symfony.com/doc/current/validation/auto_mapping.html)
[`framework.validation.auto_mapping`](https://symfony.com/doc/current/reference/configuration/framework.html#reference-validation-auto-mapping)
is enabled, Symfony Validator derives implicit constraints directly from PHP type declarations —
`string`, `int`, `float`, nullability, `BackedEnum` cases, and more. Every property with a PHP type
then effectively has a `Type` constraint without any manual annotation.
Expand Down
Loading