Skip to content

Commit 09fe160

Browse files
committed
docs: fix grammar and typos across the docs
- config.md: "all the file" → "all the files"; drop stray "using" in "enable HTTPS using for all the hostnames"; remove a duplicated "start a new shell" line. - docker.md: "by the one contained your custom modules" → "with the one containing your custom modules"; add missing article in "run as a non-root user". - extensions.md: "deeper dive to type juggling" → "into type juggling"; "Forces to design" → "Forces you to design". - known-issues.md: "fully binary" → "fully static binary". - laravel.md: "explicitly the pass `--log-level` option" → "explicitly pass the `--log-level` option"; "you can use enable Mercure" → "you can enable Mercure". - mercure.md: "must used to sign" → "must be used to sign"; "tokens generated aerodynamically using with a trusted" → "generated dynamically using a trusted"; "library handled" → "library handles". - metrics.md: add missing articles in "absolute path of worker file". - static.md: add missing article before "`scratch` Docker image". - worker.md: "number of request" → "number of requests". - x-sendfile.md: replace mid-sentence period with comma so the preamble before the examples reads as one sentence.
1 parent 389a912 commit 09fe160

10 files changed

Lines changed: 16 additions & 18 deletions

File tree

docs/config.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -307,7 +307,7 @@ The `S` value of [the `variables_order` PHP directive](https://www.php.net/manua
307307

308308
To load [additional PHP configuration files](https://www.php.net/manual/en/configuration.file.php#configuration.file.scan),
309309
the `PHP_INI_SCAN_DIR` environment variable can be used.
310-
When set, PHP will load all the file with the `.ini` extension present in the given directories.
310+
When set, PHP will load all the files with the `.ini` extension present in the given directories.
311311

312312
You can also change the PHP configuration using the `php_ini` directive in the `Caddyfile`:
313313

@@ -328,7 +328,7 @@ You can also change the PHP configuration using the `php_ini` directive in the `
328328

329329
### Disabling HTTPS
330330

331-
By default, FrankenPHP will automatically enable HTTPS using for all the hostnames, including `localhost`.
331+
By default, FrankenPHP will automatically enable HTTPS for all the hostnames, including `localhost`.
332332
If you want to disable HTTPS (for example in a development environment), you can set the `SERVER_NAME` environment variable to `http://` or `:80`:
333333

334334
Alternatively, you can use all other methods described in the [Caddy documentation](https://caddyserver.com/docs/automatic-https#activation).
@@ -446,5 +446,3 @@ Add-Content -Path $PROFILE -Value '. (Join-Path (Split-Path $PROFILE) "frankenph
446446
```
447447

448448
You will need to start a new shell for this setup to take effect.
449-
450-
You will need to start a new shell for this setup to take effect.

docs/docker.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ RUN CGO_ENABLED=1 \
8787

8888
FROM dunglas/frankenphp AS runner
8989

90-
# Replace the official binary by the one contained your custom modules
90+
# Replace the official binary with the one containing your custom modules
9191
COPY --from=builder /usr/local/bin/frankenphp /usr/local/bin/frankenphp
9292
```
9393

@@ -154,7 +154,7 @@ volumes:
154154
155155
## Running as a Non-Root User
156156
157-
FrankenPHP can run as non-root user in Docker.
157+
FrankenPHP can run as a non-root user in Docker.
158158
159159
Here is a sample `Dockerfile` doing this:
160160

docs/extensions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ There are two important things to note here:
8686
- A directive comment `//export_php:function` defines the function signature in PHP. This is how the generator knows how to generate the PHP function with the right parameters and return type.
8787
- The function must return an `unsafe.Pointer`. FrankenPHP provides an API to help you with type juggling between C and Go.
8888

89-
While the first point speaks for itself, the second may be harder to apprehend. Let's take a deeper dive to type juggling later in this guide.
89+
While the first point speaks for itself, the second may be harder to apprehend. Let's take a deeper dive into type juggling later in this guide.
9090

9191
### Generating the Extension
9292

@@ -339,7 +339,7 @@ type UserStruct struct {
339339
- **Method-only interface** - All interactions must go through methods you define
340340
- **Better encapsulation** - Internal data structure is completely controlled by Go code
341341
- **Type safety** - No risk of PHP code corrupting internal state with wrong types
342-
- **Cleaner API** - Forces to design a proper public interface
342+
- **Cleaner API** - Forces you to design a proper public interface
343343

344344
This approach provides better encapsulation and prevents PHP code from accidentally corrupting the internal state of your Go objects. All interactions with the object must go through the methods you explicitly define.
345345

docs/known-issues.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ The [get_browser()](https://www.php.net/manual/en/function.get-browser.php) func
2828

2929
## Standalone Binary and Alpine-based Docker Images
3030

31-
The fully binary and Alpine-based Docker images (`dunglas/frankenphp:*-alpine`) use [musl libc](https://musl.libc.org/) instead of [glibc and friends](https://www.etalabs.net/compare_libcs.html), to keep a smaller binary size.
31+
The fully static binary and Alpine-based Docker images (`dunglas/frankenphp:*-alpine`) use [musl libc](https://musl.libc.org/) instead of [glibc and friends](https://www.etalabs.net/compare_libcs.html), to keep a smaller binary size.
3232
This may lead to some compatibility issues.
3333
In particular, the glob flag `GLOB_BRACE` is [not available](https://www.php.net/manual/en/function.glob.php)
3434

docs/laravel.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ The `octane:frankenphp` command can take the following options:
8080
- `--log-level`: Log messages at or above the specified log level, using the native Caddy logger
8181

8282
> [!TIP]
83-
> To get structured JSON logs (useful when using log analytics solutions), explicitly the pass `--log-level` option.
83+
> To get structured JSON logs (useful when using log analytics solutions), explicitly pass the `--log-level` option.
8484
8585
See also [how to use Mercure with Octane](#mercure-support).
8686

@@ -183,7 +183,7 @@ FrankenPHP includes [Mercure support out of the box](mercure.md).
183183

184184
If you are not using [Octane](#laravel-octane), see [the Mercure documentation entry](mercure.md).
185185

186-
If you are using Octane, you can use enable Mercure support by adding the following lines to your `config/octane.php` file:
186+
If you are using Octane, you can enable Mercure support by adding the following lines to your `config/octane.php` file:
187187

188188
```php
189189
// config/octane.php

docs/mercure.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -107,19 +107,19 @@ $updateID = file_get_contents('https://localhost/.well-known/mercure', context:
107107
error_log("update $updateID published", 4);
108108
```
109109

110-
The key passed as parameter of the `mercure.publisher_jwt` option in the `Caddyfile` must used to sign the JWT token used in the `Authorization` header.
110+
The key passed as parameter of the `mercure.publisher_jwt` option in the `Caddyfile` must be used to sign the JWT token used in the `Authorization` header.
111111

112112
The JWT must include a `mercure` claim with a `publish` permission for the topics you want to publish to.
113113
See [the Mercure documentation](https://mercure.rocks/spec#publishers) about authorization.
114114

115115
To generate your own tokens, you can use [this jwt.io link](https://www.jwt.io/#token=eyJhbGciOiJIUzI1NiJ9.eyJtZXJjdXJlIjp7InB1Ymxpc2giOlsiKiJdfX0.PXwpfIGng6KObfZlcOXvcnWCJOWTFLtswGI5DZuWSK4),
116-
but for production apps, it's recommended to use short-lived tokens generated aerodynamically using with a trusted [JWT library](https://www.jwt.io/libraries?programming_language=php).
116+
but for production apps, it's recommended to use short-lived tokens generated dynamically using a trusted [JWT library](https://www.jwt.io/libraries?programming_language=php).
117117

118118
### Using Symfony Mercure
119119

120120
Alternatively, you can use the [Symfony Mercure Component](https://symfony.com/components/Mercure), a standalone PHP library.
121121

122-
This library handled the JWT generation, update publishing as well as cookie-based authorization for subscribers.
122+
This library handles the JWT generation, update publishing as well as cookie-based authorization for subscribers.
123123

124124
First, install the library using Composer:
125125

docs/metrics.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,4 @@ When [Caddy metrics](https://caddyserver.com/docs/metrics) are enabled, FrankenP
2222
- `frankenphp_worker_restarts{worker="[worker_name]"}`: The number of times a worker has been deliberately restarted.
2323
- `frankenphp_worker_queue_depth{worker="[worker_name]"}`: The number of queued requests.
2424

25-
For worker metrics, the `[worker_name]` placeholder is replaced by the worker name in the Caddyfile, otherwise absolute path of worker file will be used.
25+
For worker metrics, the `[worker_name]` placeholder is replaced by the worker name in the Caddyfile, otherwise the absolute path of the worker file will be used.

docs/static.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ it's possible to create a static or mostly static build of FrankenPHP thanks to
1010

1111
With this method, a single, portable, binary will contain the PHP interpreter, the Caddy web server, and FrankenPHP!
1212

13-
Fully static native executables require no dependencies at all and can even be run on [`scratch` Docker image](https://docs.docker.com/build/building/base-images/#create-a-minimal-base-image-using-scratch).
13+
Fully static native executables require no dependencies at all and can even be run on a [`scratch` Docker image](https://docs.docker.com/build/building/base-images/#create-a-minimal-base-image-using-scratch).
1414
However, they can't load dynamic PHP extensions (such as Xdebug) and have some limitations because they are using the musl libc.
1515

1616
Mostly static binaries only require `glibc` and can load dynamic extensions.

docs/worker.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ docker run \
120120
As PHP was not originally designed for long-running processes, there are still many libraries and legacy codes that leak memory.
121121
A workaround to using this type of code in worker mode is to restart the worker script after processing a certain number of requests:
122122

123-
The previous worker snippet allows configuring a maximum number of request to handle by setting an environment variable named `MAX_REQUESTS`.
123+
The previous worker snippet allows configuring a maximum number of requests to handle by setting an environment variable named `MAX_REQUESTS`.
124124

125125
### Restart Workers Manually
126126

docs/x-sendfile.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ containing the path of the file to be served. FrankenPHP takes care of the rest.
2020

2121
This feature is known as **`X-Sendfile`** for Apache, and **`X-Accel-Redirect`** for NGINX.
2222

23-
In the following examples, we assume that the document root of the project is the `public/` directory.
23+
In the following examples, we assume that the document root of the project is the `public/` directory,
2424
and that we want to use PHP to serve files stored outside the `public/` directory,
2525
from a directory named `private-files/`.
2626

0 commit comments

Comments
 (0)