-
-
Notifications
You must be signed in to change notification settings - Fork 420
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update the guidelines for contributions
- Loading branch information
1 parent
45c43ed
commit ce2b746
Showing
1 changed file
with
8 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,13 @@ | ||
# Contributing | ||
|
||
## Local Setup | ||
This project is not looking for code contributions other than bug fixes. A | ||
(non-exhaustive) list of changes that will most probably not be merged contains: | ||
|
||
### Prerequisites | ||
* code optimizations - create an issue instead to discuss it | ||
* unsolicited feature additions | ||
* extensive code changes | ||
|
||
1. PHP 8.1.0 or higher. | ||
2. `composer` 2.4 or higher. | ||
In short: please discuss planned changes by opening a new issue. | ||
|
||
### Initial Setup | ||
|
||
```shell | ||
composer install | ||
composer install-tools | ||
``` | ||
|
||
### Running the Tests | ||
|
||
The project is set up with PHPStan for static analysis as well as Unit tests and Integration tests. | ||
|
||
```shell | ||
# Run PHPStan and Unit Tests | ||
composer test | ||
# Run PHPStan only | ||
vendor/bin/phpstan | ||
# Run Unit Tests only | ||
vendor/bin/phpunit --testsuite=unit | ||
# Run Integration Tests only | ||
vendor/bin/phpunit --testsuite=integration | ||
# Generate test coverage report into ./build/coverage | ||
composer test-coverage | ||
# Apply code style | ||
composer cs | ||
``` | ||
|
||
The integration tests in this project require a working firebase project and a number of setup steps to pass locally. | ||
|
||
* Create a new [Firebase Project](https://console.firebase.google.com/). | ||
* Generate and download a private key for a service account to `tests/_fixtures/test_credentials.json`. | ||
* Create a Realtime Database and save its url as a JSON string to `tests/_fixtures/test_rtdb.json`. | ||
* Follow these [instructions](https://github.com/firebase/quickstart-js/tree/master/messaging) on how to generate a | ||
Cloud Messaging device token and save the token as a JSON array to `tests/_fixtures/test_devices.json`. | ||
* Setup [multi tenancy](https://cloud.google.com/identity-platform/docs/multi-tenancy-quickstart) create a tenant, and | ||
save its ID as a string to `tests/_fixtures/test_tenant.json`. | ||
* Enable Email/Password Sign-in method in Firebase Authentication. | ||
Support the project's development and keep it sustainable by becoming a | ||
[GitHub Sponsor](https://github.com/sponsors/jeromegamez). |