Thank you for considering contributing to kantui! This document outlines the process and guidelines for contributing.
- PHP 8.3 or higher
- Composer
-
Fork the repository
-
Clone your fork:
git clone https://github.com/your-username/kantui.git cd kantui -
Install dependencies:
composer install
-
Run the application:
./bin/kantui
# Run all tests
composer test
# Run tests with coverage
composer test:coverage
# Generate HTML coverage report
composer test:coverage-htmlBefore submitting a pull request, ensure your code passes all quality checks:
# Run all checks (formatting, static analysis, tests)
composer check
# Or run individually:
composer format # Format code with Laravel Pint
composer format:test # Check code formatting
composer analyse # Run PHPStan static analysis
composer test # Run Pest testsThis project uses Laravel Pint for code formatting. The configuration is defined in pint.json.
- Run
composer formatto automatically format your code - Run
composer format:testto check formatting without making changes - All code must pass Pint checks before being merged
We use PHPStan for static analysis with configuration in phpstan.neon:
composer analyseEnsure your code passes all PHPStan checks at the configured level.
Use descriptive branch names:
feature/add-new-keybindingfix/todo-deletion-bugdocs/update-readmerefactor/widget-structure
Write clear, descriptive commit messages:
- Use the imperative mood ("Add feature" not "Added feature")
- Keep the first line under 72 characters
- Add detailed description if needed after a blank line
Examples:
Add support for custom color themes
- Add theme configuration option
- Implement color scheme switching
- Update documentation
-
Update your fork with the latest changes from main:
git fetch upstream git rebase upstream/main
-
Push your changes:
git push origin your-branch-name
-
Create a pull request with:
- Clear title describing the change
- Description of what changed and why
- Reference to any related issues
- Screenshots/demos for UI changes
-
Ensure all CI checks pass
- Write tests for all new features and bug fixes
- Use Pest for testing (see
tests/directory for examples) - Aim for high test coverage
- Test both happy paths and edge cases
- Update the README.md if you add new features or change functionality
- Document new configuration options
- Add inline comments for complex logic
- Update PHPDoc blocks for new methods and classes
Include:
- Clear, descriptive title
- Steps to reproduce the issue
- Expected behavior
- Actual behavior
- PHP version and OS
- Any relevant error messages or logs
Include:
- Clear description of the feature
- Use cases and benefits
- Potential implementation approach (optional)
Please note that this project adheres to a Code of Conduct (see CODE_OF_CONDUCT.md). By participating, you are expected to uphold this code.
Feel free to open an issue for any questions about contributing!