Skip to content

Commit ece334b

Browse files
Jonathan D.A. Jewellclaude
andcommitted
chore: sync template files and configuration
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 23bc9e1 commit ece334b

2 files changed

Lines changed: 113 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Contributing to php-aegis
2+
3+
Thank you for your interest in contributing to php-aegis!
4+
5+
## Getting Started
6+
7+
### Prerequisites
8+
9+
- PHP 8.1 or higher
10+
- Composer
11+
- Git
12+
13+
### Development Setup
14+
15+
```bash
16+
# Clone the repository
17+
git clone https://github.com/hyperpolymath/php-aegis.git
18+
cd php-aegis
19+
20+
# Install dependencies
21+
composer install
22+
23+
# Run tests to verify setup
24+
vendor/bin/phpunit
25+
```
26+
27+
## How to Contribute
28+
29+
### Reporting Bugs
30+
31+
1. Check [existing issues](https://github.com/hyperpolymath/php-aegis/issues) to avoid duplicates
32+
2. Create a new issue with:
33+
- Clear, descriptive title
34+
- Steps to reproduce
35+
- Expected vs actual behavior
36+
- PHP version and environment details
37+
38+
### Suggesting Features
39+
40+
1. Open a [new issue](https://github.com/hyperpolymath/php-aegis/issues/new) with the `enhancement` label
41+
2. Describe the use case and security benefit
42+
3. Include example API if proposing new methods
43+
44+
### Submitting Code
45+
46+
1. Fork the repository
47+
2. Create a feature branch: `git checkout -b feature/your-feature`
48+
3. Write tests for new functionality
49+
4. Ensure all tests pass: `vendor/bin/phpunit`
50+
5. Run static analysis: `vendor/bin/phpstan analyse src`
51+
6. Submit a pull request
52+
53+
## Code Standards
54+
55+
### PHP Standards
56+
57+
This project follows [PSR-12](https://www.php-fig.org/psr/psr-12/) coding standards.
58+
59+
```bash
60+
# Check formatting
61+
vendor/bin/php-cs-fixer fix --dry-run
62+
63+
# Auto-fix formatting
64+
vendor/bin/php-cs-fixer fix
65+
```
66+
67+
### Documentation
68+
69+
- All public methods must have PHPDoc comments
70+
- Include `@param` and `@return` annotations
71+
- Document security considerations where relevant
72+
73+
### Testing
74+
75+
- New features require tests
76+
- Security-related code requires comprehensive test coverage
77+
- Use meaningful test method names: `test_validator_rejects_invalid_email()`
78+
79+
## Security Contributions
80+
81+
Given the security-focused nature of this project:
82+
83+
- **Do not** submit PRs that fix security vulnerabilities publicly
84+
- Instead, follow the process in [SECURITY.md](SECURITY.md)
85+
- Security enhancements (new features) can be submitted normally
86+
87+
## License
88+
89+
By contributing, you agree that your contributions will be licensed under the MIT License.

justfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# php-aegis justfile
2+
3+
default:
4+
@just --list
5+
6+
# Install dependencies
7+
install:
8+
composer install
9+
10+
# Run tests
11+
test:
12+
vendor/bin/phpunit
13+
14+
# Run static analysis
15+
analyze:
16+
vendor/bin/phpstan analyse src
17+
18+
# Format check
19+
lint:
20+
vendor/bin/php-cs-fixer fix --dry-run
21+
22+
# Format code
23+
fmt:
24+
vendor/bin/php-cs-fixer fix

0 commit comments

Comments
 (0)