-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Switched from PSR-2 to PSR-12 - Added roave/security-advisories & squizlabs/php_codesniffer as dev requirements - Switched from LGPL to ISC - Switched from Travis to GitHub actions - Added CODE_OF_CONDUCT - Added issue templates - Added pull request template - Switched from BMC to GitHub sponsors - Applied small bugfixes - Fixed some spelling issues
- Loading branch information
1 parent
445efd2
commit 61b5fc1
Showing
22 changed files
with
510 additions
and
2,037 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,12 @@ | ||
# These are supported funding model platforms | ||
|
||
github: softcreatr # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] | ||
patreon: # Replace with a single Patreon username | ||
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: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
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,48 @@ | ||
--- | ||
name: 🐛 Bug Report | ||
about: Submit a bug report, to help us improve. | ||
labels: "bug" | ||
--- | ||
|
||
## 🐛 Bug Report | ||
|
||
(A clear and concise description of what the bug is) | ||
|
||
## Have you spent some time to check if this issue has been raised before? | ||
|
||
[ ] I have read googled for a similar issue or checked our older issues for a similar bug | ||
|
||
### Have you read the [Code of Conduct](https://github.com/SoftCreatR/php-mime-detector/blob/main/CODE_OF_CONDUCT.md)? | ||
|
||
[ ] I have read the Code of Conduct | ||
|
||
## To Reproduce | ||
|
||
(Write your steps here:) | ||
|
||
## Expected behavior | ||
|
||
<!-- | ||
How did you expect your project to behave? | ||
It’s fine if you’re not sure your understanding is correct. | ||
Write down what you thought would happen. | ||
--> | ||
|
||
(Write what you thought would happen.) | ||
|
||
## Actual Behavior | ||
|
||
<!-- | ||
Did something go wrong? | ||
Is something broken, or not behaving as you expected? | ||
Describe this section in detail, and attach screenshots if possible. | ||
Don't only say "it doesn't work"! | ||
--> | ||
|
||
(Write what happened. Add screenshots, if applicable.) | ||
|
||
## Your Environment | ||
|
||
<!-- Include as many relevant details about the environment you experienced the bug in --> | ||
|
||
(Write Environment, Operating system and version etc.) |
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,13 @@ | ||
--- | ||
name: 📚 Documentation | ||
about: Report an issue related to documentation. | ||
labels: "documentation" | ||
--- | ||
|
||
## 📚 Documentation | ||
|
||
(A clear and concise description of what the issue is.) | ||
|
||
### Have you read the [Code of Conduct](https://github.com/SoftCreatR/php-mime-detector/blob/main/CODE_OF_CONDUCT.md)? | ||
|
||
[ ] I have read the Code of Conduct |
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 @@ | ||
--- | ||
name: 💡 Feature / Idea | ||
about: Submit a proposal for a new feature. | ||
labels: "feature" | ||
--- | ||
|
||
## 💡 Feature / Idea | ||
|
||
(A clear and concise description of what the feature is.) | ||
|
||
## Have you spent some time to check if this issue has been raised before? | ||
|
||
[ ] I have read googled for a similar issue or checked our older issues for a similar idea | ||
|
||
### Have you read the [Code of Conduct](https://github.com/SoftCreatR/php-mime-detector/blob/main/CODE_OF_CONDUCT.md)? | ||
|
||
[ ] I have read the Code of Conduct | ||
|
||
## Pitch | ||
|
||
(Please explain why this feature should be implemented and how it would be used. Add examples, if applicable.) |
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 @@ | ||
<!-- | ||
Thank you for sending the PR! We appreciate you spending the time to work on these changes. | ||
Help us understand your motivation by explaining why you decided to make this change. | ||
Happy contributing! | ||
--> | ||
|
||
# 🔀 Pull Request | ||
|
||
## What does this PR do? | ||
|
||
(Provide a description of what this PR does.) | ||
|
||
## Test Plan | ||
|
||
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.) | ||
|
||
## Related PRs and Issues | ||
|
||
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.) |
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,56 @@ | ||
--- | ||
name: Test | ||
|
||
on: | ||
push: | ||
paths: | ||
- '**.php' | ||
- 'composer.json' | ||
branches: | ||
- 'main' | ||
pull_request: | ||
paths: | ||
- '**.php' | ||
- 'composer.json' | ||
branches: | ||
- 'main' | ||
workflow_dispatch: | ||
|
||
jobs: | ||
run: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
php: [ '7.2', '7.3', '7.4', '8.0' ] | ||
continue-on-error: ${{ matrix.php == '8.0' }} | ||
name: PHP ${{ matrix.php }} Test | ||
|
||
steps: | ||
- name: Git checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Checkout submodules | ||
run: git submodule update --init --recursive | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
coverage: pcov | ||
env: | ||
COMPOSER_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Setup problem matchers for PHPUnit | ||
run: echo "::add-matcher::${{ runner.tool_cache }}/phpunit.json" | ||
|
||
- name: Install dependencies | ||
run: composer update --prefer-dist --no-interaction | ||
|
||
- name: Run phpcs | ||
run: composer cs-check -- -v | ||
|
||
- name: Execute tests | ||
run: composer test -- -v --coverage-clover=coverage.xml | ||
|
||
- name: Run codecov | ||
uses: codecov/codecov-action@v1 |
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,5 +1,8 @@ | ||
composer.phar | ||
composer.lock | ||
/vendor/ | ||
.idea | ||
phpunit.xml | ||
.phpunit.result.cache | ||
.phpcs-cache | ||
.php_cs.cache |
This file was deleted.
Oops, something went wrong.
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, 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 [email protected]. 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
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 @@ | ||
ISC License | ||
|
||
Copyright (c) 2020, Sascha Greuel <[email protected]> and Contributors | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted, provided that the above | ||
copyright notice and this permission notice appear in all copies. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
Oops, something went wrong.