Skip to content

Commit c2f34d1

Browse files
Sync with CONTRIBUTING.md and CODE_OF_CONDUCT.md from sebastianbergmann/phpunit
1 parent 0f0a926 commit c2f34d1

File tree

2 files changed

+134
-0
lines changed

2 files changed

+134
-0
lines changed

.github/CODE_OF_CONDUCT.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# Contributor Code of Conduct
2+
3+
As contributors and maintainers of this project, and in the interest of fostering an open and welcoming community, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4+
5+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, religion, or nationality.
6+
7+
Examples of unacceptable behavior by participants include:
8+
9+
* The use of sexualized language or imagery
10+
* Personal attacks
11+
* Trolling or insulting/derogatory comments
12+
* Public or private harassment
13+
* Publishing other's private information, such as physical or electronic
14+
addresses, without explicit permission
15+
* Other unethical or unprofessional conduct
16+
17+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
18+
19+
By adopting this Code of Conduct, project maintainers commit themselves to fairly and consistently applying these principles to every aspect of managing this project. Project maintainers who do not follow or enforce the Code of Conduct may be permanently removed from the project team.
20+
21+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community.
22+
23+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project maintainer at [email protected]. All complaints will be reviewed and investigated and will result in a response that is deemed necessary and appropriate to the circumstances. Maintainers are obligated to maintain confidentiality with regard to the reporter of an incident.
24+
25+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.3.0, available at [https://contributor-covenant.org/version/1/3/0/][version]
26+
27+
[homepage]: https://contributor-covenant.org
28+
[version]: https://contributor-covenant.org/version/1/3/0/

.github/CONTRIBUTING.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# Contributing to `phpunit/php-text-template`
2+
3+
## Welcome!
4+
5+
We look forward to your contributions! Here are some examples how you can contribute:
6+
7+
* [Report a bug](https://github.com/sebastianbergmann/php-text-template/issues/new)
8+
* [Send a pull request to fix a bug](https://github.com/sebastianbergmann/php-text-template/pulls)
9+
10+
11+
## We have a Code of Conduct
12+
13+
Please note that this project is released with a [Contributor Code of Conduct](CODE_OF_CONDUCT.md). By participating in this project you agree to abide by its terms.
14+
15+
16+
## Any contributions you make will be under the BSD-3-Clause License
17+
18+
When you submit code changes, your submissions are understood to be under the same [BSD-3-Clause License](https://github.com/sebastianbergmann/php-text-template/blob/main/LICENSE) that covers the project. By contributing to this project, you agree that your contributions will be licensed under its BSD-3-Clause License.
19+
20+
21+
### Do Not Violate Copyright
22+
23+
Only submit a pull request with your own original code. Do NOT submit a pull request containing code which you have largely copied from
24+
another project, unless you wrote the respective code yourself.
25+
26+
Open Source does not mean that copyright does not apply. Copyright infringements will not be tolerated and can lead to you being banned from this project and repository.
27+
28+
29+
### Do Not Submit AI-Generated Pull Requests
30+
31+
The same goes for (largely) AI-generated pull requests. These are not welcome as they will be based on copyrighted code from others
32+
without accreditation and without taking the license of the original code into account, let alone getting permission
33+
for the use of the code or for re-licensing.
34+
35+
Aside from that, the experience is that AI-generated pull requests will be incorrect 100% of the time and cost reviewers too much time.
36+
Submitting a (largely) AI-generated pull request will lead to you being banned from this project and repository.
37+
38+
39+
## Write bug reports with detail, background, and sample code
40+
41+
[This is an example](https://github.com/sebastianbergmann/phpunit/issues/4376) of a bug report I wrote, and I think it's not too bad.
42+
43+
In your bug report, please provide the following:
44+
45+
* A quick summary and/or background
46+
* Steps to reproduce
47+
* Be specific!
48+
* Give sample code if you can.
49+
* What you expected would happen
50+
* What actually happens
51+
* Notes (possibly including why you think this might be happening, or stuff you tried that didn't work)
52+
53+
Please do not report a bug for a version of this library that is no longer supported. Please do not report a bug if you are using a version of PHP that is not supported by the version of this library you are using.
54+
55+
The library that is developed in this repository was either extracted from [PHPUnit](https://github.com/sebastianbergmann/phpunit) or developed specifically as a dependency for PHPUnit. Support for this library follows the [support for the version of PHPUnit that uses a specific version of this library](https://phpunit.de/supported-versions.html).
56+
57+
Please post code and output as text ([using proper markup](https://guides.github.com/features/mastering-markdown/)). Do not post screenshots of code or output.
58+
59+
60+
## Workflow for Pull Requests
61+
62+
1. Fork the repository.
63+
2. Create your branch from `main` if you plan to implement new functionality or change existing code significantly; create your branch from the oldest branch that is affected by the bug if you plan to fix a bug.
64+
3. Implement your change and add tests for it.
65+
4. Ensure the test suite passes.
66+
5. Ensure the code complies with our coding guidelines (see below).
67+
6. Send that pull request!
68+
69+
Please make sure you have [set up your username and email address](https://git-scm.com/book/en/v2/Getting-Started-First-Time-Git-Setup) for use with Git. Strings such as `silly nick name <root@localhost>` look really stupid in the commit history of a project.
70+
71+
We encourage you to [sign your Git commits with your GPG key](https://docs.github.com/en/github/authenticating-to-github/signing-commits).
72+
73+
Pull requests for bug fixes must be made for the oldest branch that is supported (see above). Pull requests for new features must be based on the `main` branch.
74+
75+
We are trying to keep backwards compatibility breaks to an absolute minimum. Please take this into account when proposing changes.
76+
77+
Due to time constraints, we are not always able to respond as quickly as we would like. Please do not take delays personal and feel free to remind us if you feel that we forgot to respond.
78+
79+
80+
## Development
81+
82+
This project uses [PHPUnit](https://phpunit.de/) for testing:
83+
84+
```shell
85+
./vendor/bin/phpunit
86+
```
87+
88+
This project uses [PHPStan](https://phpstan.org/) for static analysis:
89+
90+
```shell
91+
./tools/phpstan
92+
```
93+
94+
This project uses [PHP-CS-Fixer](https://cs.symfony.com/) to enforce coding guidelines:
95+
96+
```shell
97+
./tools/php-cs-fixer fix
98+
```
99+
100+
The commands shown above require an autoloader script at `vendor/autoload.php`. This can be generated like so:
101+
102+
```shell
103+
./tools/composer dump-autoload
104+
```
105+
106+
Please understand that we will not accept a pull request when its changes violate this project's coding guidelines or break the test suite.

0 commit comments

Comments
 (0)