Skip to content

Commit 0fc8669

Browse files
committed
Add contributing markdown
1 parent 967fb86 commit 0fc8669

File tree

1 file changed

+118
-0
lines changed

1 file changed

+118
-0
lines changed

CONTRIBUTING.md

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Contributing to Laravel Data Extractor
2+
3+
Thank you for considering contributing to Laravel Data Extractor! We welcome contributions from the community.
4+
5+
## Development Setup
6+
7+
1. **Fork the repository** and clone your fork locally
8+
2. **Install dependencies**:
9+
```bash
10+
composer install
11+
```
12+
3. **Copy the configuration**:
13+
```bash
14+
cp phpstan.neon.dist phpstan.neon
15+
```
16+
17+
## Development Workflow
18+
19+
### Code Quality
20+
21+
Before submitting any changes, ensure your code passes all quality checks:
22+
23+
```bash
24+
# Format code
25+
composer format
26+
27+
# Run static analysis
28+
composer analyse
29+
30+
# Run tests
31+
composer test
32+
33+
# Run tests with coverage
34+
composer test-coverage
35+
```
36+
37+
### Testing
38+
39+
- All new features must include tests
40+
- Tests are written using **Pest PHP**
41+
- Use Orchestra Testbench for Laravel package testing
42+
- Ensure tests pass on all supported Laravel versions (10, 11, 12)
43+
44+
### Code Style
45+
46+
- Follow PSR-12 coding standards
47+
- Use Laravel Pint for code formatting (`composer format`)
48+
- Maintain consistency with existing codebase patterns
49+
50+
## Contribution Guidelines
51+
52+
### Pull Requests
53+
54+
1. **Create a feature branch** from `main`
55+
2. **Make your changes** with clear, descriptive commits
56+
3. **Add tests** for new functionality
57+
4. **Update documentation** if needed
58+
5. **Run quality checks** (format, analyse, test)
59+
6. **Submit pull request** with clear description
60+
61+
### Commit Messages
62+
63+
Use clear and descriptive commit messages:
64+
- Use present tense ("Add feature" not "Added feature")
65+
- Use imperative mood ("Move cursor to..." not "Moves cursor to...")
66+
- Limit first line to 72 characters
67+
- Reference issues and pull requests when applicable
68+
69+
### Bug Reports
70+
71+
When reporting bugs, include:
72+
- Laravel version
73+
- PHP version
74+
- Package version
75+
- Steps to reproduce
76+
- Expected vs actual behavior
77+
- Code examples (if applicable)
78+
79+
### Feature Requests
80+
81+
For new features:
82+
- Explain the use case
83+
- Provide examples of how it would work
84+
- Consider backward compatibility
85+
- Discuss implementation approach
86+
87+
## Development Standards
88+
89+
### Security
90+
91+
- Never commit sensitive information
92+
- Validate all inputs appropriately
93+
- Follow Laravel security best practices
94+
- Use proper SQL escaping for generated queries
95+
96+
### Architecture
97+
98+
- Follow existing patterns and conventions
99+
- Use dependency injection where appropriate
100+
- Maintain separation of concerns
101+
- Keep classes focused and cohesive
102+
103+
### Documentation
104+
105+
- Update CLAUDE.md for architectural changes
106+
- Add PHPDoc comments for public methods
107+
- Include usage examples for new features
108+
- Keep README.md current
109+
110+
## Getting Help
111+
112+
- Check existing issues and pull requests
113+
- Review the codebase and tests for examples
114+
- Ask questions in issues for clarification
115+
116+
## License
117+
118+
By contributing, you agree that your contributions will be licensed under the [MIT License](LICENSE.md).

0 commit comments

Comments
 (0)