We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9feb3ca commit b531f73Copy full SHA for b531f73
.gitattributes
@@ -2,4 +2,12 @@
2
*.stub linguist-language=PHP
3
*.neon linguist-language=YAML
4
5
-/tests export-ignore
+.github export-ignore
6
+tests export-ignore
7
+tmp export-ignore
8
+.gitattributes export-ignore
9
+.gitignore export-ignore
10
+Makefile export-ignore
11
+phpcs.xml export-ignore
12
+phpstan.neon export-ignore
13
+phpunit.xml export-ignore
.github/workflows/build.yml
@@ -44,7 +44,7 @@ jobs:
44
45
46
- name: "Lint"
47
- run: "vendor/bin/phing lint"
+ run: "make lint"
48
49
coding-standards:
50
name: "Coding Standard"
@@ -68,10 +68,10 @@ jobs:
68
run: "composer install --no-interaction --no-progress --no-suggest"
69
70
71
72
73
- name: "Coding Standard"
74
- run: "vendor/bin/phing cs"
+ run: "make cs"
75
76
tests:
77
name: "Tests"
@@ -113,7 +113,7 @@ jobs:
113
run: "composer require --dev phpunit/phpunit:'^9.5' --update-with-dependencies"
114
115
- name: "Tests"
116
- run: "vendor/bin/phing tests"
+ run: "make tests"
117
118
static-analysis:
119
name: "PHPStan"
@@ -157,4 +157,4 @@ jobs:
157
158
159
- name: "PHPStan"
160
- run: "vendor/bin/phing phpstan"
+ run: "make phpstan"
.gitignore
@@ -1,2 +1,4 @@
1
-/composer.lock
+/tests/tmp
/vendor
+composer.lock
+.phpunit.result.cache
Makefile
@@ -0,0 +1,23 @@
+.PHONY: check
+check: lint cs tests phpstan
+
+.PHONY: tests
+tests:
+ php vendor/bin/phpunit
+.PHONY: lint
+lint:
+ php vendor/bin/parallel-lint --colors \
+ src tests
+.PHONY: cs
14
+cs:
15
+ composer install --working-dir build-cs && php build-cs/vendor/bin/phpcs
16
17
+.PHONY: cs-fix
18
+cs-fix:
19
+ php build-cs/vendor/bin/phpcbf
20
21
+.PHONY: phpstan
22
+phpstan:
23
+ php vendor/bin/phpstan analyse -l 8 -c phpstan.neon src tests
build-cs/composer.json
@@ -1,6 +1,6 @@
{
"require-dev": {
- "consistence/coding-standard": "^3.10",
+ "consistence-community/coding-standard": "^3.10",
"dealerdirect/phpcodesniffer-composer-installer": "^0.7.0",
"slevomat/coding-standard": "^6.4"
}
build.xml
composer.json
@@ -20,7 +20,6 @@
"nette/forms": "^3.0",
"nette/utils": "^2.3.0 || ^3.0.0",
- "phing/phing": "^2.16.3",
24
"php-parallel-lint/php-parallel-lint": "^1.2",
25
"phpstan/phpstan-php-parser": "^0.12.2",
26
"phpstan/phpstan-phpunit": "^0.12.16",
phpcs.xml
@@ -1,6 +1,14 @@
<?xml version="1.0"?>
<ruleset name="PHPStan Nette">
- <rule ref="build-cs/vendor/consistence/coding-standard/Consistence/ruleset.xml">
+ <arg name="colors"/>
+ <arg name="extensions" value="php"/>
+ <arg name="encoding" value="utf-8"/>
+ <arg name="tab-width" value="4"/>
+ <arg name="cache" value="tmp/cache/phpcs"/>
+ <arg value="sp"/>
+ <file>src</file>
+ <file>tests</file>
+ <rule ref="build-cs/vendor/consistence-community/coding-standard/Consistence/ruleset.xml">
<exclude name="Squiz.Functions.GlobalFunction.Found"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameAfterKeyword"/>
<exclude name="SlevomatCodingStandard.Namespaces.FullyQualifiedClassNameInAnnotation"/>
@@ -53,5 +61,6 @@
53
61
<property name="rootNamespaces" type="array" value="src=>PHPStan,tests=>PHPStan"/>
54
62
</properties>
55
63
</rule>
64
+ <exclude-pattern>tests/tmp</exclude-pattern>
56
65
<exclude-pattern>tests/*/data</exclude-pattern>
57
66
</ruleset>
phpunit.xml
@@ -0,0 +1,36 @@
+<?xml version="1.0"?>
+<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ bootstrap="tests/bootstrap.php"
+ colors="true"
+ backupGlobals="false"
+ backupStaticAttributes="false"
+ beStrictAboutChangesToGlobalState="true"
+ beStrictAboutOutputDuringTests="true"
+ beStrictAboutTestsThatDoNotTestAnything="true"
+ beStrictAboutTodoAnnotatedTests="true"
+ failOnRisky="true"
+ failOnWarning="true"
+ xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd"
+>
+ <coverage>
+ <include>
+ <directory suffix=".php">./src</directory>
+ </include>
+ <report>
+ <clover outputFile="tests/tmp/clover.xml"/>
+ <text
+ outputFile="php://stdout"
+ showUncoveredFiles="true"
+ showOnlySummary="true"
+ />
+ </report>
27
+ </coverage>
28
29
+ <testsuites>
30
+ <testsuite name="PHPStan for Nette">
31
+ <directory suffix="Test.php">tests</directory>
32
+ </testsuite>
33
+ </testsuites>
34
35
+ <logging/>
36
+</phpunit>
tests/phpunit.xml
AltStyle によって変換されたページ (->オリジナル) / アドレス: モード: デフォルト 音声ブラウザ ルビ付き 配色反転 文字拡大 モバイル
0 commit comments