-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit d207502
Showing
15 changed files
with
644 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
; This file is for unifying the coding style for different editors and IDEs. | ||
; More information at http://editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
indent_size = 4 | ||
indent_style = space | ||
end_of_line = lf | ||
insert_final_newline = true | ||
trim_trailing_whitespace = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# Path-based git attributes | ||
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html | ||
|
||
# Ignore all test and documentation with "export-ignore". | ||
/.editorconfig export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.scrutinizer.yml export-ignore | ||
/.travis.yml export-ignore | ||
/PULL_REQUEST_TEMPLATE.md export-ignore | ||
/ISSUE_TEMPLATE.md export-ignore | ||
/phpcs.xml.dist export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/tests export-ignore | ||
/docs export-ignore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
name: Continuous Integration | ||
on: [ push, pull_request ] | ||
jobs: | ||
main: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php | ||
with: | ||
php-version: '8.0' | ||
coverage: xdebug | ||
- name: Install Composer dependencies | ||
run: | | ||
composer self-update --no-interaction | ||
composer update --no-interaction --prefer-dist --optimize-autoloader | ||
- name: Run CI Commands | ||
run: | | ||
composer ci-run |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
build | ||
composer.lock | ||
vendor | ||
phpcs.xml | ||
phpunit.xml | ||
infection.json | ||
.phpunit.result.cache | ||
.php_cs.cache | ||
coverage.clover |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->in([__DIR__ . '/src', __DIR__ . '/tests']); | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRiskyAllowed(true) | ||
->setRules( | ||
[ | ||
'@Symfony' => true, | ||
'binary_operator_spaces' => ['align_double_arrow' => true, 'align_equals' => true], | ||
'ordered_imports' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'void_return' => true, | ||
'declare_strict_types' => true, | ||
'yoda_style' => true, | ||
'increment_style' => ['style' => 'post'], | ||
'concat_space' => ['spacing' => 'one'], | ||
] | ||
) | ||
->setFinder($finder) | ||
->setUsingCache(true); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,133 @@ | ||
|
||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
We as members, contributors, and leaders pledge to make participation in our | ||
community a harassment-free experience for everyone, regardless of age, body | ||
size, visible or invisible disability, ethnicity, sex characteristics, gender | ||
identity and expression, level of experience, education, socio-economic status, | ||
nationality, personal appearance, race, religion, or sexual identity | ||
and orientation. | ||
|
||
We pledge to act and interact in ways that contribute to an open, welcoming, | ||
diverse, inclusive, and healthy community. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to a positive environment for our | ||
community include: | ||
|
||
* Demonstrating empathy and kindness toward other people | ||
* Being respectful of differing opinions, viewpoints, and experiences | ||
* Giving and gracefully accepting constructive feedback | ||
* Accepting responsibility and apologizing to those affected by our mistakes, | ||
and learning from the experience | ||
* Focusing on what is best not just for us as individuals, but for the | ||
overall community | ||
|
||
Examples of unacceptable behavior include: | ||
|
||
* The use of sexualized language or imagery, and sexual attention or | ||
advances of any kind | ||
* Trolling, insulting or derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or email | ||
address, without their explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Enforcement Responsibilities | ||
|
||
Community leaders are responsible for clarifying and enforcing our standards of | ||
acceptable behavior and will take appropriate and fair corrective action in | ||
response to any behavior that they deem inappropriate, threatening, offensive, | ||
or harmful. | ||
|
||
Community leaders 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, and will communicate reasons for moderation | ||
decisions when appropriate. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all community spaces, and also applies when | ||
an individual is officially representing the community in public spaces. | ||
Examples of representing our community include using an official e-mail address, | ||
posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported to the community leaders responsible for enforcement at | ||
[INSERT CONTACT METHOD]. | ||
All complaints will be reviewed and investigated promptly and fairly. | ||
|
||
All community leaders are obligated to respect the privacy and security of the | ||
reporter of any incident. | ||
|
||
## Enforcement Guidelines | ||
|
||
Community leaders will follow these Community Impact Guidelines in determining | ||
the consequences for any action they deem in violation of this Code of Conduct: | ||
|
||
### 1. Correction | ||
|
||
**Community Impact**: Use of inappropriate language or other behavior deemed | ||
unprofessional or unwelcome in the community. | ||
|
||
**Consequence**: A private, written warning from community leaders, providing | ||
clarity around the nature of the violation and an explanation of why the | ||
behavior was inappropriate. A public apology may be requested. | ||
|
||
### 2. Warning | ||
|
||
**Community Impact**: A violation through a single incident or series | ||
of actions. | ||
|
||
**Consequence**: A warning with consequences for continued behavior. No | ||
interaction with the people involved, including unsolicited interaction with | ||
those enforcing the Code of Conduct, for a specified period of time. This | ||
includes avoiding interactions in community spaces as well as external channels | ||
like social media. Violating these terms may lead to a temporary or | ||
permanent ban. | ||
|
||
### 3. Temporary Ban | ||
|
||
**Community Impact**: A serious violation of community standards, including | ||
sustained inappropriate behavior. | ||
|
||
**Consequence**: A temporary ban from any sort of interaction or public | ||
communication with the community for a specified period of time. No public or | ||
private interaction with the people involved, including unsolicited interaction | ||
with those enforcing the Code of Conduct, is allowed during this period. | ||
Violating these terms may lead to a permanent ban. | ||
|
||
### 4. Permanent Ban | ||
|
||
**Community Impact**: Demonstrating a pattern of violation of community | ||
standards, including sustained inappropriate behavior, harassment of an | ||
individual, or aggression toward or disparagement of classes of individuals. | ||
|
||
**Consequence**: A permanent ban from any sort of public interaction within | ||
the community. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], | ||
version 2.0, available at | ||
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html][v2.0]. | ||
|
||
Community Impact Guidelines were inspired by | ||
[Mozilla's code of conduct enforcement ladder][Mozilla CoC]. | ||
|
||
For answers to common questions about this code of conduct, see the FAQ at | ||
[https://www.contributor-covenant.org/faq][FAQ]. Translations are available | ||
at [https://www.contributor-covenant.org/translations][translations]. | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
[v2.0]: https://www.contributor-covenant.org/version/2/0/code_of_conduct.html | ||
[Mozilla CoC]: https://github.com/mozilla/diversity | ||
[FAQ]: https://www.contributor-covenant.org/faq | ||
[translations]: https://www.contributor-covenant.org/translations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# Contributing | ||
|
||
If you're here, you would like to contribute to this repository and you're really welcome! | ||
|
||
|
||
## Bug reports | ||
|
||
If you find a bug or a documentation issue, please report it or even better: fix it :). If you report it, | ||
please be as precise as possible. Here is a little list of required information: | ||
|
||
- Precise description of the bug | ||
- Details of your environment (for example: OS, PHP version, installed extensions) | ||
- Backtrace which might help identifing the bug | ||
|
||
|
||
## Feature requests | ||
|
||
If you think a feature is missing, please report it or even better: implement it :). If you report it, describe the more | ||
precisely what you would like to see implemented and we will discuss what is the best approach for it. If you can do | ||
some research before submitting it and link the resources to your description, you're awesome! It will allow us to more | ||
easily understood/implement it. | ||
|
||
|
||
## Sending a Pull Request | ||
|
||
If you're here, you are going to fix a bug or implement a feature and you're the best! | ||
To do it, first fork the repository, clone it and create a new branch with the following commands: | ||
|
||
``` bash | ||
$ git clone git@github.com:your-name/pz-composer.git | ||
$ git checkout -b feature-or-bug-fix-description | ||
``` | ||
|
||
Then install the dependencies through [Composer](https://getcomposer.org/): | ||
|
||
``` bash | ||
$ composer install | ||
``` | ||
|
||
Write code and tests. When you are ready, run the tests. | ||
(This is usually [PHPUnit](http://phpunit.de/)) | ||
|
||
``` bash | ||
$ composer test | ||
``` | ||
|
||
When you are ready with the code, tested it and documented it, you can commit and push it with the following commands: | ||
|
||
``` bash | ||
$ git commit -m "Feature or bug fix description" | ||
$ git push origin feature-or-bug-fix-description | ||
``` | ||
|
||
**Note:** Please write your commit messages in the imperative and follow the | ||
[guidelines](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html) for clear and concise messages. | ||
|
||
Then [create a pull request](https://help.github.com/articles/creating-a-pull-request/) on GitHub. | ||
|
||
Please make sure that each individual commit in your pull request is meaningful. | ||
If you had to make multiple intermediate commits while developing, | ||
please squash them before submitting with the following commands | ||
(here, we assume you would like to squash 3 commits in a single one): | ||
|
||
``` bash | ||
$ git rebase -i HEAD~3 | ||
``` | ||
|
||
If your branch conflicts with the master branch, you will need to rebase and repush it with the following commands: | ||
|
||
``` bash | ||
$ git remote add upstream git@github.com:project-zer0/pz-composer.git | ||
$ git pull --rebase upstream master | ||
$ git push -f origin feature-or-bug-fix-description | ||
``` | ||
|
||
|
||
## Coding standard | ||
|
||
This repository follows the [PSR-2 standard](http://www.php-fig.org/psr/psr-2/) and so, if you want to contribute, | ||
you must follow these rules. | ||
|
||
|
||
## Semver | ||
|
||
We are trying to follow [semver](http://semver.org/). When you are making BC breaking changes, | ||
please let us know why you think it is important. | ||
In this case, your patch can only be included in the next major version. | ||
|
||
|
||
## Code of Conduct | ||
|
||
This project is released with a [Contributor Code of Conduct](CONDUCT.md). | ||
By participating in this project you agree to abide by its terms. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2021 Aurimas Niekis | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in all | ||
copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE | ||
SOFTWARE. |
Oops, something went wrong.