Skip to content

ci: upgrade super-linter #1690

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jan 4, 2023
Merged
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
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
name: Lint

on:
- push
- pull_request
push:
pull_request:

jobs:
build:
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion core/controllers.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions core/filters.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 '';
}

Expand Down
2 changes: 1 addition & 1 deletion core/graphql.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:

Expand Down
2 changes: 1 addition & 1 deletion core/mercure.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion core/openapi.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion core/performance.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion create-client/nextjs.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion create-client/nuxtjs.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
14 changes: 7 additions & 7 deletions distribution/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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):

Expand All @@ -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). */
Expand Down Expand Up @@ -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). */
Expand Down Expand Up @@ -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/).
Expand Down Expand Up @@ -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;

Expand Down Expand Up @@ -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;

Expand Down
6 changes: 3 additions & 3 deletions extra/releases.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
2 changes: 1 addition & 1 deletion schema-generator/configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down