Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add phpstan and psalm through dev-kit * fix phpstan and psalm issues
- Loading branch information
1 parent
020ec23
commit 0ed3f2b
Showing
11 changed files
with
131 additions
and
81 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,62 @@ | ||
# DO NOT EDIT THIS FILE! | ||
# | ||
# It's auto-generated by sonata-project/dev-kit package. | ||
|
||
name: Quality assurance | ||
|
||
on: | ||
push: | ||
branches: | ||
- 1.x | ||
- 2.x | ||
pull_request: | ||
|
||
jobs: | ||
phpstan: | ||
name: PHPStan | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install PHP with extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0 | ||
coverage: none | ||
tools: composer:v2 | ||
|
||
- name: Install Composer dependencies (highest) | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
dependency-versions: "highest" | ||
composer-options: "--prefer-dist --prefer-stable" | ||
|
||
- name: PHPStan | ||
run: vendor/bin/phpstan --memory-limit=1G analyse | ||
psalm: | ||
name: Psalm | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install PHP with extensions | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.0 | ||
coverage: none | ||
tools: composer:v2 | ||
|
||
- name: Install Composer dependencies (highest) | ||
uses: "ramsey/composer-install@v1" | ||
with: | ||
dependency-versions: "highest" | ||
composer-options: "--prefer-dist --prefer-stable" | ||
|
||
- name: Psalm | ||
run: vendor/bin/psalm --show-info=false --stats --output-format=github --threads=$(nproc) --shepherd --php-version=8.0 |
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
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,17 +1,12 @@ | ||
parameters: | ||
level: 1 | ||
|
||
bootstrapFiles: | ||
- vendor/bin/.phpunit/phpunit/vendor/autoload.php | ||
paths: | ||
- src | ||
# Uncomment this, when phpstan extensions are allowed | ||
# - tests | ||
|
||
excludes_analyse: | ||
- src/Bridge/Symfony/Bundle/SonataTwigBundle.php | ||
- src/Test/AbstractWidgetTestCase.php | ||
- tests/bootstrap.php | ||
|
||
autoload_files: | ||
- vendor/autoload.php | ||
|
||
ignoreErrors: | ||
- tests | ||
treatPhpDocTypesAsCertain: false | ||
checkGenericClassInNonGenericObjectType: true | ||
checkMissingIterableValueType: true | ||
checkMissingVarTagTypehint: true | ||
checkMissingTypehints: true |
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 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<psalm xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="https://getpsalm.org/schema/config" errorLevel="6" findUnusedPsalmSuppress="true" resolveFromConfigFile="true" xsi:schemaLocation="https://getpsalm.org/schema/config vendor/vimeo/psalm/config.xsd" autoloader="vendor/bin/.phpunit/phpunit/vendor/autoload.php"> | ||
<projectFiles> | ||
<directory name="src"/> | ||
<directory name="tests"/> | ||
<ignoreFiles> | ||
<directory name="vendor"/> | ||
</ignoreFiles> | ||
</projectFiles> | ||
<plugins> | ||
<pluginClass class="Psalm\SymfonyPsalmPlugin\Plugin"/> | ||
<pluginClass class="Psalm\PhpUnitPlugin\Plugin"/> | ||
</plugins> | ||
</psalm> |
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 |
---|---|---|
|
@@ -20,7 +20,7 @@ | |
final class TemplateBoxNode extends Node | ||
{ | ||
/** | ||
* @var int | ||
* @var bool | ||
*/ | ||
protected $enabled; | ||
|
||
|
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 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