generated from yiisoft/package-template
-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update docs [skip ci] * Update PR template [skip ci] * Add composer require checker * Change version for CRC * Fix CRC (WIP), use symfony/console directly * Remove remaining ExitCode occurence * Exclude PHP 8.0 from CI * Add symfony finder as a dependency * Add cycle/database dependency, bump versions * Fix remaining CRC issues * Add rector * Apply Rector changes (CI) * Apply fixes from StyleCI * Min MSI 100% * Remove remaining links [skip ci] * Remove extra line [skip ci] * Update .github/workflows/composer-require-checker.yml Co-authored-by: Sergei Predvoditelev <[email protected]> * Revert some Rector changes * Change push rules for CI (review fix) * Update README.md Co-authored-by: Sergei Predvoditelev <[email protected]> * Update rector.php Co-authored-by: Sergei Predvoditelev <[email protected]> * Apply Rector changes (CI) * Change rules for CI, BC (review fix) * Drop 4 version of Psalm --------- Co-authored-by: arogachev <[email protected]> Co-authored-by: StyleCI Bot <[email protected]> Co-authored-by: Sergei Predvoditelev <[email protected]>
- Loading branch information
1 parent
e4ab25f
commit 8619e9f
Showing
57 changed files
with
263 additions
and
186 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
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,15 +1,35 @@ | ||
on: | ||
- pull_request | ||
- push | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'README.md' | ||
- 'CHANGELOG.md' | ||
- '.gitignore' | ||
- '.gitattributes' | ||
- 'infection.json.dist' | ||
- 'phpunit.xml.dist' | ||
- 'psalm.xml' | ||
|
||
push: | ||
branches: ['master'] | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'README.md' | ||
- 'CHANGELOG.md' | ||
- '.gitignore' | ||
- '.gitattributes' | ||
- 'phpunit.xml.dist' | ||
- 'infection.json.dist' | ||
- 'phpunit.xml.dist' | ||
- 'psalm.xml' | ||
|
||
name: backwards compatibility | ||
|
||
jobs: | ||
roave_bc_check: | ||
name: Roave BC Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: fetch tags | ||
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/* | ||
- name: Roave BC Check | ||
uses: docker://nyholm/roave-bc-check-ga | ||
roave_bc_check: | ||
uses: yiisoft/actions/.github/workflows/bc.yml@master | ||
with: | ||
os: >- | ||
['ubuntu-latest'] | ||
php: >- | ||
['8.3'] |
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,34 @@ | ||
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'README.md' | ||
- 'CHANGELOG.md' | ||
- '.gitignore' | ||
- '.gitattributes' | ||
- 'infection.json.dist' | ||
- 'phpunit.xml.dist' | ||
- 'psalm.xml' | ||
|
||
push: | ||
branches: ['master'] | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'README.md' | ||
- 'CHANGELOG.md' | ||
- '.gitignore' | ||
- '.gitattributes' | ||
- 'infection.json.dist' | ||
- 'phpunit.xml.dist' | ||
- 'psalm.xml' | ||
|
||
name: Composer require checker | ||
|
||
jobs: | ||
composer-require-checker: | ||
uses: yiisoft/actions/.github/workflows/composer-require-checker.yml@master | ||
with: | ||
os: >- | ||
['ubuntu-latest'] | ||
php: >- | ||
['8.1', '8.2', '8.3'] |
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,21 @@ | ||
on: | ||
pull_request: | ||
paths-ignore: | ||
- 'docs/**' | ||
- 'README.md' | ||
- 'CHANGELOG.md' | ||
- '.gitignore' | ||
- '.gitattributes' | ||
- 'infection.json.dist' | ||
- 'psalm.xml' | ||
|
||
name: rector | ||
|
||
jobs: | ||
rector: | ||
uses: yiisoft/actions/.github/workflows/rector.yml@master | ||
with: | ||
os: >- | ||
['ubuntu-latest'] | ||
php: >- | ||
['8.3'] |
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,19 @@ | ||
{ | ||
"symbol-whitelist" : [ | ||
"JetBrains\\PhpStorm\\ExpectedValues", | ||
"JetBrains\\PhpStorm\\Pure" | ||
], | ||
"php-core-extensions" : [ | ||
"Core", | ||
"date", | ||
"json", | ||
"hash", | ||
"pcre", | ||
"Phar", | ||
"Reflection", | ||
"SPL", | ||
"random", | ||
"standard" | ||
], | ||
"scan-files" : [] | ||
} |
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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
File renamed without changes.
File renamed without changes.
File renamed without changes.
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,40 @@ | ||
# Internals | ||
|
||
## Unit testing | ||
|
||
The package is tested with [PHPUnit](https://phpunit.de/). To run tests: | ||
|
||
```shell | ||
./vendor/bin/phpunit | ||
``` | ||
|
||
## Mutation testing | ||
|
||
The package tests are checked with [Infection](https://infection.github.io/) mutation framework with | ||
[Infection Static Analysis Plugin](https://github.com/Roave/infection-static-analysis-plugin). To run it: | ||
|
||
```shell | ||
./vendor/bin/roave-infection-static-analysis-plugin | ||
``` | ||
|
||
## Static analysis | ||
|
||
The code is statically analyzed with [Psalm](https://psalm.dev/). To run static analysis: | ||
|
||
```shell | ||
./vendor/bin/psalm | ||
``` | ||
|
||
## Code style | ||
|
||
Use [Rector](https://github.com/rectorphp/rector) to make codebase follow some specific rules or | ||
use either newest or any specific version of PHP: | ||
|
||
```shell | ||
./vendor/bin/rector | ||
``` | ||
|
||
## Dependencies | ||
|
||
Use [ComposerRequireChecker](https://github.com/maglnet/ComposerRequireChecker) to detect transitive | ||
[Composer](https://getcomposer.org/) dependencies. |
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,27 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use Rector\CodeQuality\Rector\Class_\InlineConstructorDefaultToPropertyRector; | ||
use Rector\Config\RectorConfig; | ||
use Rector\Php74\Rector\Closure\ClosureToArrowFunctionRector; | ||
use Rector\Set\ValueObject\LevelSetList; | ||
|
||
return static function (RectorConfig $rectorConfig): void { | ||
$rectorConfig->paths([ | ||
__DIR__ . '/src', | ||
__DIR__ . '/tests', | ||
]); | ||
|
||
// register a single rule | ||
$rectorConfig->rule(InlineConstructorDefaultToPropertyRector::class); | ||
|
||
// define sets of rules | ||
$rectorConfig->sets([ | ||
LevelSetList::UP_TO_PHP_81, | ||
]); | ||
|
||
$rectorConfig->skip([ | ||
ClosureToArrowFunctionRector::class, | ||
]); | ||
}; |
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
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
Oops, something went wrong.