From 2d55e00d55a177580f053851c0a7463f439b1646 Mon Sep 17 00:00:00 2001 From: COil <vernet.loic@gmail.com> Date: Thu, 10 Oct 2024 08:25:11 +0200 Subject: [PATCH] docs: add a contribution quide --- .github/PULL_REQUEST_TEMPLATE.md | 6 +- CONTRIBUTING.md | 80 +++++++++++++++++++ .../Controller/StaticRoutesSmokeTest.php | 2 - 3 files changed, 84 insertions(+), 4 deletions(-) create mode 100644 CONTRIBUTING.md diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 3e3f76a..f070293 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -1,11 +1,13 @@ | Q | A |---------------| --- | Branch? | main/eloquent/doctrine-dbal/frankenphp +| Cleanup? | yes/no | Bug fix? | yes/no -| Issues | Fix #... <!-- prefix each issue number with "Fix #", no need to create an issue if none exists, explain below instead --> +| Fixed tickets | #1234, #5678 | New feature? | yes/no +| Doc added? | yes/no +| Tests pass? | yes | Deprecations? | yes/no -| Cleanup? | yes/no | License | MIT <!-- diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..2e39044 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,80 @@ +# Contributing to MicroSymfony + +This contribution guide was taken and adapted from [API-Platform](https://github.com/api-platform/api-platform/blob/main/.github/CONTRIBUTING.md?plain=1). + +First, thank you for contributing, you're awesome! + +To have your code integrated in the MicroSymfony project, there are some rules to +follow, but don't panic, it's easy! + + +## Reporting Bugs + +If you happen to find a bug, we kindly request you to report it. However, before submitting it, please: + +* Check the [project documentation available online](README.md) + +Then, if it appears that it's a real bug, you may report it using Github by following these 3 points: + +* Check if the bug is not [already reported](https://github.com/strangebuzz/MicroSymfony/issues?q=is%3Aopen+is%3Aissue+label%3Abug)! +* A clear title to resume the issue +* A description of the workflow needed to reproduce the bug, + +> _NOTE:_ Don’t hesitate to give as much information as you can (OS, PHP version extensions...) + + +## Pull Requests + +### Writing a Pull Request + +You should base your changes on the `main` branch. + +### Matching Coding Standards + +The API Platform project follows [Symfony coding standards](https://symfony.com/doc/current/contributing/code/standards.html). +But don't worry, you can fix CS issues automatically using the [PHP CS Fixer](https://github.com/PHP-CS-Fixer/PHP-CS-Fixer) tool: + +```bash +make fix-php +``` + +or + +```bash +castor fix-php +``` + +And then, add fixed file to your commit before push. +Be sure to add only **your modified files**. +If another files are fixed by cs tools, just revert it before commit. + +### Sending a Pull Request + +When you send a PR, just make sure that: + +* You add valid test cases (your code may already be covered by the [automated smoke tests](https://github.com/strangebuzz/MicroSymfony/blob/main/tests/Functional/Controller/StaticRoutesSmokeTest.php)). +* Tests are green. +* Your PR must include some documentation +* You make the PR on the same branch you based your changes on. If you see commits + that you did not make in your PR, you're doing it wrong. +* Also don't forget to add a comment when you update a PR with a ping to [the maintainers](https://github.com/orgs/strangebuzz/people), + so he/she will get a notification. +* Don't add `@author` doc blocks to the added code + +Fill in the header from the pull request template and confirm to create your pull +request. + +If there are more than one commit in your PR, they will be automatically be squashed +when the PR is accepted and merge. + + +# License and Copyright Attribution + +When you open a Pull Request to the MicroSymfony project, you agree to license your +code under the [MIT license](LICENSE) and to transfer the copyright on the submitted +code to [Strangebuzz](https://github.com/strangebuzz). + +Be sure to you have the right to do that (if you are a professional, ask your company)! + +If you include code from another project, please mention it in the Pull Request +description and credit the original author. \ No newline at end of file diff --git a/tests/Functional/Controller/StaticRoutesSmokeTest.php b/tests/Functional/Controller/StaticRoutesSmokeTest.php index 6b3ff09..eef8f91 100644 --- a/tests/Functional/Controller/StaticRoutesSmokeTest.php +++ b/tests/Functional/Controller/StaticRoutesSmokeTest.php @@ -13,8 +13,6 @@ * Extracted and simplified from the "pierstoval/smoke-testing" package. * * @see https://github.com/Pierstoval/SmokeTesting - * - * @author Alex "Pierstoval" Rock <pierstoval@gmail.com> */ final class StaticRoutesSmokeTest extends WebTestCase {