Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ indent_style = tab
indent_size = tab
tab_width = 4

[{*.json, *.yaml, *.yml, *.md}]
[*.{json,yaml,yml,md}]
indent_style = space
indent_size = 2
11 changes: 6 additions & 5 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
.github export-ignore
tests/ export-ignore
.docs export-ignore
.editorconfig export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
.github export-ignore
Makefile export-ignore
phpstan.neon export-ignore
ecs.php export-ignore
*.php diff=php
ruleset.xml export-ignore
tests export-ignore
10 changes: 0 additions & 10 deletions .github/.kodiak.toml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/codesniffer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Codesniffer"

on:
pull_request:
workflow_dispatch:

push:
branches: ["*"]

schedule:
- cron: "0 8 * * 1"

jobs:
codesniffer:
name: "Codesniffer"
uses: contributte/.github/.github/workflows/codesniffer.yml@master
with:
php: "8.2"
18 changes: 18 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Coverage"

on:
pull_request:
workflow_dispatch:

push:
branches: ["*"]

schedule:
- cron: "0 9 * * 1"

jobs:
coverage:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester-coverage-v2.yml@master
with:
php: "8.2"
68 changes: 0 additions & 68 deletions .github/workflows/main.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: "Phpstan"

on:
pull_request:
workflow_dispatch:

push:
branches: ["*"]

schedule:
- cron: "0 10 * * 1"

jobs:
phpstan:
name: "Phpstan"
uses: contributte/.github/.github/workflows/phpstan.yml@master
with:
php: "8.2"
43 changes: 43 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: "Nette Tester"

on:
pull_request:
workflow_dispatch:

push:
branches: ["*"]

schedule:
- cron: "0 10 * * 1"

jobs:
test85:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@master
with:
php: "8.5"

test84:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@master
with:
php: "8.4"

test83:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@master
with:
php: "8.3"

test82:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@master
with:
php: "8.2"

testlower:
name: "Nette Tester"
uses: contributte/.github/.github/workflows/nette-tester.yml@master
with:
php: "8.2"
composer: "composer update --no-interaction --no-progress --prefer-dist --prefer-stable --prefer-lowest"
19 changes: 14 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
tests/**/output/*.actual
tests/**/output/*.expected
vendor/
composer.lock
coverage.*
# IDE
/.idea

# Composer
/vendor
/composer.lock

# Tests
/tests/tmp
/coverage.*
/tests/**/*.log
/tests/**/*.html
/tests/**/*.expected
/tests/**/*.actual
28 changes: 19 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,24 +1,34 @@
.PHONY: install qa cs csf phpstan tests coverage-clover coverage-html

.PHONY: install
install:
composer update

.PHONY: qa
qa: phpstan cs

.PHONY: cs
cs:
vendor/bin/ecs check src tests
ifdef GITHUB_ACTION
vendor/bin/phpcs --standard=ruleset.xml -q --report=checkstyle --extensions="php,phpt" src tests | cs2pr
else
vendor/bin/phpcs --standard=ruleset.xml --extensions="php,phpt" src tests
endif

.PHONY: csf
csf:
vendor/bin/ecs check src tests --fix
vendor/bin/phpcbf --standard=ruleset.xml --extensions="php,phpt" src tests

.PHONY: phpstan
phpstan:
vendor/bin/phpstan analyze -l 8 src
vendor/bin/phpstan analyze -c phpstan.neon

.PHONY: tests
tests:
vendor/bin/tester -C tests

coverage-clover:
.PHONY: coverage
coverage:
ifdef GITHUB_ACTION
vendor/bin/tester -C --coverage coverage.xml --coverage-src src tests

coverage-html:
vendor/bin/tester -C --coverage coverage.hzml --coverage-src src tests
else
vendor/bin/tester -C --coverage coverage.html --coverage-src src tests
endif
24 changes: 15 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,26 +22,32 @@
"require": {
"php": ">=8.2",
"ext-curl": "*",
"nette/di": "^3.0"
"nette/di": "^3.2.0"
},
"require-dev": {
"latte/latte": "^2.4 || ^3.0",
"nette/application": "^3.0",
"nette/bootstrap": "^3.0",
"nette/tester": "^2.0",
"phpstan/phpstan": "^2.0",
"symplify/easy-coding-standard": "^12.0",
"tracy/tracy": "^2.4"
"contributte/phpstan": "^0.2.0",
"contributte/qa": "^0.4.0",
"contributte/tester": "^0.4.0",
"latte/latte": "^3.0.0",
"nette/application": "^3.2.0",
"nette/bootstrap": "^3.2.0",
"nette/neon": "^3.4.0",
"tracy/tracy": "^2.10.0"
},
"suggest": {
"tracy/tracy": "to enable asset debugging in the debug bar panel",
"latte/latte": "to enable Latte integration via {webpack} macro"
"latte/latte": "to enable Latte 3 integration via {webpack} tag"
},
"autoload": {
"psr-4": {
"Contributte\\Webpack\\": "src/"
}
},
"autoload-dev": {
"psr-4": {
"Tests\\": "tests/"
}
},
"prefer-stable": true,
"config": {
"sort-packages": true,
Expand Down
22 changes: 0 additions & 22 deletions ecs.php

This file was deleted.

21 changes: 19 additions & 2 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
includes:
- vendor/contributte/phpstan/phpstan.neon

parameters:
excludePaths:
- src/Latte/WebpackMacros.php # latte 2 compatibility
level: 8
phpVersion: 80200

scanDirectories:
- src

fileExtensions:
- php

paths:
- src

ignoreErrors:
- identifier: if.condNotBoolean
- identifier: booleanAnd.leftNotBoolean
- identifier: booleanNot.exprNotBoolean
Loading