First off, thank you for considering contributing to Pancake! Your input and contributions help us make this library better for everyone. This document outlines the process and guidelines for contributing to the project.
- Fork the repository: Visit Pancake on GitHub and click the
Fork
button. - Clone your fork: Use the following command to clone the repository locally:
git clone https://github.com/<your-username>/pancake.git
- Install dependencies: Run the following command to install the necessary dependencies via Composer:
composer install
- Create a branch: Create a new branch for your feature or bug fix:
git checkout -b <feature-or-bugfix-name>
- Follow the PHP-FIG PSRs (e.g., PSR-1, PSR-12).
- Ensure your code is clean and readable.
- Use meaningful variable and method names.
- Pancake targets PHP 8+ but aims to maintain compatibility with lower PHP versions when feasible. Test your changes across multiple PHP versions if possible.
- We use PHPUnit for unit testing. Add tests for any new features or bug fixes.
- Ensure that the library maintains at least 80% code coverage.
- Run tests locally using:
./vendor/bin/phpunit
- Update documentation in the
docs/
directory and any relevant markdown files if your changes affect functionality. - Documentation is published via GitHub Pages, so ensure all updates are clear and concise.
- The library is distributed via Composer. Ensure that
composer.json
reflects accurate metadata and dependencies for your changes.
- Commit your changes: Follow good commit message practices. Example:
[FEATURE] Add new Pancake flipping method
- Push your branch: Push your branch to your forked repository:
git push origin <feature-or-bugfix-name>
- Create a Pull Request (PR): Go to the original Pancake repository and open a pull request.
- Code follows the PSRs and project standards.
- All tests pass with PHPUnit.
- Code coverage is at least 80%.
- Documentation has been updated (if required).
- PR description clearly explains the purpose and changes.
If you find a bug or have a feature request, please open an issue in the GitHub Issues section. Include as much detail as possible:
- Steps to reproduce (for bugs)
- Use cases and rationale (for features)
- Environment details (e.g., PHP version, OS)
If you have any questions or need help contributing, feel free to reach out by opening a discussion in the repository. We're happy to assist!
Thank you for contributing to Pancake! π₯ Together, we can build a better library.