-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci(chglog): update filters and title maps in .chglog/config.yml
- Add 'build', 'ci', 'docs', 'style', and 'test' to commit type filters. - Update title maps for 'chore', 'feat', 'fix', 'perf', 'refactor', and 'test'. - Remove commented out lines from the file. - Update .editorconfig indentation settings for '*.vue', '*.js', and '*.scss' files. - Update .editorconfig 'insert_final_newline' setting for all files except '*.vue', '*.js', and '*.scss'. - Update .gitattributes to ignore additional files and directories. - Add '.editorconfig', '.php_cs', and '.github' to the ignored files. - Add phpstan.yml workflow file. - Update tests.yml workflow file to include PHP 8.4 in the matrix. - Update .lintmdrc to exclude './CHANGELOG.md' from linting. - Update README files to reflect the minimum required PHP version of 7.4. - Add error ignore rules to phpstan.neon. - Update phpunit.xml.dist to exclude 'src/Support/helpers.php' from coverage. - Add exclusion of 'vendor/' to the testsuite in phpunit.xml.dist. - Update psalm.xml.dist to enable finding unused code and resolve from config file.
- Loading branch information
Showing
37 changed files
with
836 additions
and
238 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,19 @@ | ||
root = true | ||
|
||
[*] | ||
charset = utf-8 | ||
end_of_line = lf | ||
indent_size = 4 | ||
indent_style = space | ||
insert_final_newline = true | ||
indent_size = 4 | ||
end_of_line = lf | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
insert_final_newline = false | ||
|
||
[*.{vue,js,scss}] | ||
indent_size = 2 | ||
insert_final_newline = true | ||
|
||
[*.md] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,yaml,xml,xml.dist}] | ||
indent_size = 2 | ||
indent_size = 2 |
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,11 +1,13 @@ | ||
* text=auto | ||
# Path-based git attributes | ||
# https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html | ||
|
||
/tests export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.scrutinizer.yml export-ignore | ||
.travis.yml export-ignore | ||
phpunit.php export-ignore | ||
phpunit.xml.dist export-ignore | ||
phpunit.xml export-ignore | ||
.php_cs export-ignore | ||
# Ignore all test and documentation with "export-ignore". | ||
/.gitattributes export-ignore | ||
/.gitignore export-ignore | ||
/.travis.yml export-ignore | ||
/phpunit.xml.dist export-ignore | ||
/tests export-ignore | ||
/.editorconfig export-ignore | ||
/.php_cs export-ignore | ||
/.github export-ignore | ||
/psalm.xml 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,38 @@ | ||
name: phpstan | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
paths: | ||
- '**.php' | ||
- '*.neon' | ||
- '*.xml' | ||
- '*.xml.dist' | ||
- '.github/**.yaml' | ||
- '.github/**.yml' | ||
|
||
jobs: | ||
phpstan: | ||
name: phpstan | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: '7.4' | ||
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick | ||
coverage: none | ||
|
||
- name: Cache composer dependencies | ||
uses: actions/cache@v4 | ||
with: | ||
path: vendor | ||
key: composer-${{ hashFiles('composer.lock') }} | ||
|
||
- name: Run composer install | ||
run: composer install --no-interaction --prefer-dist --ansi -v | ||
|
||
- name: Run phpstan | ||
run: composer phpstan |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
|
||
## 环境要求 | ||
|
||
* PHP >= 7.3 | ||
* PHP >= 7.4 | ||
* ext-json | ||
* ext-mbstring | ||
|
||
|
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 |
---|---|---|
|
@@ -14,7 +14,7 @@ | |
|
||
## Requirements | ||
|
||
* PHP >= 7.3 | ||
* PHP >= 7.4 | ||
* ext-json | ||
* ext-mbstring | ||
|
||
|
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,31 +1,79 @@ | ||
parameters: | ||
ignoreErrors: | ||
- | ||
message: "#^Call to method onlyHelp\\(\\) on an unknown class Guanguans\\\\SoarPHP\\\\Concerns\\\\HasOptions\\.$#" | ||
message: '#^Call to function function_exists\(\) with callable\-string will always evaluate to true\.$#' | ||
identifier: function.alreadyNarrowedType | ||
count: 1 | ||
path: src/Soar.php | ||
|
||
- | ||
message: "#^Call to method onlyVersion\\(\\) on an unknown class Guanguans\\\\SoarPHP\\\\Concerns\\\\HasOptions\\.$#" | ||
message: '#^Call to function is_array\(\) with list\<string\> will always evaluate to true\.$#' | ||
identifier: function.alreadyNarrowedType | ||
count: 2 | ||
path: src/Soar.php | ||
|
||
- | ||
message: '#^Call to method onlyHelp\(\) on an unknown class Guanguans\\SoarPHP\\Concerns\\HasOptions\.$#' | ||
identifier: class.notFound | ||
count: 1 | ||
path: src/Soar.php | ||
|
||
- | ||
message: "#^Call to method run\\(\\) on an unknown class Guanguans\\\\SoarPHP\\\\Concerns\\\\HasOptions\\.$#" | ||
message: '#^Call to method onlyVersion\(\) on an unknown class Guanguans\\SoarPHP\\Concerns\\HasOptions\.$#' | ||
identifier: class.notFound | ||
count: 1 | ||
path: src/Soar.php | ||
|
||
- | ||
message: '#^Call to method run\(\) on an unknown class Guanguans\\SoarPHP\\Concerns\\HasOptions\.$#' | ||
identifier: class.notFound | ||
count: 3 | ||
path: src/Soar.php | ||
|
||
- | ||
message: "#^Call to method scores\\(\\) on an unknown class Guanguans\\\\SoarPHP\\\\Concerns\\\\HasOptions\\.$#" | ||
message: '#^Call to method scores\(\) on an unknown class Guanguans\\SoarPHP\\Concerns\\HasOptions\.$#' | ||
identifier: class.notFound | ||
count: 3 | ||
path: src/Soar.php | ||
|
||
- | ||
message: "#^Result of && is always false\\.$#" | ||
count: 2 | ||
message: '#^Calling var_dump\(\) is forbidden, use some logger instead\.$#' | ||
identifier: disallowed.function | ||
count: 1 | ||
path: src/Soar.php | ||
|
||
- | ||
message: "#^Unsafe usage of new static\\(\\)\\.$#" | ||
message: '#^Result of && is always false\.$#' | ||
identifier: booleanAnd.alwaysFalse | ||
count: 2 | ||
path: src/Soar.php | ||
|
||
- | ||
message: '#^Unused result of "and" operator\.$#' | ||
identifier: logicalAnd.resultUnused | ||
count: 3 | ||
path: src/Soar.php | ||
|
||
- | ||
message: '#^Unused result of "and" operator\.$#' | ||
identifier: logicalAnd.resultUnused | ||
count: 1 | ||
path: src/Support/ComposerScript.php | ||
|
||
- | ||
message: '#^Method Guanguans\\SoarPHP\\Support\\Rectors\\ToInternalExceptionRector\:\:refactor\(\) never returns array\<PhpParser\\Node\> so it can be removed from the return type\.$#' | ||
identifier: return.unusedType | ||
count: 1 | ||
path: src/Support/Rectors/ToInternalExceptionRector.php | ||
|
||
- | ||
message: '#^Method Guanguans\\SoarPHP\\Support\\Rectors\\ToInternalExceptionRector\:\:refactor\(\) never returns null so it can be removed from the return type\.$#' | ||
identifier: return.unusedType | ||
count: 1 | ||
path: src/Support/Rectors/ToInternalExceptionRector.php | ||
|
||
- | ||
message: '#^Call to function method_exists\(\) with ''Symfony\\\\Component\\\\Process\\\\Process'' and ''escapeArgument'' will always evaluate to true\.$#' | ||
identifier: function.alreadyNarrowedType | ||
count: 1 | ||
path: src/Support/helpers.php |
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.