Skip to content

Commit

Permalink
Update CONTRIBUTING guide (#2261)
Browse files Browse the repository at this point in the history
* Revise contributing guide to incorporate recent developments

* Implement PR review feedback

Co-authored-by: Djordy Koert <djordy.koert@gmail.com>

---------

Co-authored-by: Djordy Koert <djordy.koert@gmail.com>
  • Loading branch information
DominicLuidold and DjordyKoert authored Apr 11, 2024
1 parent a585e50 commit 29e90a2
Showing 1 changed file with 41 additions and 19 deletions.
60 changes: 41 additions & 19 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,50 @@
Contributing
============
# Contributing

First of all, **thank you** for contributing, **you are awesome**!
First of all, **thank you** for contributing, **you are awesome**! With your contribution, you not only improve this
bundle, but also become part of a [great community](https://github.com/nelmio/NelmioApiDocBundle/graphs/contributors)
maintaining it.

Here are a few rules to follow in order to ease code reviews, and discussions before
maintainers accept and merge your work.
## Guidelines

You MUST follow the [PSR-1](http://www.php-fig.org/psr/psr-1/) and
[PSR-2](http://www.php-fig.org/psr/psr-2/). If you don't know about any of them, you
should really read the recommendations. Can't wait? Use the [PHP-CS-Fixer
tool](http://cs.sensiolabs.org/).
Here are a few guidelines to follow in order to ease code reviews, and discussions before maintainers can accept and
merge your work. Thank you!

You MUST run the test suite (run `composer update`, and then execute `composer run phpunit`).
The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT",
"RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in
[RFC 2119](https://datatracker.ietf.org/doc/html/rfc2119).

You MUST write (or update) unit tests.
### Code Style

You SHOULD write documentation.
Code MUST adhere to all rules outlined in the
[Symfony Coding Standards](https://symfony.com/doc/current/contributing/code/standards.html) as
defined by the [@Symfony](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer/blob/master/doc/ruleSets/Symfony.rst) rule set,
utilized by the [PHP-CS-Fixer](https://cs.symfony.com) tool.

Please, write [commit messages that make
sense](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html),
and [rebase your branch](http://git-scm.com/book/en/Git-Branching-Rebasing)
before submitting your Pull Request.
You SHOULD run `composer run phpcs-check` to check for any violations. You SHOULD run `composer run phpcs-fix` to
fix any potential issues.

Also, while creating your Pull Request on GitHub, you MUST write a description
which gives the context and/or explains why you are creating it.
### Code Quality

Thank you!
You MUST use the static analysis tool [PHPStan](https://phpstan.org/) to analyse any newly added or revised code within
this bundle.

You MUST run `composer run phpstan` to check for any violations. You MUST fix all violations related to any newly added
or revised code.

### Tests

You MUST write (or update) unit and/or functional tests for any newly added or revised functionality within this bundle.

You MUST validate newly added or revised tests by running `composer run phpunit`.

### Documentation

You SHOULD write (or update) documentation.

You SHOULD write
[commit messages that make sense](https://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).

You MUST [rebase your branch](https://git-scm.com/book/en/v2/Git-Branching-Rebasing) before submitting your Pull Request.

While creating your Pull Request on GitHub, you MUST write a description which gives the context and/or explains why you
are creating it.

0 comments on commit 29e90a2

Please sign in to comment.