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
Welcome aboard! We're excited that you are interested in contributing to the Tempest framework. We value all contributions to the project and have assembled the following resources to help you get started. Thanks for being a contributor!
3
+
4
+
## How do I...
5
+
* Ask about...
6
+
*[🐞 An Error or Bug](#report-an-error-or-bug)
7
+
*[💡 A Feature](#request-a-feature)
8
+
* Make...
9
+
*[📖 A Contribution to Documentation](#contribute-documentation)
10
+
*[🔨 A Contribution to the Code](#contribute-code)
11
+
12
+
<!--
13
+
TODO: Add these sections.
14
+
* Manage...
15
+
* [❓ Issues and Pull Requests]()
16
+
* [📦 Sub-split packages]()
17
+
* [✅ Releases]()
18
+
-->
19
+
20
+
## Report an Error or Bug
21
+
To report an error or a bug, please:
22
+
23
+
* Head over to the [issue page](https://github.com/tempestphp/tempest-framework/issues) to open an issue.
24
+
* Provide as much context about the problem you are running into and the environment you are running Tempest in.
25
+
* Provide the version and, if relevant, the component you are running into issues with.
26
+
* For a shot at getting our "Perfect Storm" label, submit a PR with a failing test!
27
+
28
+
Once the issue has been opened, the Tempest team will:
29
+
30
+
<!-- TODO: Update this section with some links -->
31
+
* Label the issue appropriately.
32
+
* Assign the issue to the appropriate team member.
33
+
* Try and get a response to you as quickly as possible.
34
+
35
+
In the event that an issue is opened, but we get no response within 30 days, the issue will be closed.
36
+
37
+
## Request a Feature
38
+
Tempest is a work in progress! We recognize that some features you might benefit from or expect may be missing. If you do have a feature request, please:
39
+
40
+
* Head over to the [issue page](https://github.com/tempestphp/tempest-framework/issues) to open an issue.
41
+
* Provide as much detail about the feature you are looking for and how it might benefit you and others.
42
+
43
+
Once the feature request has been opened, the Tempest team will:
44
+
45
+
<!-- TODO: Update this section with some links -->
46
+
* Label the issue appropriately.
47
+
* Ask any clarifying question to help better understand the use case.
48
+
* If the feature requested is accepted, the Tempest team will assign the "Uncharted Waters" label. A Tempest team member or a member of the community can contribute the code for this.
49
+
50
+
> [!IMPORTANT]
51
+
> We welcome all contributions and greatly value your time and effort. To ensure your work aligns with Tempest's vision and avoids unnecessary effort, we aim to provide clear guidance and feedback throughout the process.
52
+
53
+
## Contribute Documentation
54
+
Documentation is how users learn about the framework, and developers begin to understand how Tempest works under the hood. It's critical to everything we do! Thank you in advance for your assistance in ensuring Tempest documentation is extensive, user-friendly, and up-to-date.
55
+
56
+
> [!NOTE]
57
+
> We welcome contributions of any size! Feel free to submit a pull request, even if it's just fixing a typo or adding a sentence.
58
+
59
+
To contribute to Tempest's documentation, please:
60
+
* Head over to the [Tempest docs repository](https://github.com/tempestphp/tempest-docs) to fork the project.
61
+
* Add or edit any relevant documentation in a manner consistent with the rest of the documentation.
62
+
* Re-read what you wrote and run it through a spell checker.
63
+
* Open a pull request with your changes.
64
+
65
+
Once a pull request has been opened, the Tempest team will:
66
+
* Use GitHub reviews to review your pull request.
67
+
* If necessary, ask for revisions.
68
+
* If we decide to pass on your pull request, we will thank you for your contribution and explain our decision. We appreciate all the time contributors put into Tempest!
69
+
* If your pull request is accepted, we will mark it as such and merge it into the project. It will be released in the next tagged version! 🎉
70
+
71
+
## Contribute Code
72
+
So you want to dive into the code! We cannot wait to get your pull request! To make the most of your time, please ensure that any contributions pertain to an approved feature request or a confirmed bug. This helps us focus on the vision for Tempest and ensuring the best developer experience.
* Write tests that verify that your contribution works as expected.
78
+
* Run `composer qa` to ensure you are adhering to our style guidelines.
79
+
* Document your changes in the CHANGELOG following the [Keep a Changelog](https://keepachangelog.com) format.
80
+
* Go to https://github.com/tempestphp/tempest-framework/pulls and create a pull request with your changes.
81
+
* If your pull request is connected to an open issue, add a line in your description that says `Fixes: #xxx`, where `#xxx` is the number of the issue you're fixing.
82
+
83
+
Once a pull request has been opened, the Tempest team will:
84
+
* Use GitHub reviews to review your pull request.
85
+
* Ensure all CI pipelines are passing.
86
+
* If necessary, ask for revisions.
87
+
* If we decide to pass on your pull request, we will thank you for your contribution and explain our decision. We appreciate all the time contributors put into Tempest!
88
+
* If your pull request is accepted, we will mark it as such and merge it into the project. It will be released in the next tagged version! 🎉
89
+
90
+
### Setting up Tempest Locally
91
+
* Install PHP
92
+
* Install Composer
93
+
*[Fork the Tempest repository.](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo)
94
+
95
+
Then in your terminal run:
96
+
```shell
97
+
cd /path/to/your/clone
98
+
composer update
99
+
```
2
100
3
-
We welcome your PRs and contributions. If you have any feature requests or bug reports, head over to the [issue page](https://github.com/tempestphp/tempest-framework/issues) and feel free to create an issue.
101
+
You're ready to get started!
4
102
5
-
If you'd like to send PRs, you can check out and run Tempest locally like so:
103
+
### Styling Decisions
104
+
Tempest uses a modified version of PSR-12. We automate the entire styling process because we know everyone is used to different standards and workflows. To see some of the rules we enforce, check out our [CS-Fixer](https://github.com/tempestphp/tempest-framework/blob/main/.php-cs-fixer.dist.php) and [Rector](https://github.com/tempestphp/tempest-framework/blob/main/rector.php) configurations.
The following outlines some other guidelines we have established for Tempest.
12
107
13
-
Before submitting PRs, run `composer qa` locally:
108
+
#### Final and Readonly as a default
109
+
Whenever possible, classes should be `final` and `readonly`. This practice promotes immutability and prevents inadvertent changes to logic.
14
110
15
-
```php
16
-
composer qa
17
-
```
111
+
_Resources_
112
+
*[Why I use final](https://www.youtube.com/watch?v=HiD6CwWq5Ds&ab_channel=PHPAnnotated)
18
113
19
-
Please see below for some general guidelines relating to specific components of the framework.
114
+
---
20
115
21
-
## Acronym Casing
116
+
####Acronym Casing
22
117
Tempest uses a modified version of the [.NET best practices](https://learn.microsoft.com/en-us/previous-versions/dotnet/netframework-4.0/ms229043(v=vs.100)?redirectedfrom=MSDN) for acronym casing. Please see below for our guidelines:
23
118
24
119
__Do capitalize all characters of two to three character acronyms, except the first word of a camel-cased identifier.__
@@ -30,12 +125,10 @@ A class named `UuidGenerator` is an example of a long acronym (Uuid) used as the
30
125
__Do not capitalize any of the characters of any acronyms, whatever their length, at the beginning of a camel-cased identifier.__
31
126
A class named `Uuid` is an example of a long acronym (Uuid) used as the first word of a camel-cased identifier. A parameter named `dbUsername` is an example of a short acronym (db) used as the first word of a camel-cased identifier.
32
127
33
-
## Validation Rules
34
-
Validation rules should be `final` and `readonly`. The message returned by a validation rule should not include ending
35
-
punctuation.
128
+
---
36
129
37
-
###Best Practices
38
-
1.__Use of `final` and `readonly`__: Ensure that validation rules are declared as final and readonly whenever possible. This practice promotes immutability and prevents inadvertent changes to the validation logic.
130
+
#### Validaton Class Formatting
131
+
1.__Use of `final` and `readonly`__: Ensure that validation rules are declared as [final and readonly](#final-and-readonly-as-a-default) whenever possible. This practice promotes immutability and prevents inadvertent changes to the validation logic.
39
132
2.__Error Message Formatting__:
40
133
-__Avoid Ending Punctuation__: When crafting error messages for validation rules, refrain from including ending punctuation such as periods, exclamation marks, or question marks. This helps in maintaining a uniform style and prevents inconsistency in error message presentation.
0 commit comments