Skip to content

Commit 295b8c6

Browse files
authored
Merge pull request #493 from cakephp/add-contributing-guide
Add contributing guide
2 parents d7ad1ae + 5a0e01c commit 295b8c6

1 file changed

Lines changed: 85 additions & 0 deletions

File tree

CONTRIBUTING.md

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
# Contributing to Chronos
2+
3+
Thank you for your interest in contributing to Chronos! This document provides guidelines and instructions for contributing.
4+
5+
## Getting Started
6+
7+
1. Fork the repository
8+
2. Clone your fork:
9+
```bash
10+
git clone https://github.com/YOUR_USERNAME/chronos.git
11+
cd chronos
12+
```
13+
3. Install dependencies:
14+
```bash
15+
composer install
16+
```
17+
18+
## Running Tests
19+
20+
Run the test suite using PHPUnit:
21+
22+
```bash
23+
composer test
24+
```
25+
26+
Or directly:
27+
28+
```bash
29+
vendor/bin/phpunit
30+
```
31+
32+
## Code Style
33+
34+
This project follows the [CakePHP coding standards](https://book.cakephp.org/5/en/contributing/cakephp-coding-conventions.html).
35+
36+
Check for coding standard violations:
37+
38+
```bash
39+
composer cs-check
40+
```
41+
42+
Automatically fix coding standard violations:
43+
44+
```bash
45+
composer cs-fix
46+
```
47+
48+
## Static Analysis
49+
50+
PHPStan is used for static analysis. First, install the tools:
51+
52+
```bash
53+
composer stan-setup
54+
```
55+
56+
Then run the analysis:
57+
58+
```bash
59+
composer stan
60+
```
61+
62+
## Running All Checks
63+
64+
To run tests, coding standards, and static analysis together:
65+
66+
```bash
67+
composer check
68+
```
69+
70+
## Submitting Changes
71+
72+
1. Create a new branch for your changes
73+
2. Make your changes and commit them with clear, descriptive messages
74+
3. Ensure all checks pass (`composer check`)
75+
4. Push to your fork and submit a pull request
76+
77+
## Reporting Issues
78+
79+
- Search existing issues before creating a new one
80+
- Include PHP version, Chronos version, and a minimal reproduction case
81+
- Use clear, descriptive titles
82+
83+
## Documentation
84+
85+
Documentation source files are located in the `docs/` directory. The documentation is published at [book.cakephp.org/chronos](https://book.cakephp.org/chronos/3/en/).

0 commit comments

Comments
 (0)