Skip to content

Commit

Permalink
docs: add a contribution quide
Browse files Browse the repository at this point in the history
  • Loading branch information
COil committed Oct 10, 2024
1 parent fb66c3a commit f1f0780
Show file tree
Hide file tree
Showing 5 changed files with 91 additions and 10 deletions.
6 changes: 4 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -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

<!--
Expand Down
80 changes: 80 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -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.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (©) 2024 Strangebuzz.com
Copyright (©) 2023-2024 Strangebuzz.com

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Or with Castor:
Open [https://127.0.0.1:8000](https://127.0.0.1:8000) (considering your 8000 port is free) and enjoy! 🙂


### FrankenPHP 🧟‍
### Quick-start with FrankenPHP 🧟‍

We can also use [FrankenPHP](https://frankenphp.dev/) to run MicroSymfony.
You must have [Docker](https://www.docker.com/) installed locally.
Expand Down Expand Up @@ -139,10 +139,11 @@ to fix some issues as the project is not maintained anymore.

## Features branches 🚅

Features branches will not be merged in the main branch but are used to integrate
a new vendor library or make a [POC](https://en.wikipedia.org/wiki/Proof_of_concept).
For example, have you ever dreamed of testing [Eloquent](https://laravel.com/docs/11.x/eloquent#introduction),
the Laravel ORM, on a Symfony project?
[Features branches](https://github.com/strangebuzz/MicroSymfony/pulls?q=is%3Apr+is%3Aopen+label%3A%22feature+branch%22)
will not be merged in the main branch but are used to integrate a new vendor library
or make a [POC](https://en.wikipedia.org/wiki/Proof_of_concept).
For example, have you ever dreamed of testing [Eloquent](https://laravel.com/docs/11.x/eloquent#introduction), the Laravel ORM,
on a Symfony project?
Then clone the `eloquent` branch, run `composer install`, and you are done.


Expand Down
2 changes: 0 additions & 2 deletions tests/Functional/Controller/StaticRoutesSmokeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@
* Extracted and simplified from the "pierstoval/smoke-testing" package.
*
* @see https://github.com/Pierstoval/SmokeTesting
*
* @author Alex "Pierstoval" Rock <[email protected]>
*/
final class StaticRoutesSmokeTest extends WebTestCase
{
Expand Down

0 comments on commit f1f0780

Please sign in to comment.