From 63d2f40676cd619539013a90fcb7a37069c935b9 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Thu, 14 Nov 2019 20:58:43 +0800 Subject: [PATCH 1/3] Update CS. Signed-off-by: Mior Muhammad Zaki --- .php_cs | 1 + 1 file changed, 1 insertion(+) diff --git a/.php_cs b/.php_cs index b20bfaa..3c99545 100644 --- a/.php_cs +++ b/.php_cs @@ -12,6 +12,7 @@ return PhpCsFixer\Config::create() 'no_empty_comment' => false, 'no_extra_consecutive_blank_lines' => false, 'not_operator_with_successor_space' => true, + 'no_superfluous_phpdoc_tags' => false, 'ordered_imports' => ['sortAlgorithm' => 'alpha'], 'phpdoc_align' => false, 'phpdoc_no_empty_return' => false, From 21fb50cf7771be81e30aa90f70fd044819538051 Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sat, 7 Dec 2019 13:10:52 +0800 Subject: [PATCH 2/3] Update travis. Signed-off-by: Mior Muhammad Zaki --- .php_cs | 4 ++++ .travis.yml | 9 ++++++--- composer.json | 4 ++-- 3 files changed, 12 insertions(+), 5 deletions(-) diff --git a/.php_cs b/.php_cs index 3c99545..04546f1 100644 --- a/.php_cs +++ b/.php_cs @@ -8,9 +8,12 @@ return PhpCsFixer\Config::create() ->setRiskyAllowed(false) ->setRules([ '@Symfony' => true, + 'array_syntax' => ['syntax' => 'short'], 'binary_operator_spaces' => ['align_double_arrow' => false, 'align_equals' => false], + 'no_extra_blank_lines' => false, 'no_empty_comment' => false, 'no_extra_consecutive_blank_lines' => false, + 'no_unneeded_control_parentheses' => false, 'not_operator_with_successor_space' => true, 'no_superfluous_phpdoc_tags' => false, 'ordered_imports' => ['sortAlgorithm' => 'alpha'], @@ -18,6 +21,7 @@ return PhpCsFixer\Config::create() 'phpdoc_no_empty_return' => false, 'phpdoc_order' => true, 'pre_increment' => false, + 'self_accessor' => false, 'single_trait_insert_per_statement' => false, 'yoda_style' => false, ]) diff --git a/.travis.yml b/.travis.yml index 67fa5d1..91f7943 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,10 @@ +dist: bionic language: php -dist: xenial php: - 7.2 - 7.3 + - 7.4 env: global: @@ -13,9 +14,11 @@ env: - setup=lowest - setup=stable -before_script: +before_install: - travis_retry composer self-update - composer config discard-changes true + +before_script: - if [[ $setup = 'basic' ]]; then travis_retry composer install --prefer-dist --no-interaction --no-suggest; fi - if [[ $setup = 'stable' ]]; then travis_retry composer update --prefer-dist --no-interaction --no-suggest --prefer-stable; fi - if [[ $setup = 'lowest' ]]; then travis_retry composer update --prefer-dist --no-interaction --no-suggest --prefer-lowest --prefer-stable; fi @@ -23,7 +26,7 @@ before_script: script: - if [[ $coverage = 'yes' ]]; then vendor/bin/phpunit -c phpunit.xml --coverage-clover build/logs/clover.xml; fi - - if [[ $coverage = 'no' ]]; then vendor/bin/phpunit -c phpunit.xml --testdox --verbose; fi + - if [[ $coverage = 'no' ]]; then vendor/bin/phpunit -c phpunit.xml --verbose; fi after_script: - if [[ $setup = 'coveralls' ]]; then php vendor/bin/php-coveralls -v; fi diff --git a/composer.json b/composer.json index e92cbc9..65d72e5 100644 --- a/composer.json +++ b/composer.json @@ -30,8 +30,8 @@ "orchestra/support": "^4.0" }, "require-dev": { - "mockery/mockery": "^1.2", - "orchestra/testbench": "^4.0" + "mockery/mockery": "^1.3", + "orchestra/testbench": "^4.0.1" }, "extra": { "branch-alias": { From fe5f76dbb3cb89ecb8f2a4f7f4b16b0e42337a4b Mon Sep 17 00:00:00 2001 From: Mior Muhammad Zaki Date: Sun, 29 Dec 2019 20:24:53 +0800 Subject: [PATCH 3/3] Update files. Signed-off-by: Mior Muhammad Zaki --- .gitattributes | 4 +- .github/FUNDING.yml | 12 ++++ .github/ISSUE_TEMPLATE/bug_report.md | 13 ++++ .github/ISSUE_TEMPLATE/feature_request.md | 4 ++ .scrutinizer.yml | 29 --------- CODE_OF_CONDUCT.md | 76 +++++++++++++++++++++++ CONTRIBUTING.md | 31 +++++++++ 7 files changed, 139 insertions(+), 30 deletions(-) create mode 100644 .github/FUNDING.yml create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md delete mode 100644 .scrutinizer.yml create mode 100644 CODE_OF_CONDUCT.md create mode 100644 CONTRIBUTING.md diff --git a/.gitattributes b/.gitattributes index 0473bbf..da194fc 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,14 +1,16 @@ * text=auto # Ignore following folder/file. +/.github export-ignore /tests export-ignore /.coveralls.yml export-ignore /.gitattributes export-ignore /.gitignore export-ignore /.php_cs export-ignore -/.scrutinizer.yml export-ignore /.travis.yml export-ignore /phpunit.xml export-ignore /CHANGELOG-*.md export-ignore +/CODE_OF_CONDUCT.md export-ignore +/CONTRIBUTING.md export-ignore /LICENSE export-ignore /README.md export-ignore diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml new file mode 100644 index 0000000..fe4cb12 --- /dev/null +++ b/.github/FUNDING.yml @@ -0,0 +1,12 @@ +# These are supported funding model platforms + +github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] +patreon: crynobone +open_collective: # Replace with a single Open Collective username +ko_fi: # Replace with a single Ko-fi username +tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel +community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry +liberapay: # Replace with a single Liberapay username +issuehunt: # Replace with a single IssueHunt username +otechie: # Replace with a single Otechie username +custom: ["https://paypal.me/crynobone"] diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 0000000..b9aa603 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,13 @@ +--- +name: "Bug report" +about: 'Report a general library issue.' +--- + +- Package Version: #.#.# +- Laravel Version: #.#.# +- PHP Version: #.#.# + +### Description: + + +### Steps To Reproduce: diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 0000000..e530d76 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,4 @@ +--- +name: "Feature request" +about: 'For ideas or feature requests, please make a pull request, or open an issue' +--- diff --git a/.scrutinizer.yml b/.scrutinizer.yml deleted file mode 100644 index d0bb37e..0000000 --- a/.scrutinizer.yml +++ /dev/null @@ -1,29 +0,0 @@ -before_commands: - - 'composer install --prefer-dist --no-interaction' -filter: - paths: - - 'src/*' - excluded_paths: - - 'build/*' - - 'vendor/*' - - 'tests/*' -tools: - php_analyzer: true - php_mess_detector: true - php_code_sniffer: - config: - standard: PSR2 - php_code_coverage: - config_path: phpunit.xml - php_cpd: - excluded_dirs: - - vendor - - tests - php_loc: - excluded_dirs: - - vendor - - tests - php_pdepend: - excluded_dirs: - - vendor - - tests diff --git a/CODE_OF_CONDUCT.md b/CODE_OF_CONDUCT.md new file mode 100644 index 0000000..de3b599 --- /dev/null +++ b/CODE_OF_CONDUCT.md @@ -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 making 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 both within project spaces and in public spaces +when an individual is representing the project or its community. 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 crynobone@gmail.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 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 0000000..aa797d1 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,31 @@ +# Contributing + +Contributions are welcome, and are accepted via pull requests. Please review these guidelines before submitting any pull requests. + +## Guidelines + +* Please follow the [PSR-2 Coding Standard](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md). +* Ensure that the current tests pass, and if you've added something new, add the tests where relevant. +* Remember that we follow [SemVer](http://semver.org). If you are changing the behaviour, or the public api, you may need to update the docs. +* Send a coherent commit history, making sure each individual commit in your pull request is meaningful. If you had to make multiple intermediate commits while developing, please [squash](http://git-scm.com/book/en/Git-Tools-Rewriting-History) them before submitting. +* You may also need to [rebase](http://git-scm.com/book/en/Git-Branching-Rebasing) to avoid merge conflicts. + +## Running Tests + +You will need an install of [Composer](https://getcomposer.org) before continuing. + +First, install the dependencies: + +```bash +$ composer install +``` + +Then run phpunit: + +```bash +$ vendor/bin/phpunit +``` + +If the test suite passes on your local machine you should be good to go. + +When you make a pull request, the tests will automatically be run again by [Travis CI](https://travis-ci.org/) on multiple php versions and hhvm.