Skip to content

Commit

Permalink
Merge pull request #191: docs: update CONTRIBUTING.md
Browse files Browse the repository at this point in the history
  • Loading branch information
roxblnfk authored Apr 5, 2024
2 parents a8dd4da + 4002820 commit faa3a4e
Show file tree
Hide file tree
Showing 3 changed files with 108 additions and 40 deletions.
4 changes: 3 additions & 1 deletion .github/.release-please-config.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"release-type": "node",
"release-type": "php",
"include-component-in-tag": false,
"include-v-in-tag": false,
"changelog-type": "github",
"packages": {
".": {
"package-name": "database",
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

# https://github.com/wayofdev/gh-actions/blob/master/.github/workflows/create-release.yml
# https://github.com/google-github-actions/release-please-action#release-types-supported
# https://github.com/googleapis/release-please/blob/main/docs/customizing.md

on: # yamllint disable-line rule:truthy
push:
Expand Down
143 changes: 104 additions & 39 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,56 +1,121 @@
# Contributing
Feel free to contribute to the development of the Cycle DBAL.
Please make sure that the following requirements are satisfied before submitting your pull request:

* KISS
* PSR-12
* `declare(strict_types=1);` is mandatory
* Your code must include tests
We welcome contributions to the Cycle DBAL project. Whether you're looking to fix bugs, add new features, or improve documentation, your help is appreciated. Please follow the guidelines below to ensure a smooth contribution process.

> Use our discord server to check for the advice or suggestion https://discord.gg/FZ9BCWg
Before submitting your pull request, ensure that your changes adhere to the following principles:

## Testing Cycle DBAL
To test Cycle DBAL locally, download the `cycle/database` repository and start docker containers inside the tests folder:
- Keep It Simple, Stupid (KISS)
- Follow PSR-12 coding standards
- Use `declare(strict_types=1);` at the beginning of all PHP files
- Include tests with your code to verify your changes

```bash
$ cd tests/
$ docker-composer up
```
Feel free to join our **Discord** server for advice or suggestions: 🤖 [SpiralPHP Discord](https://discord.gg/spiralphp)

To run full test suite:
<br>

```bash
$ ./vendor/bin/phpunit
```
## 🛠️ Setting Up for Development

To run quick test suite:
### → Testing Cycle DBAL

```bash
$ ./vendor/bin/phpunit --group driver-sqlite
```
To set up a local development environment for testing:

## Help Needed In
If you want to help but don't know where to start:
1. Clone the `cycle/database` repository.

* TODOs
* Updating to latest dev-dependencies (PHPUnit, Mockery, etc)
* Quality recommendations and improvements
* Check [Open Issues](https://github.com/cycle/database/issues)
* More tests are always welcome
* Typos
```bash
git clone [email protected]:cycle/database.git
```
2. Navigate to the `tests/` directory and start the Docker containers:

Feel free to propose any ideas related to architecture, docs (___docs are never complete___), adaptation or community.
```bash
cd tests/
docker-compose up
```

> Original guide author is not a native English speaker, feel free to create PR for any text corrections.
3. To run the full test suite:

## Critical/Security Issues
If you found something which shouldn't be there or a bug which opens a security hole please let me know immediately by email
[[email protected]](mailto:[email protected])
```bash
./vendor/bin/phpunit
```

## Official Support
Cycle DBAL are maintained by [Spiral Scout](https://spiralscout.com/).
4. For a quicker test suite, focusing on SQLite:

For commercial support please contact [email protected].
```bash
./vendor/bin/phpunit --group driver-sqlite
```

## Licensing
Cycle DBAL will remain under [MIT license](/LICENSE) indefinitely.
### → Workflow

1. Fork the repository on GitHub.
2. Create a new branch on your fork for your feature, fix, or update.
3. Make your changes, commit, and push them to your branch.
4. Submit a pull request to the `master` branch of the original repository.

Please ensure that each pull request focuses on a single feature, fix, or update to maintain clarity and ease of review.

<br>

## 📝 Contribution Checklist

- **Tests:** Your PR should include tests that cover your changes.
- **Code Quality:** Run `make lint` to ensure your code follows our coding standards and `make lint-psalm` for static analysis with [Psalm](https://psalm.dev).
- **Documentation:** Update the documentation to reflect your changes or additions.

<br>

## ✉️ Commit Message Guidelines

We follow the [Conventional Commits](https://www.conventionalcommits.org/en/v1.0.0/) specification. Commit messages should be structured as follows to ensure a clear and consistent project history:

**Allowed Prefixes:**

| Prefix | Purpose |
|------------|---------------------------------------------------------------|
| `feat` | Introduces a new feature |
| `fix` | Fixes a bug |
| `perf` | Improves performance |
| `docs` | Documentation only changes |
| `style` | Code style changes (formatting, missing semi-colons, etc.) |
| `deps` | Updates dependencies |
| `refactor` | Code changes that neither fixes a bug nor adds a feature |
| `ci` | Changes to our CI configuration files and scripts |
| `test` | Adding missing tests or correcting existing tests |
| `revert` | Reverts a previous commit |
| `build` | Changes that affect the build system or external dependencies |
| `chore` | Other changes that don't modify src or test files |
<br>
## 🔒 Reporting Security Vulnerabilities
If you discover a security vulnerability, please report it to us immediately via email at [[email protected]](mailto:[email protected]). We take security seriously and will promptly address any issues.
<br>
## 🤝 Help Wanted
If you're looking for ways to contribute but are unsure where to start, consider the following areas:

- **Documentation:** Help us improve and expand our documentation to make it more comprehensive and easier to understand.
- **Architecture Changes:** Propose or implement improvements to the project's architecture to enhance its efficiency, scalability, or usability.
- **Performance Enhancements:** Identify and contribute improvements to make Cycle DBAL faster and more resource-efficient.
- **Feature Suggestions:** Have an idea for a new feature? Let us know or contribute code to make it happen.
For more specific tasks or if you're unsure where to start, check our [Open Issues](https://github.com/cycle/database/issues).

<br>

## 🙋‍♂️ Official Support

Cycle DBAL is maintained by [Spiral Scout](https://spiralscout.com/). For commercial support, contact [[email protected]](mailto:[email protected]).

<br>

## 🔖 Licensing

Cycle DBAL is available under the [MIT license](/LICENSE).

<br>

## 🌐 Community and Conduct

Please ensure your interactions in the project are respectful and inclusive. Read our [Code of Conduct](https://github.com/cycle/database/blob/2.x/CODE_OF_CONDUCT.md) for more information.

0 comments on commit faa3a4e

Please sign in to comment.