You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. Consider the entries in the [`CHANGELOG unreleased section`](CHANGELOG.md#unreleased), add missing entries if needed
29
-
2. Based on those entries and the previous version, define the next version number and add it to the [`CHANGELOG.md`](CHANGELOG.md)
28
+
1. Consider the entries in the [`CHANGELOG unreleased section`](CHANGELOG.md#unreleased).
29
+
Add missing entries if needed.
30
+
2. Based on those entries and the previous version, define the next version number.
31
+
Add it to [`CHANGELOG.md`](CHANGELOG.md).
30
32
3.[Draft a new release](https://github.com/nuwave/lighthouse/releases/new)
31
33
4. Add the version number as both tag and title
32
34
5. Add the changelog entries as the description
@@ -85,15 +87,16 @@ Have a new feature?
85
87
You can start off by writing some tests that detail the behavior you want to achieve and go from there.
86
88
87
89
Fixing a bug?
88
-
The best way to ensure it is fixed for good and never comes back is to write a failing test for it and then make it pass.
90
+
The best way to ensure it is fixed for good is to write a failing test.
91
+
Then make it pass so it does not come back.
89
92
If you cannot figure out how to fix it yourself, feel free to submit a PR with a failing test.
90
93
91
94
Here is how to set up Xdebug in PhpStorm: https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html.
92
95
93
96
> Enabling Xdebug slows down tests by an order of magnitude.
94
97
> Stop listening for Debug Connection to speed it back up.
95
98
96
-
Set the environment variable `XDEBUG_REMOTE_HOST` to the IP of your host machine as seen from the Docker container.
99
+
Set the environment variable `XDEBUG_REMOTE_HOST` to your host machine IP as seen from the Docker container.
97
100
This may differ based on your setup.
98
101
When running Docker for Desktop, it is usually `10.0.2.2`, when running from a VM it is something else.
99
102
@@ -205,8 +208,8 @@ Prefer direct usage of Illuminate classes instead of helpers.
205
208
+Arr::get($foo, 'bar');
206
209
```
207
210
208
-
A notable exception is the `response()` helper - using DI for injecting a
209
-
`ResponseFactory` does not work in Lumen, while `response()` works for both.
211
+
A notable exception is the `response()` helper.
212
+
Using DI for injecting a `ResponseFactory` does not work in Lumen, while `response()` works for both.
210
213
211
214
### Type Definitions
212
215
@@ -223,9 +226,8 @@ If known, add additional type information in the PHPDoc.
223
226
function foo(array $bar): string
224
227
```
225
228
226
-
For aggregate types such as the commonly used `Collection` class, use
227
-
the generic type hint style. While not officially part of PHPDoc, it is understood
228
-
by PhpStorm and most other editors.
229
+
For aggregate types such as the commonly used `Collection` class, use the generic type hint style.
230
+
While not officially part of PHPDoc, it is understood by PhpStorm and most other editors.
229
231
230
232
```php
231
233
/**
@@ -237,9 +239,7 @@ function foo(): Collection
237
239
```
238
240
239
241
Use `self` to annotate that a class returns an instance of itself (or its child).
240
-
Use [PHPDoc type hints](https://docs.phpdoc.org/guides/types.html#keywords) to
241
-
differentiate between cases where you return the original object instance and
242
-
other cases where you instantiate a new class.
242
+
Use [PHPDoc type hints](https://docs.phpdoc.org/guides/types.html#keywords) to differentiate between cases where you return the original object instance and other cases where you instantiate a new class.
243
243
244
244
```php
245
245
class Foo
@@ -276,6 +276,24 @@ class Foo
276
276
}
277
277
```
278
278
279
+
### Prose Formatting
280
+
281
+
Use [Semantic Line Breaks](https://sembr.org) for prose in markdown files and multiline code comments.
282
+
283
+
Write one sentence per line by default, instead of wrapping at a fixed column width.
284
+
Do not split a sentence across lines at commas or clauses.
285
+
If a sentence becomes too long, rewrite it into multiple shorter sentences.
286
+
Keep rendered output unchanged.
287
+
288
+
Apply this style to edited prose in:
289
+
-`*.md` files
290
+
- multiline prose comments and PHPDoc blocks
291
+
292
+
Do not reflow:
293
+
- code blocks and snippets
294
+
- PHPDoc tags (for example `@param`, `@return`, `@throws`)
295
+
- generated files
296
+
279
297
## Code Style
280
298
281
299
We format the code automatically with [php-cs-fixer](https://github.com/friendsofphp/php-cs-fixer).
Copy file name to clipboardExpand all lines: README.md
+8-10Lines changed: 8 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,16 +21,15 @@
21
21
</div>
22
22
23
23
Lighthouse is a GraphQL framework that integrates with your Laravel application.
24
-
It takes the best ideas of both and combines them to solve common tasks with ease
25
-
and offer flexibility when you need it.
24
+
It combines the best ideas of both ecosystems.
25
+
It solves common tasks with ease and offers flexibility when you need it.
26
26
27
27
## Documentation
28
28
29
29
The documentation lives at [lighthouse-php.com](https://lighthouse-php.com).
30
30
31
31
The site includes the latest docs for each major version of Lighthouse.
32
-
You can find docs for specific versions by looking at the contents of [/docs/master](/docs/master)
33
-
at that point in the git history: `https://github.com/nuwave/lighthouse/tree/<SPECIFIC-TAG>/docs/master`.
32
+
You can find docs for specific versions by looking at the contents of [/docs/master](/docs/master) at that point in the git history: `https://github.com/nuwave/lighthouse/tree/<SPECIFIC-TAG>/docs/master`.
0 commit comments