ci: add Super-Linter (#323)

This commit is contained in:
Kévin Dunglas
2023-12-01 17:26:21 +01:00
committed by GitHub
parent b675d09c49
commit c9bf9940d1
24 changed files with 847 additions and 720 deletions

View File

@@ -89,4 +89,4 @@ CGO_ENABLED=1 xcaddy build \
--with github.com/dunglas/mercure/caddy \
--with github.com/dunglas/vulcain/caddy
# Add extra Caddy modules here
```
```

View File

@@ -15,8 +15,8 @@ COPY . /app/public
Then, run the commands to build and run the Docker image:
```console
$ docker build -t my-php-app .
$ docker run -it --rm --name my-running-app my-php-app
docker build -t my-php-app .
docker run -it --rm --name my-running-app my-php-app
```
## How to Install More PHP Extensions
@@ -70,7 +70,7 @@ COPY --from=builder /usr/local/bin/frankenphp /usr/local/bin/frankenphp
The `builder` image provided by FrankenPHP contains a compiled version of libphp.
[Builders images](https://hub.docker.com/r/dunglas/frankenphp/tags?name=builder) are provided for all versions of FrankenPHP and PHP, both for Alpine and Debian.
# Enabling the Worker Mode by Default
## Enabling the Worker Mode by Default
Set the `FRANKENPHP_CONFIG` environment variable to start FrankenPHP with a worker script:
@@ -82,7 +82,7 @@ FROM dunglas/frankenphp
ENV FRANKENPHP_CONFIG="worker ./public/index.php"
```
# Using a Volume in Development
## Using a Volume in Development
To develop easily with FrankenPHP, mount the directory from your host containing the source code of the app as a volume in the Docker container:

View File

@@ -6,7 +6,6 @@ Calling PHP functions and language constructs that themselves call [cgo](https:/
This issue [is being worked on by the Go project](https://github.com/golang/go/issues/62130).
In the meantime, one solution is not to use constructs (like `echo`) and functions (like `header()`) that delegate to Go from inside Fibers.
This code will likely crash because it uses `echo` in the Fiber:

View File

@@ -18,20 +18,22 @@ Alternatively, you can run your Laravel projects with FrankenPHP from your local
1. [Download the binary corresponding to your system](https://github.com/dunglas/frankenphp/releases)
2. Add the following configuration to a file named `Caddyfile` in the root directory of your Laravel project:
```caddyfile
{
frankenphp
order php_server before file_server
}
# The domain name of your server
localhost {
# Enable compression (optional)
encode zstd gzip
# Execute PHP files in the current directory and serve assets
php_server
}
```
```caddyfile
{
frankenphp
order php_server before file_server
}
# The domain name of your server
localhost {
# Enable compression (optional)
encode zstd gzip
# Execute PHP files in the current directory and serve assets
php_server
}
```
3. Start FrankenPHP from the root directory of your Laravel project: `./frankenphp run`
## Laravel Octane

View File

@@ -7,6 +7,6 @@ No JS library or SDK required!
![Mercure](https://mercure.rocks/static/main.png)
To enable the Mercure hub, update the `Caddyfile` as described [on Mercure's website](https://mercure.rocks/docs/hub/config).
To enable the Mercure hub, update the `Caddyfile` as described [on Mercure's site](https://mercure.rocks/docs/hub/config).
To push Mercure updates from your code, we recommend the [Symfony Mercure Component](https://symfony.com/components/Mercure) (you don't need the Symfony full stack framework to use it).

View File

@@ -64,7 +64,7 @@ do {
$myApp->shutdown();
```
Then, start your app and use the `FRANKENPHP_CONFIG` environment variable to configure your worker:
Then, start your app and use the `FRANKENPHP_CONFIG` environment variable to configure your worker:
```console
docker run \