Skip to main content

Contributing to LarAgent

We welcome contributions to LarAgent! Whether it’s improving documentation, fixing bugs, or adding new features, your help is appreciated. This guide will walk you through the process of setting up your development environment and submitting contributions.
Need help in contributing? Join our Discord community, send β€œ@Maintainer πŸ› οΈ onboard me” in any channel and we will help you to get started.

Development Setup

Follow these steps to set up your local development environment:
  1. Fork the repository on GitHub
  2. Clone your fork:
  3. Install dependencies:
  4. Create a new branch for your feature or bugfix:

Coding Guidelines

When contributing to LarAgent, please follow these guidelines to ensure your code meets our standards:

Code Style

  • Use type hints and return types where possible
  • Add PHPDoc blocks for classes and methods
  • Keep methods focused and concise
  • Follow PSR-12 coding standards
LarAgent uses PHP CS Fixer to maintain code style. You can run it with:

Testing

All new features and bug fixes should include tests. LarAgent uses PEST for testing.
  • Add tests for new features
  • Ensure all tests pass before submitting:
  • Maintain or improve code coverage

Documentation

Good documentation is crucial for any project:
  • Add PHPDoc blocks for new classes and methods
  • Include examples for new features
  • Consider updating the official documentation for major changes

Commit Guidelines

  • Use clear, descriptive commit messages
  • Reference issues and pull requests in your commits
  • Keep commits focused and atomic

Pull Request Process

Follow these steps to submit your contributions:
  1. Update your fork with the latest changes from main:
  2. Push your changes to your fork:
  3. Create a Pull Request with:
    • Clear title and description
    • List of changes and impact
    • Any breaking changes highlighted
    • Screenshots/examples if relevant
The maintainers aim to review all pull requests within 2 weeks.

Getting Help

If you need assistance while contributing:
  • Open an issue for bugs or feature requests
  • Join discussions in existing issues
  • Join our Discord community
  • Reach out to maintainers for guidance

Security Vulnerabilities

If you discover a security vulnerability, please review our security policy on how to report it properly.

Running Tests

You can run the test suite with:
For more specific tests:
Thank you for contributing to LarAgent! Your efforts help make the package better for everyone.