-
-
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.
Merge pull request #12 from sascha-egerer/feature/phpstan-0-11-compat…
…ibility Add PHPStan 0.11 compatibility and add CI tests
- Loading branch information
Showing
18 changed files
with
633 additions
and
494 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,27 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
charset = utf-8 | ||
trim_trailing_whitespace = true | ||
|
||
[*.{php,phpt}] | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
[*.xml] | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
[*.neon] | ||
indent_style = tab | ||
indent_size = 4 | ||
|
||
[*.{yaml,yml}] | ||
indent_style = space | ||
indent_size = 2 | ||
|
||
[composer.json] | ||
indent_style = tab | ||
indent_size = 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 |
---|---|---|
@@ -1,2 +1,5 @@ | ||
/vendor | ||
/composer.lock | ||
/vendor | ||
/typo3 | ||
/.idea | ||
/index.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
language: php | ||
php: | ||
- 7.1 | ||
- 7.2 | ||
- 7.3 | ||
env: | ||
- dependencies=lowest | ||
- dependencies=highest | ||
matrix: | ||
exclude: | ||
- php: 7.2 | ||
env: dependencies=lowest | ||
- php: 7.3 | ||
env: dependencies=lowest | ||
before_script: | ||
- composer self-update | ||
- if [ "$dependencies" = "lowest" ]; then composer update --prefer-lowest --no-interaction; fi; | ||
- if [ "$dependencies" = "highest" ]; then composer update --no-interaction; fi; | ||
script: | ||
- vendor/bin/phing |
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,77 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<project name="PHPStan TYPO3 extensions" default="check"> | ||
<target name="check" depends=" | ||
composer, | ||
lint, | ||
cs, | ||
phpstan | ||
"/> | ||
|
||
<target name="composer"> | ||
<exec | ||
executable="composer" | ||
logoutput="true" | ||
passthru="true" | ||
checkreturn="true" | ||
> | ||
<arg value="install"/> | ||
</exec> | ||
</target> | ||
|
||
<target name="lint"> | ||
<exec | ||
executable="vendor/bin/parallel-lint" | ||
logoutput="true" | ||
passthru="true" | ||
checkreturn="true" | ||
> | ||
<arg path="src" /> | ||
</exec> | ||
</target> | ||
|
||
<target name="cs"> | ||
<exec | ||
executable="vendor/bin/phpcs" | ||
logoutput="true" | ||
passthru="true" | ||
checkreturn="true" | ||
> | ||
<arg value="--extensions=php"/> | ||
<arg value="--encoding=utf-8"/> | ||
<arg value="--tab-width=4"/> | ||
<arg value="-sp"/> | ||
<arg path="src"/> | ||
</exec> | ||
</target> | ||
|
||
<target name="cs-fix"> | ||
<exec | ||
executable="vendor/bin/phpcbf" | ||
logoutput="true" | ||
passthru="true" | ||
checkreturn="true" | ||
> | ||
<arg value="--extensions=php"/> | ||
<arg value="--encoding=utf-8"/> | ||
<arg value="--tab-width=4"/> | ||
<arg value="-sp"/> | ||
<arg path="src"/> | ||
</exec> | ||
</target> | ||
|
||
<target name="phpstan"> | ||
<exec | ||
executable="vendor/bin/phpstan" | ||
logoutput="true" | ||
passthru="true" | ||
checkreturn="true" | ||
> | ||
<arg value="analyse"/> | ||
<arg value="-l"/> | ||
<arg value="7"/> | ||
<arg value="-c"/> | ||
<arg path="phpstan.neon"/> | ||
<arg path="src"/> | ||
</exec> | ||
</target> | ||
</project> |
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,31 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="PHPStan Doctrine"> | ||
<rule ref="vendor/consistence/coding-standard/Consistence/ruleset.xml"> | ||
<exclude name="Squiz.Functions.GlobalFunction.Found"/> | ||
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameAfterKeyword"/> | ||
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation"/> | ||
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedExceptions"/> | ||
<exclude name="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly"/> | ||
<exclude name="Consistence.Exceptions.ExceptionDeclaration"/> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.Namespaces.AlphabeticallySortedUses"> | ||
<properties> | ||
<property name="caseSensitive" value="false"/> | ||
</properties> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.TypeHints.DeclareStrictTypes"> | ||
<properties> | ||
<property name="newlinesCountBetweenOpenTagAndDeclare" value="0"/> | ||
</properties> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration"> | ||
<properties> | ||
<property name="enableObjectTypeHint" value="false"/> | ||
</properties> | ||
</rule> | ||
<rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/> | ||
<rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/> | ||
<rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit"/> | ||
<rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/> | ||
<rule ref="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming"/> | ||
</ruleset> |
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,2 +1,2 @@ | ||
parameters: | ||
bootstrap: src/PhpStanTypo3Bootstrap.php | ||
includes: | ||
- vendor/phpstan/phpstan-strict-rules/rules.neon |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.