-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #19 from irazasyed/master
- Loading branch information
Showing
13 changed files
with
253 additions
and
9 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 |
---|---|---|
|
@@ -5,3 +5,4 @@ | |
/.gitattributes export-ignore | ||
/.github export-ignore | ||
/.gitignore export-ignore | ||
/.php_cs.dist 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,76 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to make participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, 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. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
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. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies within all project spaces, and it also applies when | ||
an individual is representing the project or its community in public spaces. | ||
Examples of representing a project or community include using an official | ||
project e-mail address, posting via an official social media account, or acting | ||
as an appointed representative at an online or offline event. Representation of | ||
a project may be further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at `syed at lukonet.com`. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html | ||
|
||
[homepage]: https://www.contributor-covenant.org | ||
|
||
For answers to common questions about this code of conduct, see | ||
https://www.contributor-covenant.org/faq |
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,37 @@ | ||
# Contributing Guide | ||
|
||
We welcome contributions to this project. Please read the following guide before posting an issue or sending in pull requests. | ||
Please also read our [Code of Conduct](CODE_OF_CONDUCT.md) before contributing or engaging in discussions. | ||
|
||
## Issues | ||
|
||
- **Feature requests** need to describe as thoroughly as possible and perhaps contain some info on how you would implement it. | ||
- **Bug reports** need to be described in detail what the problem is, how it was triggered and perhaps contain a possible solution. | ||
- **Questions** are free to be asked about the internals of the codebase and about the project, check out [Support](SUPPORT.md) for more details. | ||
|
||
## Pull Requests | ||
|
||
- **Feature requests** first need to be discussed and accepted through an issue before sending in a pull request. | ||
- **Bug fixes** should contain [regression tests](https://laracasts.com/lessons/regression-testing). | ||
- **[Coding standards](#coding-standards)** should be followed. | ||
- **Add tests** Ensure that the current tests pass, and if you've added something new, add the tests where relevant. | ||
- **Document any change in behaviour** - Make sure the relevant documentation are up-to-date. | ||
- **Consider our release cycle** - We try to follow [SemVer v2.0.0](https://semver.org/). Randomly breaking public APIs is not an option. | ||
- **Create feature branches** - Don't ask us to pull from your master branch. | ||
- **One pull request per feature** - If you want to do more than one thing, send multiple pull requests. | ||
- **Send coherent history** - Make sure each individual commit in your pull request is meaningful. | ||
|
||
## Coding Standards | ||
|
||
- [PSR-12 Coding Standard](https://www.php-fig.org/psr/psr-12/) will automatically be applied by Github Actions. | ||
- Make sure to typehint and declare return type where applicable. | ||
|
||
## Testing | ||
|
||
All tests can be run with the following command. | ||
|
||
``` bash | ||
$ composer test | ||
``` | ||
|
||
**Happy coding**! |
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,28 @@ | ||
--- | ||
name: 🐛 Bug Report | ||
about: Report errors and problems. | ||
|
||
--- | ||
|
||
- **Library Version**: #.#.# | ||
- **Lumen Version**: #.#.# | ||
- **PHP Version**: #.#.# | ||
|
||
**Description** | ||
<!-- A clear and concise description of the problem. --> | ||
|
||
**Steps To Reproduce** | ||
<!-- Steps, Code, and/or config needed to reproduce the problem. --> | ||
|
||
**Possible Solution** | ||
<!--- Optional: only if you have suggestions on a fix/reason for the bug --> | ||
|
||
**Additional Context** | ||
<!-- Optional: any other context about the problem: log messages, screenshots, etc. --> | ||
|
||
<details> | ||
<summary>Logs</summary> | ||
<!-- PLEASE PASTE YOUR LOG FILE(S) DATA HERE --> | ||
<!-- MAKE SURE TO REDACT TOKEN & OTHER SENSITIVE INFO --> | ||
|
||
</details> |
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,11 @@ | ||
--- | ||
name: 🚀 Feature Request | ||
about: RFC and ideas for new features and improvements | ||
--- | ||
|
||
**Description** | ||
<!-- A clear and concise description of the new feature. --> | ||
|
||
**Example** | ||
<!-- A simple example of the new feature in action (include PHP code, sample snippets, etc.) | ||
If the new feature changes an existing feature, include a simple before/after comparison. --> |
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,8 @@ | ||
blank_issues_enabled: false | ||
contact_links: | ||
- name: PHP Chat Community on Slack | ||
url: https://phpchat.co | ||
about: 'For any help and support from the community on Slack' | ||
- name: PHP Chat Community on Telegram | ||
url: https://t.me/PHPChatCo | ||
about: 'For any help and support from the community on Telegram' |
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,12 @@ | ||
# Security Policy | ||
|
||
We take security very seriously. We follow the rule of [responsible disclosure](https://en.wikipedia.org/wiki/Responsible_disclosure), and we | ||
encourage the community to as well. | ||
|
||
## Supported Versions | ||
|
||
After each new major release, the previous release will be supported for no less than 6 months, unless explicitly stated otherwise. This may mean there are multiple supported versions at any given time. | ||
|
||
## Reporting a Vulnerability | ||
|
||
If you discover a security vulnerability within this package, please email Syed at `syed at lukonet.com`. All security vulnerabilities will be promptly addressed. Please do not disclose security-related issues publicly until a fix has been announced. |
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,6 @@ | ||
# Support Questions | ||
|
||
Larasupport's GitHub issue trackers are not intended to provide help or support. Instead, use one of the following channels: | ||
|
||
- [PHP Chat](https://phpchat.co/?utm_source=larasupport-gh) Community on Slack. | ||
- [PHP Chat](https://t.me/PHPChatCo) Community on Telegram. |
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,25 @@ | ||
name: Code Style | ||
|
||
on: [push] | ||
|
||
jobs: | ||
php-cs-fixer: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ github.head_ref }} | ||
|
||
- name: Run PHP CS Fixer | ||
uses: docker://oskarstark/php-cs-fixer-ga | ||
with: | ||
args: --config=.php_cs.dist --allow-risky=yes | ||
|
||
- name: Commit changes | ||
uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
commit_message: Apply PHP CS Fixer changes | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
vendor | ||
composer.lock | ||
.php_cs.cache |
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,38 @@ | ||
<?php | ||
|
||
$finder = PhpCsFixer\Finder::create()->in(__DIR__); | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRules([ | ||
'@PSR2' => true, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'not_operator_with_successor_space' => true, | ||
'no_extra_blank_lines' => [ | ||
'curly_brace_block', | ||
'extra', | ||
'parenthesis_brace_block', | ||
'throw', | ||
'use', | ||
], | ||
'no_unused_imports' => true, | ||
'ordered_imports' => ['sortAlgorithm' => 'alpha'], | ||
'ternary_operator_spaces' => true, | ||
'single_blank_line_before_namespace' => true, | ||
|
||
// PSR-12 | ||
'blank_line_after_opening_tag' => true, | ||
'braces' => ['allow_single_line_closure' => true], | ||
'compact_nullable_typehint' => true, | ||
'concat_space' => ['spacing' => 'one'], | ||
'declare_equal_normalize' => ['space' => 'none'], | ||
'function_typehint_space' => true, | ||
'new_with_braces' => true, | ||
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'], | ||
'no_empty_statement' => true, | ||
'no_leading_import_slash' => true, | ||
'no_leading_namespace_whitespace' => true, | ||
'no_whitespace_in_blank_line' => true, | ||
'return_type_declaration' => ['space_before' => 'none'], | ||
'single_trait_insert_per_statement' => true, | ||
]) | ||
->setFinder($finder); |
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
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