| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 1e3bb37 commit d5afbe6
8 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,160 @@ | |||
| 1 | + # https://help.github.com/en/categories/automating-your-workflow-with-github-actions | ||
| 2 | + | ||
| 3 | + name: "Build" | ||
| 4 | + | ||
| 5 | + on: | ||
| 6 | + pull_request: | ||
| 7 | + push: | ||
| 8 | + branches: | ||
| 9 | + - "master" | ||
| 10 | + | ||
| 11 | + jobs: | ||
| 12 | + lint: | ||
| 13 | + name: "Lint" | ||
| 14 | + runs-on: "ubuntu-latest" | ||
| 15 | + | ||
| 16 | + strategy: | ||
| 17 | + matrix: | ||
| 18 | + php-version: | ||
| 19 | + - "7.1" | ||
| 20 | + - "7.2" | ||
| 21 | + - "7.3" | ||
| 22 | + - "7.4" | ||
| 23 | + - "8.0" | ||
| 24 | + | ||
| 25 | + steps: | ||
| 26 | + - name: "Checkout" | ||
| 27 | + uses: "actions/checkout@v2" | ||
| 28 | + | ||
| 29 | + - name: "Install PHP" | ||
| 30 | + uses: "shivammathur/setup-php@v2" | ||
| 31 | + with: | ||
| 32 | + coverage: "none" | ||
| 33 | + php-version: "${{ matrix.php-version }}" | ||
| 34 | + | ||
| 35 | + - name: "Validate Composer" | ||
| 36 | + run: "composer validate" | ||
| 37 | + | ||
| 38 | + - name: "Install dependencies" | ||
| 39 | + run: "composer install --no-interaction --no-progress --no-suggest" | ||
| 40 | + | ||
| 41 | + - name: "Update PHPUnit" | ||
| 42 | + if: matrix.php-version == '7.4' || matrix.php-version == '8.0' | ||
| 43 | + run: "composer require --dev phpunit/phpunit:'^9.5' --update-with-dependencies" | ||
| 44 | + | ||
| 45 | + | ||
| 46 | + - name: "Lint" | ||
| 47 | + run: "vendor/bin/phing lint" | ||
| 48 | + | ||
| 49 | + coding-standards: | ||
| 50 | + name: "Coding Standard" | ||
| 51 | + | ||
| 52 | + runs-on: "ubuntu-latest" | ||
| 53 | + | ||
| 54 | + steps: | ||
| 55 | + - name: "Checkout" | ||
| 56 | + uses: "actions/checkout@v2" | ||
| 57 | + | ||
| 58 | + - name: "Install PHP" | ||
| 59 | + uses: "shivammathur/setup-php@v2" | ||
| 60 | + with: | ||
| 61 | + coverage: "none" | ||
| 62 | + php-version: "7.4" | ||
| 63 | + | ||
| 64 | + - name: "Validate Composer" | ||
| 65 | + run: "composer validate" | ||
| 66 | + | ||
| 67 | + - name: "Install dependencies" | ||
| 68 | + run: "composer install --no-interaction --no-progress --no-suggest" | ||
| 69 | + | ||
| 70 | + - name: "Lint" | ||
| 71 | + run: "vendor/bin/phing lint" | ||
| 72 | + | ||
| 73 | + - name: "Coding Standard" | ||
| 74 | + run: "vendor/bin/phing cs" | ||
| 75 | + | ||
| 76 | + tests: | ||
| 77 | + name: "Tests" | ||
| 78 | + runs-on: "ubuntu-latest" | ||
| 79 | + | ||
| 80 | + strategy: | ||
| 81 | + fail-fast: false | ||
| 82 | + matrix: | ||
| 83 | + php-version: | ||
| 84 | + - "7.1" | ||
| 85 | + - "7.2" | ||
| 86 | + - "7.3" | ||
| 87 | + - "7.4" | ||
| 88 | + - "8.0" | ||
| 89 | + dependencies: | ||
| 90 | + - "lowest" | ||
| 91 | + - "highest" | ||
| 92 | + | ||
| 93 | + steps: | ||
| 94 | + - name: "Checkout" | ||
| 95 | + uses: "actions/checkout@v2" | ||
| 96 | + | ||
| 97 | + - name: "Install PHP" | ||
| 98 | + uses: "shivammathur/setup-php@v2" | ||
| 99 | + with: | ||
| 100 | + coverage: "none" | ||
| 101 | + php-version: "${{ matrix.php-version }}" | ||
| 102 | + | ||
| 103 | + - name: "Install lowest dependencies" | ||
| 104 | + if: ${{ matrix.dependencies == 'lowest' }} | ||
| 105 | + run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest" | ||
| 106 | + | ||
| 107 | + - name: "Install highest dependencies" | ||
| 108 | + if: ${{ matrix.dependencies == 'highest' }} | ||
| 109 | + run: "composer update --no-interaction --no-progress --no-suggest" | ||
| 110 | + | ||
| 111 | + - name: "Update PHPUnit" | ||
| 112 | + if: matrix.php-version == '7.4' || matrix.php-version == '8.0' | ||
| 113 | + run: "composer require --dev phpunit/phpunit:'^9.5' --update-with-dependencies" | ||
| 114 | + | ||
| 115 | + - name: "Tests" | ||
| 116 | + run: "vendor/bin/phing tests" | ||
| 117 | + | ||
| 118 | + static-analysis: | ||
| 119 | + name: "PHPStan" | ||
| 120 | + runs-on: "ubuntu-latest" | ||
| 121 | + | ||
| 122 | + strategy: | ||
| 123 | + fail-fast: false | ||
| 124 | + matrix: | ||
| 125 | + php-version: | ||
| 126 | + - "7.1" | ||
| 127 | + - "7.2" | ||
| 128 | + - "7.3" | ||
| 129 | + - "7.4" | ||
| 130 | + - "8.0" | ||
| 131 | + dependencies: | ||
| 132 | + - "lowest" | ||
| 133 | + - "highest" | ||
| 134 | + | ||
| 135 | + steps: | ||
| 136 | + - name: "Checkout" | ||
| 137 | + uses: "actions/checkout@v2" | ||
| 138 | + | ||
| 139 | + - name: "Install PHP" | ||
| 140 | + uses: "shivammathur/setup-php@v2" | ||
| 141 | + with: | ||
| 142 | + coverage: "none" | ||
| 143 | + php-version: "${{ matrix.php-version }}" | ||
| 144 | + extensions: mbstring | ||
| 145 | + tools: composer:v2 | ||
| 146 | + | ||
| 147 | + - name: "Install lowest dependencies" | ||
| 148 | + if: ${{ matrix.dependencies == 'lowest' }} | ||
| 149 | + run: "composer update --prefer-lowest --no-interaction --no-progress --no-suggest" | ||
| 150 | + | ||
| 151 | + - name: "Install highest dependencies" | ||
| 152 | + if: ${{ matrix.dependencies == 'highest' }} | ||
| 153 | + run: "composer update --no-interaction --no-progress --no-suggest" | ||
| 154 | + | ||
| 155 | + - name: "Update PHPUnit" | ||
| 156 | + if: matrix.php-version == '7.4' || matrix.php-version == '8.0' | ||
| 157 | + run: "composer require --dev phpunit/phpunit:'^9.5' --update-with-dependencies" | ||
| 158 | + | ||
| 159 | + - name: "PHPStan" | ||
| 160 | + run: "vendor/bin/phing phpstan" | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | # PHP-Parser extension for PHPStan | |
| 2 | 2 | ||
| 3 | - [](https://travis-ci.com/phpstan/phpstan-php-parser) | ||
| 3 | + [](https://github.com/phpstan/phpstan-php-parser/actions) | ||
| 4 | 4 | [](https://packagist.org/packages/phpstan/phpstan-php-parser) | |
| 5 | 5 | [](https://packagist.org/packages/phpstan/phpstan-php-parser) | |
| 6 | 6 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,2 @@ | |||
| 1 | + /composer.lock | ||
| 2 | + /vendor | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,7 @@ | |||
| 1 | + { | ||
| 2 | + "require-dev": { | ||
| 3 | + "consistence/coding-standard": "^3.10", | ||
| 4 | + "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", | ||
| 5 | + "slevomat/coding-standard": "^6.4" | ||
| 6 | + } | ||
| 7 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -5,7 +5,6 @@ | |||
| 5 | 5 | composer, | |
| 6 | 6 | lint, | |
| 7 | 7 | cs, | |
| 8 | - composer-normalize-check, | ||
| 9 | 8 | tests, | |
| 10 | 9 | phpstan | |
| 11 | 10 | "/> | |
@@ -21,31 +20,6 @@ | |||
| 21 | 20 | </exec> | |
| 22 | 21 | </target> | |
| 23 | 22 | ||
| 24 | - <target name="composer-normalize-check"> | ||
| 25 | - <exec | ||
| 26 | - executable="composer" | ||
| 27 | - logoutput="true" | ||
| 28 | - passthru="true" | ||
| 29 | - checkreturn="true" | ||
| 30 | - > | ||
| 31 | - <arg value="normalize"/> | ||
| 32 | - <arg value="--ansi"/> | ||
| 33 | - <arg value="--dry-run"/> | ||
| 34 | - </exec> | ||
| 35 | - </target> | ||
| 36 | - | ||
| 37 | - <target name="composer-normalize-fix"> | ||
| 38 | - <exec | ||
| 39 | - executable="composer" | ||
| 40 | - logoutput="true" | ||
| 41 | - passthru="true" | ||
| 42 | - checkreturn="true" | ||
| 43 | - > | ||
| 44 | - <arg value="normalize"/> | ||
| 45 | - <arg value="--ansi"/> | ||
| 46 | - </exec> | ||
| 47 | - </target> | ||
| 48 | - | ||
| 49 | 23 | <target name="lint"> | |
| 50 | 24 | <exec | |
| 51 | 25 | executable="vendor/bin/parallel-lint" | |
@@ -62,7 +36,18 @@ | |||
| 62 | 36 | ||
| 63 | 37 | <target name="cs"> | |
| 64 | 38 | <exec | |
| 65 | - executable="vendor/bin/phpcs" | ||
| 39 | + executable="composer" | ||
| 40 | + logoutput="true" | ||
| 41 | + passthru="true" | ||
| 42 | + checkreturn="true" | ||
| 43 | + > | ||
| 44 | + <arg value="install"/> | ||
| 45 | + <arg value="--working-dir"/> | ||
| 46 | + <arg path="build-cs"/> | ||
| 47 | + <arg value="--ansi"/> | ||
| 48 | + </exec> | ||
| 49 | + <exec | ||
| 50 | + executable="build-cs/vendor/bin/phpcs" | ||
| 66 | 51 | logoutput="true" | |
| 67 | 52 | passthru="true" | |
| 68 | 53 | checkreturn="true" | |
@@ -78,7 +63,7 @@ | |||
| 78 | 63 | ||
| 79 | 64 | <target name="cs-fix"> | |
| 80 | 65 | <exec | |
| 81 | - executable="vendor/bin/phpcbf" | ||
| 66 | + executable="build-cs/vendor/bin/phpcbf" | ||
| 82 | 67 | logoutput="true" | |
| 83 | 68 | passthru="true" | |
| 84 | 69 | checkreturn="true" | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -7,20 +7,19 @@ | |||
| 7 | 7 | ], | |
| 8 | 8 | "require": { | |
| 9 | 9 | "php": "^7.1 || ^8.0", | |
| 10 | - "phpstan/phpstan": "^0.12" | ||
| 10 | + "phpstan/phpstan": "^0.12.60" | ||
| 11 | 11 | }, | |
| 12 | 12 | "require-dev": { | |
| 13 | - "consistence/coding-standard": "^3.0.1", | ||
| 14 | - "dealerdirect/phpcodesniffer-composer-installer": "^0.7.0", | ||
| 15 | - "ergebnis/composer-normalize": "^2.0.2", | ||
| 16 | - "phing/phing": "^2.16.0", | ||
| 13 | + "phing/phing": "^2.16.3", | ||
| 17 | 14 | "php-parallel-lint/php-parallel-lint": "^1.2", | |
| 18 | - "phpstan/phpstan-phpunit": "^0.12", | ||
| 19 | - "phpstan/phpstan-strict-rules": "^0.12", | ||
| 20 | - "phpunit/phpunit": "^7.0", | ||
| 21 | - "slevomat/coding-standard": "^4.5.2" | ||
| 15 | + "phpstan/phpstan-phpunit": "^0.12.16", | ||
| 16 | + "phpstan/phpstan-strict-rules": "^0.12.6", | ||
| 17 | + "phpunit/phpunit": "^7.5.20" | ||
| 22 | 18 | }, | |
| 23 | 19 | "config": { | |
| 20 | + "platform": { | ||
| 21 | + "php": "7.4.6" | ||
| 22 | + }, | ||
| 24 | 23 | "sort-packages": true | |
| 25 | 24 | }, | |
| 26 | 25 | "extra": { | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,6 +1,6 @@ | |||
| 1 | 1 | <?xml version="1.0"?> | |
| 2 | - <ruleset name="PHPStan PHP-Parser"> | ||
| 3 | - <rule ref="vendor/consistence/coding-standard/Consistence/ruleset.xml"> | ||
| 2 | + <ruleset name="PHPStan PHP Parser extension"> | ||
| 3 | + <rule ref="build-cs/vendor/consistence/coding-standard/Consistence/ruleset.xml"> | ||
| 4 | 4 | <exclude name="Squiz.Functions.GlobalFunction.Found"/> | |
| 5 | 5 | <exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameAfterKeyword"/> | |
| 6 | 6 | <exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation"/> | |
@@ -17,22 +17,31 @@ | |||
| 17 | 17 | <property name="newlinesCountBetweenOpenTagAndDeclare" value="0"/> | |
| 18 | 18 | </properties> | |
| 19 | 19 | </rule> | |
| 20 | - <rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration"> | ||
| 20 | + <rule ref="SlevomatCodingStandard.TypeHints.ParameterTypeHint"> | ||
| 21 | 21 | <properties> | |
| 22 | 22 | <property name="usefulAnnotations" type="array" value=" | |
| 23 | 23 | @dataProvider, | |
| 24 | 24 | @requires | |
| 25 | 25 | "/> | |
| 26 | + <property name="enableObjectTypeHint" value="false"/> | ||
| 26 | 27 | </properties> | |
| 28 | + <exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableParameterTypeHintSpecification"/> | ||
| 29 | + <exclude name="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableReturnTypeHintSpecification"/> | ||
| 27 | 30 | </rule> | |
| 28 | - <rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableReturnTypeHintSpecification"> | ||
| 29 | - <exclude-pattern>tests/*</exclude-pattern> | ||
| 31 | + <rule ref="SlevomatCodingStandard.TypeHints.PropertyTypeHint"> | ||
| 32 | + <properties> | ||
| 33 | + <property name="enableNativeTypeHint" value="false"/> | ||
| 34 | + </properties> | ||
| 35 | + <exclude name="SlevomatCodingStandard.TypeHints.PropertyTypeHint.MissingTraversableTypeHintSpecification"/> | ||
| 30 | 36 | </rule> | |
| 31 | - <rule ref="SlevomatCodingStandard.TypeHints.TypeHintDeclaration.MissingTraversableParameterTypeHintSpecification"> | ||
| 32 | - <exclude-pattern>tests/*</exclude-pattern> | ||
| 37 | + <rule ref="SlevomatCodingStandard.TypeHints.ReturnTypeHint"> | ||
| 38 | + <properties> | ||
| 39 | + <property name="enableObjectTypeHint" value="false"/> | ||
| 40 | + </properties> | ||
| 41 | + <exclude name="SlevomatCodingStandard.TypeHints.ReturnTypeHint.MissingTraversableTypeHintSpecification"/> | ||
| 33 | 42 | </rule> | |
| 34 | 43 | <rule ref="SlevomatCodingStandard.ControlStructures.AssignmentInCondition"/> | |
| 35 | - <rule ref="SlevomatCodingStandard.ControlStructures.DisallowEqualOperators"/> | ||
| 44 | + <rule ref="SlevomatCodingStandard.Operators.DisallowEqualOperators"/> | ||
| 36 | 45 | <rule ref="SlevomatCodingStandard.ControlStructures.EarlyExit"/> | |
| 37 | 46 | <rule ref="SlevomatCodingStandard.Classes.SuperfluousAbstractClassNaming"/> | |
| 38 | 47 | <rule ref="SlevomatCodingStandard.Classes.SuperfluousInterfaceNaming"/> | |
| Back | FazBrowse Home | New Git URL |
0 commit comments