diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 369f3a4c0a8..1bbf07cd1fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,8 +1,8 @@ name: Lint on: - - push - - pull_request + push: + pull_request: jobs: build: @@ -16,7 +16,7 @@ jobs: fetch-depth: 0 - name: Lint - uses: github/super-linter@v3.17.0 + uses: github/super-linter/slim@v4 env: VALIDATE_ALL_CODEBASE: false VALIDATE_EDITORCONFIG: false diff --git a/core/controllers.md b/core/controllers.md index 23ff82aa2b8..3a84d731f5b 100644 --- a/core/controllers.md +++ b/core/controllers.md @@ -60,7 +60,7 @@ class CreateBookPublication extends AbstractController } ``` -This custom operation behaves exactly like the built-in operation: it returns a JSON-LD document corresponding to the id +This custom operation behaves exactly like the built-in operation: it returns a JSON-LD document corresponding to the ID passed in the URL. Here we consider that [autowiring](https://symfony.com/doc/current/service_container/autowiring.html) is enabled for diff --git a/core/filters.md b/core/filters.md index 46818cc5de0..dca54bc8afd 100644 --- a/core/filters.md +++ b/core/filters.md @@ -951,7 +951,7 @@ App\Entity\Tweet: [/codeSelector] -Given that the collection endpoint is `/tweets`, you can filter tweets by id and date in ascending or descending order: +Given that the collection endpoint is `/tweets`, you can filter tweets by ID and date in ascending or descending order: `/tweets?order[id]=asc&order[date]=desc`. By default, whenever the query does not specify the direction explicitly (e.g: `/tweets?order[id]&order[date]`), filters @@ -1173,8 +1173,8 @@ to retrieve items, [extensions](extensions.md) are the way to go. A Doctrine ORM filter is basically a class implementing the `ApiPlatform\Doctrine\Orm\Filter\FilterInterface`. API Platform includes a convenient abstract class implementing this interface and providing utility methods: `ApiPlatform\Doctrine\Orm\Filter\AbstractFilter`. -In the following example, we create a class to filter a collection by applying a regexp to a property. The `REGEXP` DQL -function used in this example can be found in the [`DoctrineExtensions`](https://github.com/beberlei/DoctrineExtensions) +In the following example, we create a class to filter a collection by applying a regular expression to a property. +The `REGEXP` DQL function used in this example can be found in the [`DoctrineExtensions`](https://github.com/beberlei/DoctrineExtensions) library. This library must be properly installed and registered to use this example (works only with MySQL). ```php @@ -1518,7 +1518,7 @@ final class UserFilter extends SQLFilter // Don't worry, getParameter automatically escapes parameters $userId = $this->getParameter('id'); } catch (\InvalidArgumentException $e) { - // No user id has been defined + // No user ID has been defined return ''; } diff --git a/core/graphql.md b/core/graphql.md index ca70ec90075..1a0d2ca88f6 100644 --- a/core/graphql.md +++ b/core/graphql.md @@ -596,7 +596,7 @@ The `mercureUrl` field is the Mercure URL you need to use to [subscribe to the u ### Receiving an Update -On the client side, you will receive the pushed updated data like you would receive the updated data if you did an `update` mutation. +On the client-side, you will receive the pushed updated data like you would receive the updated data if you did an `update` mutation. For instance, you could receive a JSON payload like this: diff --git a/core/mercure.md b/core/mercure.md index c6800ca5286..10d76904f3e 100644 --- a/core/mercure.md +++ b/core/mercure.md @@ -97,7 +97,7 @@ In addition to `private`, the following options are available: * `topics`: the list of topics of this update, if not the resource IRI is used * `data`: the content of this update, if not set the content will be the serialization of the resource using the default format -* `id`: the SSE id of this event, if not set the ID will be generated by the Mercure Hub +* `id`: the SSE ID of this event, if not set the ID will be generated by the Mercure Hub * `type`: the SSE type of this event, if not set this field is omitted * `retry`: the `retry` field of the SSE, if not set this field is omitted * `normalization_context`: the specific normalization context to use for the update. diff --git a/core/openapi.md b/core/openapi.md index 85c3224f219..b478efadecf 100644 --- a/core/openapi.md +++ b/core/openapi.md @@ -590,7 +590,7 @@ api_platform: # To enable or disable OAuth. enabled: false - # The OAuth client id. + # The OAuth client ID. clientId: '' # The OAuth client secret. diff --git a/core/performance.md b/core/performance.md index 0c233544e01..e3e8b56d79b 100644 --- a/core/performance.md +++ b/core/performance.md @@ -368,7 +368,7 @@ To configure Blackfire.io follow these simple steps: - BLACKFIRE_DISABLE_LEGACY_PORT=1 ``` -2. Add your Blackfire.io id and server token to your `.env` file at the root of your project (be sure not to commit this to a public repository): +2. Add your Blackfire.io ID and server token to your `.env` file at the root of your project (be sure not to commit this to a public repository): ```shell BLACKFIRE_SERVER_ID=xxxxxxxxxx diff --git a/create-client/nextjs.md b/create-client/nextjs.md index 2f92b8d3231..c8143221901 100644 --- a/create-client/nextjs.md +++ b/create-client/nextjs.md @@ -2,7 +2,7 @@ ![List screenshot](images/nextjs/create-client-nextjs-list.png) -The Next.js generator scaffolds components for Server Side Rendered applications using [Next.js](https://nextjs.org/). +The Next.js generator scaffolds components for server-side rendered (SSR) applications using [Next.js](https://nextjs.org/). ## Install diff --git a/create-client/nuxtjs.md b/create-client/nuxtjs.md index 5c9cd50cbb4..816e58ddb6a 100644 --- a/create-client/nuxtjs.md +++ b/create-client/nuxtjs.md @@ -1,6 +1,6 @@ # Nuxt.js Generator -The Nuxt.js generator scaffolds components for Server Side Rendered applications using [Nuxt.js](https://nuxtjs.org/) and [Vuetify](https://vuetifyjs.com/). +The Nuxt.js generator scaffolds components for server-side rendered (SSR) applications using [Nuxt.js](https://nuxtjs.org/) and [Vuetify](https://vuetifyjs.com/). ## Install diff --git a/distribution/index.md b/distribution/index.md index e88f91e66bb..92c4bb4eeba 100644 --- a/distribution/index.md +++ b/distribution/index.md @@ -235,8 +235,8 @@ allows to easily write functional tests and has good team collaboration features Your API Platform project is now 100% functional. Let's expose our own data model. Our bookshop API will start simple. It will be composed of a `Book` resource type and a `Review` one. -Books have an id, an ISBN, a title, a description, an author, a publication date and are related to a list of reviews. -Reviews have an id, a rating (between 0 and 5), a body, an author, a publication date and are related to one book. +Books have an ID, an ISBN, a title, a description, an author, a publication date and are related to a list of reviews. +Reviews have an ID, a rating (between 0 and 5), a body, an author, a publication date and are related to one book. Let's describe this data model as a set of Plain Old PHP Objects (POPO): @@ -252,7 +252,7 @@ use Doctrine\Common\Collections\ArrayCollection; #[ApiResource] class Book { - /** The id of this book. */ + /** The ID of this book. */ private ?int $id = null; /** The ISBN of this book (or null if doesn't have one). */ @@ -296,7 +296,7 @@ use ApiPlatform\Metadata\ApiResource; #[ApiResource] class Review { - /** The id of this review. */ + /** The ID of this review. */ private ?int $id = null; /** The rating of this review (between 0 and 5). */ @@ -335,7 +335,7 @@ Note that entities' and properties' descriptions in the API documentation, and t The framework also use these metadata to serialize and deserialize data from JSON (and other formats) to PHP objects (back and forth)! -For the sake of simplicity, in this example we used public properties (except for the id, see below). API Platform (as well +For the sake of simplicity, in this example we used public properties (except for the ID, see below). API Platform (as well as Symfony and Doctrine) also supports accessor methods (getters/setters), use them if you want to. We used a private property and a getter for the ID to enforce the fact that it is read only (we will let the DBMS generating it). API Platform also has first-grade support for UUIDs. [You should probably use them instead of auto-incremented IDs](https://www.clever-cloud.com/blog/engineering/2015/05/20/why-auto-increment-is-a-terrible-idea/). @@ -372,7 +372,7 @@ Modify these files as described in these patches: #[ApiResource] class Book { - /** The id of this book. */ + /** The ID of this book. */ + #[ORM\Id, ORM\Column, ORM\GeneratedValue] private ?int $id = null; @@ -416,7 +416,7 @@ Modify these files as described in these patches: #[ApiResource] class Review { - /** The id of this review. */ + /** The ID of this review. */ + #[ORM\Id, ORM\Column, ORM\GeneratedValue] private ?int $id = null; diff --git a/extra/releases.md b/extra/releases.md index e4cab0b7f4d..01cfb683f64 100644 --- a/extra/releases.md +++ b/extra/releases.md @@ -15,13 +15,13 @@ For example: Only 3 versions are maintained at the same time: -* **stable** (currently the **2.7** branch): regular bug fixes are integrated in this version -* **old-stable** (currently **2.6** branch): security fixes are integrated in this version, regular bug fixes are **not** backported in it +* **stable** (currently the **2.7** branch): regular bugfixes are integrated in this version +* **old-stable** (currently **2.6** branch): security fixes are integrated in this version, regular bugfixes are **not** backported in it * **development** (**main** branch): new features target this branch Older versions (1.x, 2.0...) **are not maintained**. If you still use them, you must upgrade as soon as possible. The **old-stable** branch is merged in the **stable** branch on a regular basis to propagate [security fixes](security.md). -The **stable** branch is merged in the **development** branch on a regular basis to propagate [security](security.md) and regular bug fixes. +The **stable** branch is merged in the **development** branch on a regular basis to propagate [security](security.md) and regular bugfixes. New versions of API Platform are released **when they are ready**, on the behalf of the API Platform Core Team. diff --git a/schema-generator/configuration.md b/schema-generator/configuration.md index 97367d797ea..77252fdf2de 100644 --- a/schema-generator/configuration.md +++ b/schema-generator/configuration.md @@ -624,7 +624,7 @@ apiPlatformOldAttributes: false # IDs configuration id: - # Automatically add an id field to entities + # Automatically add an ID field to entities generate: true # The ID generation strategy to use ("none" to not let the database generate IDs).