Skip to content

Commit 466af7b

Browse files
committed
doc: Update CONTRIBUTING.md
1 parent 1b5fa14 commit 466af7b

File tree

1 file changed

+32
-12
lines changed

1 file changed

+32
-12
lines changed

CONTRIBUTING.md

+32-12
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# 🛠 Contributing to Grok PHP Client
1+
# Contributing to Grok PHP Client
22

3-
Thank you for your interest in contributing to **Grok PHP Client**! 🚀
3+
Thank you for your interest in contributing to **Grok PHP Client**!
44
We appreciate your help in improving the package. Whether you're fixing bugs, adding new features, or improving documentation—your contributions make a difference!
55

66
---
77

8-
## **📌 How to Contribute**
8+
## **How to Contribute**
99
### **1️⃣ Fork the Repository**
1010
Click the **"Fork"** button at the top-right of the [repository](https://github.com/grok-php/client).
1111

@@ -28,7 +28,7 @@ To confirm everything works before adding new changes:
2828
```sh
2929
composer test
3030
or
31-
vendor/bin/pest
31+
vendor/bin/phpunit
3232
```
3333

3434
### 5️⃣ Create a New Branch
@@ -58,39 +58,59 @@ git push origin feature/your-new-feature
5858

5959
### 9️⃣ Open a Pull Request (PR)
6060
Go to [Grok PHP Client Repo](https://github.com/grok-php/client/pulls)
61-
Click "New Pull Request", select your branch, and submit 🚀
61+
Click "New Pull Request", select your branch, and submit
6262

6363
---
6464

65-
## 🧪 Running Tests
66-
We use Pest PHP for testing. Before submitting your PR, run:
65+
## Running Tests
66+
1. To run **PHPUnit**, you should copy the `phpunit.xml.dist` file to `phpunit.xml`.
6767

68+
```sh
69+
cp phpunit.xml.dist phpunit.xml
70+
```
71+
72+
2. **Update** the API key in `phpunit.xml` with your actual API key:
73+
```xml
74+
<php>
75+
<env name="GROK_API_KEY" value="your-grok-api-key-here"/>
76+
</php>
77+
```
78+
3. **Obtain an API Key:**
79+
If you don’t have an API key, sign up at [Grok AI](https://x.ai/api/) and create one.
80+
81+
4. **Run the tests with PHPUnit:**
6882
```sh
6983
composer test
70-
or
71-
vendor/bin/pest
84+
```
85+
Or run **PHPUnit** manually:
86+
```sh
87+
vendor/bin/phpunit
7288
```
7389

7490
✅ If all tests pass, your PR is good to go!
91+
7592
❌ If tests fail, debug the issue before pushing changes.
7693

7794
---
7895

79-
## 📖 Coding Guidelines
96+
## Coding Guidelines
8097
✔️ Follow PSR-12 Standards
98+
8199
✔️ Use PHP 8.1+ Features (typed properties, enums, readonly properties)
100+
82101
✔️ Document Code Clearly (use PHPDoc annotations)
102+
83103
✔️ Write Meaningful Commit Messages
84104

85105
---
86106

87-
## 🔒 Security Policy
107+
## Security Policy
88108
If you discover a security vulnerability, please do NOT open a public issue. Instead, report it privately via email:
89109
📩 [thefeqy@gmail.com](thefeqy@gmail.com)
90110

91111
---
92112

93-
## 💡 Feature Requests & Discussions
113+
## Feature Requests & Discussions
94114
Open an issue in [GitHub Issues](https://github.com/grok-php/client/issues)
95115
Share ideas on new ***features, optimizations, or improvements***.
96116

0 commit comments

Comments
 (0)