generated from yiisoft/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 7
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 1f88c75
Showing
23 changed files
with
980 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,14 @@ | ||
# editorconfig.org | ||
|
||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
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,37 @@ | ||
# Autodetect text files | ||
* text=auto | ||
|
||
# ...Unless the name matches the following overriding patterns | ||
|
||
# Definitively text files | ||
*.php text | ||
*.css text | ||
*.js text | ||
*.txt text | ||
*.md text | ||
*.xml text | ||
*.json text | ||
*.bat text | ||
*.sql text | ||
*.yml text | ||
|
||
# Ensure those won't be messed up with | ||
*.png binary | ||
*.jpg binary | ||
*.gif binary | ||
*.ttf binary | ||
|
||
# Ignore some meta files when creating an archive of this repository | ||
/.github export-ignore | ||
/.editorconfig export-ignore | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.scrutinizer.yml export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/tests export-ignore | ||
/docs export-ignore | ||
|
||
# Avoid merge conflicts in CHANGELOG | ||
# https://about.gitlab.com/2015/02/10/gitlab-reduced-merge-conflicts-by-90-percent-with-changelog-placeholders/ | ||
/CHANGELOG.md merge=union | ||
|
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,67 @@ | ||
# Yii Contributor Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
As contributors and maintainers of this project, and in order to keep Yii community open and welcoming, we ask to respect all community members. | ||
|
||
## 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 | ||
* Personal attacks | ||
* Trolling or insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing other's private information, such as physical or electronic | ||
addresses, 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 posting via an official social media account, | ||
within project GitHub, official forum or acting as an appointed representative at | ||
an online or offline event. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported | ||
by contacting core team members. 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.0, available at | ||
[http://contributor-covenant.org/version/1/4/][version] | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
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,23 @@ | ||
# Prerequisites | ||
|
||
- [Yii goal and values](https://github.com/yiisoft/docs/blob/master/001-yii-values.md) | ||
- [Namespaces](https://github.com/yiisoft/docs/blob/master/004-namespaces.md) | ||
- [Git commit messages](https://github.com/yiisoft/docs/blob/master/006-git-commit-messages.md) | ||
- [Exceptions](https://github.com/yiisoft/docs/blob/master/007-exceptions.md) | ||
- [Interfaces](https://github.com/yiisoft/docs/blob/master/008-interfaces.md) | ||
|
||
# Getting started | ||
|
||
Since Yii 3 consists of many packages, we have a [special development tool](https://github.com/yiisoft/docs/blob/master/005-development-tool.md). | ||
|
||
1. [Clone the repository](https://github.com/yiisoft/yii-dev-tool). | ||
|
||
2. [Set up your own fork](https://github.com/yiisoft/yii-dev-tool#using-your-own-fork). | ||
|
||
3. Now you are ready. Fork any package listed in `packages.php` and do `./yii-dev install username/package`. | ||
|
||
If you don't have any particular package in mind to start with: | ||
|
||
- [Check roadmap](https://github.com/yiisoft/docs/blob/master/003-roadmap.md). | ||
- Check package issues at github. Usually there are some. | ||
- Ask @samdark. |
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,4 @@ | ||
# These are supported funding model platforms | ||
|
||
open_collective: yiisoft | ||
github: [yiisoft] |
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,16 @@ | ||
|
||
|
||
### What steps will reproduce the problem? | ||
|
||
### What is the expected result? | ||
|
||
### What do you get instead? | ||
|
||
|
||
### Additional info | ||
|
||
| Q | A | ||
| ---------------- | --- | ||
| Version | 1.0.? | ||
| PHP version | | ||
| Operating system | |
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 @@ | ||
| Q | A | ||
| ------------- | --- | ||
| Is bugfix? | ✔️/❌ | ||
| New feature? | ✔️/❌ | ||
| Breaks BC? | ✔️/❌ | ||
| Fixed issues | comma-separated list of tickets # fixed by the PR, if any |
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 @@ | ||
# Security Policy | ||
|
||
Please use the [security issue form](https://www.yiiframework.com/security) to report to us any security issue you | ||
find in Yii. DO NOT use the issue tracker or discuss it in the public forum as it will cause more damage than help. | ||
|
||
Please note that as a non-commercial OpenSource project we are not able to pay bounties at the moment. |
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,94 @@ | ||
on: | ||
- pull_request | ||
- push | ||
|
||
name: build | ||
|
||
jobs: | ||
tests: | ||
name: PHP ${{ matrix.php-version }}-${{ matrix.os }} | ||
env: | ||
extensions: curl, mbstring, dom, intl, json, libxml, xml, xmlwriter | ||
key: cache-v1 | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
- windows-latest | ||
|
||
php-version: | ||
- "7.4" | ||
- "8.0" | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup cache environment | ||
id: cache-env | ||
uses: shivammathur/cache-extensions@v1 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: ${{ env.extensions }} | ||
key: ${{ env.key }} | ||
|
||
- name: Cache extensions | ||
uses: actions/cache@v1 | ||
with: | ||
path: ${{ steps.cache-env.outputs.dir }} | ||
key: ${{ steps.cache-env.outputs.key }} | ||
restore-keys: ${{ steps.cache-env.outputs.key }} | ||
|
||
- name: Install PHP with extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php-version }} | ||
extensions: ${{ env.extensions }} | ||
ini-values: date.timezone='UTC' | ||
coverage: pcov | ||
tools: composer:v2 | ||
|
||
- name: Determine composer cache directory on Linux | ||
if: matrix.os == 'ubuntu-latest' | ||
run: echo "::set-env name=COMPOSER_CACHE_DIR::$(composer config cache-dir)" | ||
|
||
- name: Determine composer cache directory on Windows | ||
if: matrix.os == 'windows-latest' | ||
run: ECHO "::set-env name=COMPOSER_CACHE_DIR::~\AppData\Local\Composer" | ||
|
||
- name: Cache dependencies installed with composer | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE_DIR }} | ||
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
php${{ matrix.php-version }}-composer- | ||
- name: Install dependencies with composer php 7.4 | ||
if: matrix.php-version == '7.4' | ||
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader | ||
|
||
- name: Install dependencies with composer php 8.0 | ||
if: matrix.php-version == '8.0' | ||
run: composer update --ignore-platform-reqs --prefer-dist --no-interaction --no-progress --optimize-autoloader | ||
|
||
- name: Run tests with phpunit and coverage on Linux php 7.4 | ||
if: matrix.os == 'ubuntu-latest' && matrix.php-version == '7.4' | ||
run: vendor/bin/phpunit --coverage-clover=coverage.clover | ||
|
||
- name: Run tests with phpunit without coverage on Linux php 8.0 | ||
if: matrix.os == 'ubuntu-latest' && matrix.php-version == '8.0' | ||
run: vendor/bin/phpunit | ||
|
||
- name: Run tests with phpunit without coverage on Windows | ||
if: matrix.os == 'windows-latest' | ||
run: vendor/bin/phpunit | ||
|
||
- name: Upload code coverage scrutinizer on Linux php 7.4 | ||
if: matrix.os == 'ubuntu-latest' && matrix.php-version == '7.4' | ||
run: | | ||
wget https://scrutinizer-ci.com/ocular.phar | ||
php ocular.phar code-coverage:upload --format=php-clover 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,55 @@ | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- "master" | ||
|
||
name: mutation test | ||
|
||
jobs: | ||
mutation: | ||
name: PHP ${{ matrix.php-version }}-${{ matrix.os }} | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
|
||
php-version: | ||
- "7.4" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
ini-values: memory_limit=-1 | ||
coverage: "pcov" | ||
tools: composer:v2 | ||
|
||
- name: Determine composer cache directory | ||
run: echo "::set-env name=COMPOSER_CACHE_DIR::$(composer config cache-dir)" | ||
|
||
- name: Cache dependencies installed with composer | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE_DIR }} | ||
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
php${{ matrix.php-version }}-composer- | ||
- name: Install dependencies with composer | ||
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader | ||
|
||
- name: Run test mutation infection with coverage | ||
run: | | ||
mkdir -p build/logs | ||
vendor/bin/phpunit --coverage-xml=build/logs/coverage-xml --log-junit=build/logs/junit.xml | ||
vendor/bin/infection --threads=2 --coverage=build/logs --show-mutations --no-progress --min-msi=10 --min-covered-msi=10 | ||
env: | ||
STRYKER_DASHBOARD_API_KEY: ${{ secrets.STRYKER_DASHBOARD_API_KEY }} |
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,50 @@ | ||
on: | ||
- pull_request | ||
- push | ||
|
||
name: static analysis | ||
|
||
jobs: | ||
mutation: | ||
name: PHP ${{ matrix.php-version }}-${{ matrix.os }} | ||
env: | ||
extensions: ast | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: | ||
- ubuntu-latest | ||
|
||
php-version: | ||
- "7.4" | ||
|
||
steps: | ||
- name: "Checkout" | ||
uses: "actions/checkout@v2" | ||
|
||
- name: "Install PHP" | ||
uses: "shivammathur/setup-php@v2" | ||
with: | ||
php-version: "${{ matrix.php-version }}" | ||
extensions: ${{ env.extensions }} | ||
tools: composer:v2, cs2pr | ||
coverage: none | ||
|
||
- name: Determine composer cache directory | ||
run: echo "::set-env name=COMPOSER_CACHE_DIR::$(composer config cache-dir)" | ||
|
||
- name: Cache dependencies installed with composer | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.COMPOSER_CACHE_DIR }} | ||
key: php${{ matrix.php-version }}-composer-${{ hashFiles('**/composer.json') }} | ||
restore-keys: | | ||
php${{ matrix.php-version }}-composer- | ||
- name: Install dependencies with composer | ||
run: composer update --prefer-dist --no-interaction --no-progress --optimize-autoloader | ||
|
||
- name: Static analysis with phan | ||
run: vendor/bin/phan --no-progress-bar --output-mode checkstyle | cs2pr --graceful-warnings --colorize |
Oops, something went wrong.