Skip to content

Commit 2c1d383

Browse files
committed
doc: Update CONTRIBUTING.md
1 parent 90e768e commit 2c1d383

File tree

1 file changed

+72
-50
lines changed

1 file changed

+72
-50
lines changed

CONTRIBUTING.md

Lines changed: 72 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,38 @@
1-
# 🛠 Contributing to Grok AI Laravel
1+
# **Contributing to Grok AI Laravel**
22

3-
First off, thanks for taking the time to contribute! 🎉
4-
This guide outlines how you can help improve **Grok AI Laravel** and collaborate effectively.
3+
Thank you for considering contributing to **Grok AI Laravel**.
4+
This guide outlines how you can help improve the package and collaborate effectively.
55

66
---
77

8-
## 📖 Table of Contents
9-
- [🚀 Getting Started](#-getting-started)
10-
- [🐛 Reporting Bugs](#-reporting-bugs)
11-
- [Feature Requests](#-feature-requests)
12-
- [🛠 Development Workflow](#-development-workflow)
13-
- [🧪 Running Tests](#-running-tests)
14-
- [🙌 Acknowledgements](#-acknowledgements)
8+
## **Table of Contents**
9+
- [Getting Started](#getting-started)
10+
- [Reporting Bugs](#reporting-bugs)
11+
- [Feature Requests](#feature-requests)
12+
- [Development Workflow](#development-workflow)
13+
- [Running Tests](#running-tests)
14+
- [Acknowledgements](#acknowledgements)
1515

1616
---
1717

18-
## 🚀 Getting Started
18+
## **Getting Started**
1919

20-
### 1️⃣ Fork the Repository
20+
### 1. Fork the Repository
2121
Click the **"Fork"** button at the top right of this repository to create your copy.
2222

23-
### 2️⃣ Clone Your Fork
23+
### 2. Clone Your Fork
2424
```sh
2525
git clone https://github.com/your-username/laravel-grok.git
2626
cd laravel-grok
2727
```
2828

29-
### 3️⃣ Install Dependencies
30-
29+
### 3. Install Dependencies
3130
```sh
3231
composer install
3332
```
3433

35-
### 4️⃣ Link Your Local Package
36-
If you're testing this package inside a Laravel project, you may use:
34+
### 4. Link Your Local Package
35+
If you're testing this package inside a Laravel project, use:
3736

3837
```sh
3938
composer remove grok-php/laravel
@@ -42,75 +41,98 @@ composer require grok-php/laravel:@dev --prefer-source
4241

4342
---
4443

45-
## 🐛 Reporting Bugs
46-
Found a bug? Please [open an issue](https://github.com/grok-php/laravel/issues) and include:
44+
## **Reporting Bugs**
45+
If you find a bug, please [open an issue](https://github.com/grok-php/laravel/issues) and include:
4746

48-
- A clear description of the bug.
49-
- Steps to reproduce the issue.
50-
- The expected vs. actual behavior.
47+
- A clear description of the issue.
48+
- Steps to reproduce the problem.
49+
- Expected vs. actual behavior.
5150
- Any error messages or logs.
52-
- Your Laravel and PHP version.
51+
- Laravel and PHP versions used.
52+
53+
Providing as much detail as possible helps resolve the issue faster.
5354

5455
---
5556

56-
## ✨ Feature Requests
57-
Have an idea? We'd love to hear it!
58-
Submit a [feature request](https://github.com/grok-php/laravel/issues) with:
57+
## **Feature Requests**
58+
If you have an idea for improving the package, [submit a feature request](https://github.com/grok-php/laravel/issues) including:
5959

60-
- A detailed explanation of your proposed feature.
60+
- A detailed explanation of the proposed feature.
6161
- The problem it solves.
6262
- Example use cases.
6363

64+
Well-documented proposals have a higher chance of being implemented.
65+
6466
---
6567

66-
## 🛠 Development Workflow
68+
## **Development Workflow**
6769

68-
1- Create a new branch for your feature or fix:
70+
### 1. Create a New Branch
71+
Before making changes, create a new branch:
6972

7073
```sh
71-
git checkout -b feature/your-new-feature
74+
git checkout -b feature/your-feature-name
7275
```
7376

74-
2- Make Your Changes & Add Tests
75-
- Follow PSR-12 coding standards.
76-
- Use typed properties, enums, and traits.
77-
- Document your functions with PHPDoc.
78-
- Always write unit tests for new features.
79-
80-
3- Run tests before committing:
77+
### 2. Implement Your Changes
78+
- Follow **PSR-12** coding standards.
79+
- Use **typed properties, enums, and traits** where applicable.
80+
- Add PHPDoc comments for better readability.
81+
- Ensure backward compatibility.
8182

83+
### 3. Run Tests Before Committing
8284
```sh
8385
composer test
8486
```
85-
4- Commit Your Changes
8687

88+
### 4. Commit Your Changes
8789
```sh
8890
git add .
89-
git commit -m "✨ Added new feature X"
91+
git commit -m "Add feature X"
9092
```
9193

92-
7- Push to Your Fork
93-
94+
### 5. Push to Your Fork
9495
```sh
95-
git push origin feature/your-new-feature
96+
git push origin feature/your-feature-name
9697
```
9798

98-
6- Open a Pull Request (PR)
99-
- Go to [Grok PHP Client Repo](https://github.com/grok-php/laravel/pulls)
100-
- Click "New Pull Request", select your branch, and submit 🚀
99+
### 6. Open a Pull Request
100+
- Navigate to [Grok AI Laravel Pull Requests](https://github.com/grok-php/laravel/pulls).
101+
- Click "New Pull Request", select your branch, and submit.
102+
103+
A clear and well-documented PR speeds up the review process.
101104

102105
---
103106

104-
## 🧪 Running Tests
105-
We use PHPUnit for testing. Before submitting your PR, run:
107+
## **Running Tests**
108+
We use **PHPUnit** for testing. Before running tests, copy the PHPUnit configuration file:
109+
110+
```sh
111+
cp phpunit.xml.dist phpunit.xml
112+
```
113+
114+
Then, update your API key inside `phpunit.xml`:
115+
116+
```xml
117+
<php>
118+
<env name="GROK_API_KEY" value="your-api-key-here"/>
119+
</php>
120+
```
121+
122+
Once configured, run the tests:
106123

107124
```sh
108125
composer test
126+
```
109127
or
128+
```sh
110129
vendor/bin/phpunit
111130
```
112131

113-
## 🙌 Acknowledgements
114-
A huge thank you to everyone contributing! ❤️ Your efforts help improve this package for the entire Laravel community.
132+
Ensure all tests pass before submitting a PR.
133+
134+
---
115135

116-
🚀 Happy coding!
136+
## **Acknowledgements**
137+
Your contributions help make **Grok AI Laravel** better for the Laravel community.
138+
Thank you for taking the time to improve this package.

0 commit comments

Comments
 (0)