This repository has been archived by the owner on Jun 26, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Showing
28 changed files
with
414 additions
and
274 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 |
---|---|---|
@@ -1,3 +1,3 @@ | ||
service_name: travis-ci | ||
coverage_clover: coverage.xml | ||
json_path: coverage.json | ||
service_name: travis-ci | ||
coverage_clover: tests/tmp/clover.xml | ||
json_path: tests/tmp/coveralls.json |
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,8 +1,8 @@ | ||
tests export-ignore | ||
.coveralls.yml export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.travis.yml export-ignore | ||
phpstan.neon export-ignore | ||
phpunit.xml.dist export-ignore | ||
ruleset.xml export-ignore | ||
tests export-ignore | ||
.coveralls.yml export-ignore | ||
.gitattributes export-ignore | ||
.gitignore export-ignore | ||
.travis.yml export-ignore | ||
build.xml | ||
phpcs.xml | ||
phpstan.neon 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
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,97 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<project name="PHPStan Symfony Framework extensions and rules" default="check"> | ||
|
||
<target name="check" depends=" | ||
composer, | ||
lint, | ||
cs, | ||
tests, | ||
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"/> | ||
<arg path="tests"/> | ||
</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"/> | ||
<arg path="tests"/> | ||
</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"/> | ||
<arg path="tests"/> | ||
</exec> | ||
</target> | ||
|
||
<target name="tests"> | ||
<exec | ||
executable="vendor/bin/phpunit" | ||
logoutput="true" | ||
passthru="true" | ||
checkreturn="true" | ||
> | ||
<arg value="-c"/> | ||
<arg value="tests/phpunit.xml"/> | ||
<arg path="tests"/> | ||
</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"/> | ||
<arg path="tests"/> | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,42 @@ | ||
{ | ||
"name": "lookyman/phpstan-symfony", | ||
"license": "MIT", | ||
"description": "Symfony extension for PHPStan", | ||
"keywords": ["PHPStan", "Symfony"], | ||
"name": "phpstan/phpstan-symfony", | ||
"description": "Symfony Framework extensions and rules for PHPStan", | ||
"license": ["MIT"], | ||
"authors": [ | ||
{ | ||
"name": "Lukáš Unger", | ||
"email": "looky.msc@gmail.com", | ||
"homepage": "https://lookyman.net" | ||
} | ||
], | ||
"minimum-stability": "dev", | ||
"prefer-stable": true, | ||
"extra": { | ||
"branch-alias": { | ||
"dev-master": "0.10-dev" | ||
} | ||
}, | ||
"require": { | ||
"php": "^7.1", | ||
"phpstan/phpstan": "^0.9.2" | ||
}, | ||
"require-dev": { | ||
"consistence/coding-standard": "^2.0", | ||
"jakub-onderka/php-parallel-lint": "^0.9.2", | ||
"phpunit/phpunit": "^6.4 || ^7.0", | ||
"phing/phing": "^2.16.0", | ||
"phpstan/phpstan-strict-rules": "^0.9", | ||
"satooshi/php-coveralls": "^1.0", | ||
"slevomat/coding-standard": "^3.3.0", | ||
"phpstan/phpstan-phpunit": "^0.9.0", | ||
"symfony/framework-bundle": "^4.0", | ||
"phpstan/phpstan-strict-rules": "^0.9.0", | ||
"lookyman/coding-standard": "0.1.0" | ||
"symfony/framework-bundle": "^4.0" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Lookyman\\PHPStan\\Symfony\\": "src/" | ||
"PHPStan\\": "src/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Lookyman\\PHPStan\\Symfony\\": "tests/" | ||
} | ||
}, | ||
"scripts": { | ||
"lint": "parallel-lint ./src ./tests", | ||
"cs": "phpcs --colors --extensions=php --encoding=utf-8 -sp ./src ./tests", | ||
"tests": "phpunit --coverage-text", | ||
"stan": "phpstan analyse -l max -c ./phpstan.neon ./src ./tests", | ||
"check": [ | ||
"@lint", | ||
"@cs", | ||
"@tests", | ||
"@stan" | ||
] | ||
"classmap": ["tests/"] | ||
} | ||
} |
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,14 +1,18 @@ | ||
services: | ||
- | ||
class: Lookyman\PHPStan\Symfony\Type\ContainerInterfaceDynamicReturnTypeExtension | ||
tags: [phpstan.broker.dynamicMethodReturnTypeExtension] | ||
class: PHPStan\Type\Symfony\ContainerInterfaceDynamicReturnTypeExtension | ||
tags: | ||
- phpstan.broker.dynamicMethodReturnTypeExtension | ||
- | ||
class: Lookyman\PHPStan\Symfony\Type\ControllerDynamicReturnTypeExtension | ||
tags: [phpstan.broker.dynamicMethodReturnTypeExtension] | ||
class: PHPStan\Type\Symfony\ControllerDynamicReturnTypeExtension | ||
tags: | ||
- phpstan.broker.dynamicMethodReturnTypeExtension | ||
- | ||
class: Lookyman\PHPStan\Symfony\Rules\ContainerInterfacePrivateServiceRule | ||
tags: [phpstan.rules.rule] | ||
class: PHPStan\Rules\Symfony\ContainerInterfacePrivateServiceRule | ||
tags: | ||
- phpstan.rules.rule | ||
- | ||
class: Lookyman\PHPStan\Symfony\Rules\ContainerInterfaceUnknownServiceRule | ||
tags: [phpstan.rules.rule] | ||
- Lookyman\PHPStan\Symfony\ServiceMap(%symfony.container_xml_path%) | ||
class: PHPStan\Rules\Symfony\ContainerInterfaceUnknownServiceRule | ||
tags: | ||
- phpstan.rules.rule | ||
- PHPStan\Symfony\ServiceMap(%symfony.container_xml_path%) |
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,36 @@ | ||
<?xml version="1.0"?> | ||
<ruleset name="PHPStan PHPUnit extensions and rules"> | ||
<rule ref="vendor/consistence/coding-standard/Consistence/ruleset.xml"> | ||
<exclude name="Squiz.Functions.GlobalFunction.Found"/> | ||
</rule> | ||
<rule ref="vendor/slevomat/coding-standard/SlevomatCodingStandard/ruleset.xml"> | ||
<exclude name="SlevomatCodingStandard.Files.TypeNameMatchesFileName"/> | ||
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameAfterKeyword"/> | ||
<exclude name="SlevomatCodingStandard.Namespaces.UseOnlyWhitelistedNamespaces"/> | ||
<exclude name="SlevomatCodingStandard.Namespaces.ReferenceUsedNamesOnly"/> | ||
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableParameterTypeHintSpecification"/> | ||
<exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableReturnTypeHintSpecification"/> | ||
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation.NonFullyQualifiedClassName"/> | ||
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalConstants"/> | ||
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedGlobalFunctions"/> | ||
</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="usefulAnnotations" type="array" value=" | ||
@dataProvider, | ||
@requires | ||
"/> | ||
</properties> | ||
</rule> | ||
<exclude-pattern>tests/*/data</exclude-pattern> | ||
</ruleset> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
includes: | ||
- vendor/phpstan/phpstan-phpunit/extension.neon | ||
- vendor/phpstan/phpstan-phpunit/rules.neon | ||
- vendor/phpstan/phpstan-phpunit/strictRules.neon | ||
- vendor/phpstan/phpstan-strict-rules/rules.neon | ||
|
||
parameters: | ||
excludes_analyse: | ||
- %rootDir%/../../../tests/*/data/* | ||
- */tests/*/data/* |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.