Skip to content

Commit 29a88ea

Browse files
committed
Document the release process
1 parent 723c0e5 commit 29a88ea

File tree

2 files changed

+39
-27
lines changed

2 files changed

+39
-27
lines changed

CONTRIBUTING.md

Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
# How to contribute to Lighthouse
1+
# Lighthouse Contribution Guide
22

3-
Thank you for contributing to Lighthouse. Here are some tips to make this easy for you.
3+
Thank you for contributing to Lighthouse.
4+
Here are some tips and guidelines to make this easy for you.
45

5-
## The process
6+
## Open a Pull Request
67

78
If this is your first time contributing to any project on GitHub, see [First Contributions](https://github.com/firstcontributions/first-contributions/blob/master/README.md).
89
For this project specifically, follow these steps:
@@ -16,16 +17,28 @@ For this project specifically, follow these steps:
1617
1. Commit and push
1718
1. Open a pull request, following the [template](.github/PULL_REQUEST_TEMPLATE.md)
1819

20+
## Release a New Version
21+
22+
To create a new release, follow these steps:
23+
1. Read [Keep a Changelog](https://keepachangelog.com/en/1.0.0)
24+
1. Read [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
25+
1. Look at previous released on the [GitHub release page](https://github.com/nuwave/lighthouse/releases)
26+
1. Consider the entries in the [`CHANGELOG unreleased section`](CHANGELOG.md#unreleased), add missing entries if needed
27+
1. Based on those entries and the previous version, define the next version number and add it to the [`CHANGELOG.md`](CHANGELOG.md)
28+
1. [Draft a new release](https://github.com/nuwave/lighthouse/releases/new)
29+
1. Add the version number as both tag and title
30+
1. Add the changelog entries as the description
31+
1. Publish the release
32+
1933
## Setup
2034

21-
This section describes the setup of a local development environment to run tests
22-
and other quality tools.
35+
This section describes the setup of a local development environment to run tests and other quality tools.
2336

2437
### Docker + Make
2538

2639
A reproducible environment with minimal dependencies:
2740

28-
- [docker-compose](https://docs.docker.com/compose/install)
41+
- [Docker Compose](https://docs.docker.com/compose/install)
2942
- [GNU Make](https://www.gnu.org/software/make) (optional)
3043

3144
For convenience, common tasks during development are wrapped up in the [Makefile](Makefile).
@@ -43,11 +56,11 @@ Before you commit changes, run all validation steps with:
4356

4457
### Native Tools
4558

46-
You can use native tools instead of Docker + Make, with the following requirements:
59+
You can use native tools instead of Docker and Make, with the following requirements:
4760

4861
- PHP (see [composer.json](composer.json) for the minimal required version)
4962
- Composer (version 2 is recommended)
50-
- MySQL (any Laravel supported version should work)
63+
- MySQL (any Laravel-supported version should work)
5164
- Redis 6
5265

5366
Clone the project and run the following in the project root:
@@ -66,23 +79,23 @@ Common tasks during development are listed in the `scripts` section of [composer
6679

6780
We use **PHPUnit** for unit tests and integration tests.
6881

69-
Have a new feature? You can start off by writing some tests that detail
70-
the behaviour you want to achieve and go from there.
82+
Have a new feature?
83+
You can start off by writing some tests that detail the behavior you want to achieve and go from there.
7184

72-
Fixing a bug? The best way to ensure it is fixed for good and never comes
73-
back is to write a failing test for it and then make it pass. If you cannot
74-
figure out how to fix it yourself, feel free to submit a PR with a failing test.
85+
Fixing a bug?
86+
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.
87+
If you cannot figure out how to fix it yourself, feel free to submit a PR with a failing test.
7588

76-
Here is how to set up Xdebug in PhpStorm https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html
89+
Here is how to set up Xdebug in PhpStorm: https://www.jetbrains.com/help/phpstorm/configuring-xdebug.html.
7790

7891
> Enabling Xdebug slows down tests by an order of magnitude.
7992
> Stop listening for Debug Connection to speed it back up.
8093
81-
Set the environment variable `XDEBUG_REMOTE_HOST` to the IP of your host machine as
82-
seen from the Docker container. This may differ based on your setup: When running
83-
Docker for Desktop, it is usually `10.0.2.2`, when running from a VM it is something else.
94+
Set the environment variable `XDEBUG_REMOTE_HOST` to the IP of your host machine as seen from the Docker container.
95+
This may differ based on your setup.
96+
When running Docker for Desktop, it is usually `10.0.2.2`, when running from a VM it is something else.
8497

85-
### Test Data Setup
98+
### Test data setup
8699

87100
Use relations over direct access to foreign keys.
88101

@@ -149,7 +162,7 @@ Choose the appropriate type for your change:
149162

150163
Then, add a short description of your change and close it off with a link to your PR.
151164

152-
## Code guidelines
165+
## Code Guidelines
153166

154167
### Extensibility
155168

@@ -163,12 +176,12 @@ Always use class member visibility `protected` over `private`.
163176

164177
Prefer `final` classes in [tests](tests), but never use them in [src](src).
165178

166-
### Laravel feature usage
179+
### Laravel Feature Usage
167180

168181
We strive to be compatible with both Lumen and Laravel.
169182

170-
Do not use Facades and utilize dependency injection instead.
171-
Not every application has them enabled - Lumen does not use Facades by default.
183+
Do not use Facades, not every application has them enabled, and Lumen does not use them.
184+
Use dependency injection instead.
172185

173186
Prefer direct usage of Illuminate classes instead of helpers.
174187

@@ -181,7 +194,7 @@ Prefer direct usage of Illuminate classes instead of helpers.
181194
A notable exception is the `response()` helper - using DI for injecting a
182195
`ResponseFactory` does not work in Lumen, while `response()` works for both.
183196

184-
### Type definitions
197+
### Type Definitions
185198

186199
Prefer the strictest possible type annotations wherever possible.
187200
If known, add additional type information in the PHPDoc.
@@ -249,7 +262,7 @@ class Foo
249262
}
250263
```
251264

252-
## Code style
265+
## Code Style
253266

254267
We format the code automatically with [php-cs-fixer](https://github.com/friendsofphp/php-cs-fixer).
255268

@@ -316,8 +329,7 @@ You can use the following two case-sensitive regexes to search for violations:
316329

317330
## Benchmarks
318331

319-
We use [phpbench](https://github.com/phpbench/phpbench) for running benchmarks
320-
on performance critical pieces of code.
332+
We use [phpbench](https://github.com/phpbench/phpbench) for running benchmarks on performance-critical pieces of code.
321333

322334
Run the reports that are defined in `phpbench.json` via the command line:
323335

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ The site includes the latest docs for each major version of Lighthouse.
3232
You can find docs for specific versions by looking at the contents of [/docs/master](/docs/master)
3333
at that point in the git history: `https://github.com/nuwave/lighthouse/tree/<SPECIFIC-TAG>/docs/master`.
3434

35-
## Get involved
35+
## Get Involved
3636

3737
- Have a question? [Get your answer using GitHub discussions](https://github.com/nuwave/lighthouse/discussions/new?category=q-a)
3838
- Talk to other users? [Start a discussion](https://github.com/nuwave/lighthouse/discussions/new?category=general)

0 commit comments

Comments
 (0)