Skip to content

Latest commit

 

History

History
96 lines (69 loc) · 2.27 KB

CONTRIBUTING.md

File metadata and controls

96 lines (69 loc) · 2.27 KB

🛠 Contributing to Grok PHP Client

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


📌 How to Contribute

1️⃣ Fork the Repository

Click the "Fork" button at the top-right of the repository.

2️⃣ Clone Your Fork

git clone https://github.com/your-username/grok-php-client.git
cd grok-php-client

3️⃣ Install Dependencies

Ensure you have Composer installed, then run:

composer install

4️⃣ Run Tests Before Making Changes

To confirm everything works before adding new changes:

composer test
or
vendor/bin/pest

5️⃣ Create a New Branch

git checkout -b feature/your-new-feature

6️⃣ Make Your Changes & Add Tests

  • Follow PSR-12 coding standards.
  • Use typed properties, enums, and traits.
  • Document your functions with PHPDoc.
  • Always write unit tests for new features.

7️⃣ Commit Your Changes

git add .
git commit -m "✨ Added new feature X"

8️⃣ Push to Your Fork

git push origin feature/your-new-feature

9️⃣ Open a Pull Request (PR)

Go to Grok PHP Client Repo Click "New Pull Request", select your branch, and submit 🚀


🧪 Running Tests

We use Pest PHP for testing. Before submitting your PR, run:

composer test
or
vendor/bin/pest

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


📖 Coding Guidelines

✔️ Follow PSR-12 Standards ✔️ Use PHP 8.1+ Features (typed properties, enums, readonly properties) ✔️ Document Code Clearly (use PHPDoc annotations) ✔️ Write Meaningful Commit Messages


🔒 Security Policy

If you discover a security vulnerability, please do NOT open a public issue. Instead, report it privately via email: 📩 thefeqy@gmail.com


💡 Feature Requests & Discussions

Open an issue in GitHub Issues Share ideas on new features, optimizations, or improvements.