Thank you for considering contributing to illuminate-cli! This document provides guidelines and instructions for contributing to the project.
Please be respectful and considerate in all interactions. We're all here to improve the project together.
- PHP 8.2 or higher
- Composer
- Git
-
Fork the repository on GitHub
-
Clone your fork locally:
git clone https://github.com/YOUR-USERNAME/illuminate-cli.git cd illuminate-cli -
Install dependencies:
composer install
-
Build the application:
php illuminate app:build illuminate
We use Pest for testing. Run the test suite with:
composer testWe use Laravel Pint for code formatting. Before committing:
# Check formatting
composer format:test
# Fix formatting issues
composer formatWe use PHPStan with Larastan for static analysis:
# Run analysis
composer phpstan
# Generate baseline (if needed)
composer phpstan:baseline-
Create a new branch for your feature/fix:
git checkout -b feature/your-feature-name
-
Make your changes following these guidelines:
- Write clear, descriptive commit messages
- Add tests for new functionality
- Update documentation as needed
- Follow existing code style and patterns
- Keep changes focused and atomic
-
Ensure all checks pass:
composer test composer format:test composer phpstan -
Commit your changes:
git add . git commit -m "Add: description of your changes"
-
Push to your fork:
git push origin feature/your-feature-name
-
Create a Pull Request on GitHub
- All tests pass (
composer test) - Code is properly formatted (
composer format) - Static analysis passes (
composer phpstan) - Documentation is updated (if applicable)
- Commit messages are clear and descriptive
Please include:
- A clear description of the changes
- The motivation/reasoning behind the changes
- Any breaking changes or migration notes
- Related issue numbers (if applicable)
- Place feature tests in
tests/Feature/ - Use descriptive test names that explain what is being tested
- Follow the existing test structure and patterns
- Test both success and failure cases
- Use Pest's expect syntax for assertions
Example:
test('validation passes when valid data is provided', function () {
$this->artisan('validation:make', [
'--data' => json_encode(['email' => 'test@example.com']),
'--rules' => json_encode(['email' => 'required|email']),
])->assertExitCode(0);
});- Aim for comprehensive test coverage of new features
- Don't decrease existing coverage
- Focus on testing behavior, not implementation details
- Add PHPDoc blocks to all public methods and classes
- Include parameter types and return types
- Document any non-obvious logic with inline comments
- Keep docblocks concise and accurate
Example:
/**
* Validate the given data against rules.
*
* @param array<string, mixed> $data
* @param array<string, mixed> $rules
* @return \Illuminate\Validation\Validator
*/
protected function validator(array $data, array $rules): Validator
{
// Implementation
}- Update relevant markdown files in
/docsfor user-facing changes - Include examples where helpful
- Keep language clear and concise
When adding support for a new Laravel component:
- Create command(s) in
app/Commands/[Component]/ - Add configuration in
config/if needed - Create comprehensive tests in
tests/Feature/[Component]/ - Add documentation in
docs/[component].md - Update the README.md to list the new component
Include:
- Clear description of the bug
- Steps to reproduce
- Expected vs actual behavior
- PHP version and environment details
- Relevant code samples or error messages
Include:
- Clear description of the proposed feature
- Use cases and benefits
- Potential implementation approach (optional)
- Any potential drawbacks or considerations
If you have questions about contributing, feel free to:
- Open an issue for discussion
- Check existing issues and pull requests
- Review the documentation in
/docs
By contributing to illuminate-cli, you agree that your contributions will be licensed under the MIT License.
Thank you for contributing!