diff --git a/.editorconfig b/.editorconfig index 3faf149..5e5b915 100644 --- a/.editorconfig +++ b/.editorconfig @@ -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 diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4e811cf --- /dev/null +++ b/.gitattributes @@ -0,0 +1,9 @@ +/.docs export-ignore +/.github export-ignore +/.editorconfig export-ignore +/.gitattributes export-ignore +/.gitignore export-ignore +/Makefile export-ignore +/phpstan.neon export-ignore +/ruleset.xml export-ignore +/tests export-ignore diff --git a/.github/.kodiak.toml b/.github/.kodiak.toml deleted file mode 100644 index 60c34b6..0000000 --- a/.github/.kodiak.toml +++ /dev/null @@ -1,10 +0,0 @@ -version = 1 - -[merge] -automerge_label = "automerge" -blacklist_title_regex = "^WIP.*" -blacklist_labels = ["WIP"] -method = "rebase" -delete_branch_on_merge = true -notify_on_conflict = true -optimistic_updates = false diff --git a/.github/workflows/codesniffer.yml b/.github/workflows/codesniffer.yml index dfc76ff..590394f 100644 --- a/.github/workflows/codesniffer.yml +++ b/.github/workflows/codesniffer.yml @@ -2,6 +2,7 @@ name: "Codesniffer" on: pull_request: + workflow_dispatch: push: branches: ["*"] @@ -12,4 +13,6 @@ on: jobs: codesniffer: name: "Codesniffer" - uses: contributte/.github/.github/workflows/codesniffer.yml@v1 + uses: contributte/.github/.github/workflows/codesniffer.yml@master + with: + php: "8.4" diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 024715f..c746daf 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -2,16 +2,18 @@ name: "Coverage" on: pull_request: + workflow_dispatch: push: branches: ["*"] schedule: - - cron: "0 8 * * 1" + - cron: "0 9 * * 1" jobs: - test80: + coverage: name: "Nette Tester" - uses: contributte/.github/.github/workflows/nette-tester-coverage.yml@v1 + uses: contributte/.github/.github/workflows/nette-tester-coverage-v2.yml@master + secrets: inherit with: - php: "8.1" + php: "8.4" diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index db3ad34..cd37eba 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -2,14 +2,17 @@ name: "Phpstan" on: pull_request: + workflow_dispatch: push: branches: ["*"] schedule: - - cron: "0 8 * * 1" + - cron: "0 10 * * 1" jobs: phpstan: name: "Phpstan" - uses: contributte/.github/.github/workflows/phpstan.yml@v1 + uses: contributte/.github/.github/workflows/phpstan.yml@master + with: + php: "8.4" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 88a1937..ef17693 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -2,23 +2,42 @@ name: "Nette Tester" on: pull_request: + workflow_dispatch: push: branches: ["*"] schedule: - - cron: "0 8 * * 1" + - 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@v1 + uses: contributte/.github/.github/workflows/nette-tester.yml@master with: php: "8.2" - test81: + testlower: name: "Nette Tester" - uses: contributte/.github/.github/workflows/nette-tester.yml@v1 + uses: contributte/.github/.github/workflows/nette-tester.yml@master with: - php: "8.1" + php: "8.2" composer: "composer update --no-interaction --no-progress --prefer-dist --prefer-stable --prefer-lowest" diff --git a/.gitignore b/.gitignore index 394ff5b..f0b3670 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,9 @@ /composer.lock # Tests -/tests/*.log /tests/tmp -/tests/coverage.html +/coverage.* +/tests/**/*.log +/tests/**/*.html +/tests/**/*.expected +/tests/**/*.actual diff --git a/Makefile b/Makefile index b232d62..750fec1 100644 --- a/Makefile +++ b/Makefile @@ -1,10 +1,11 @@ -.PHONY: install qa cs csf phpstan tests coverage - +.PHONY: install install: composer update +.PHONY: qa qa: phpstan cs +.PHONY: cs cs: ifdef GITHUB_ACTION vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp -q --report=checkstyle src tests | cs2pr @@ -12,18 +13,22 @@ else vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests endif +.PHONY: csf csf: - vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --colors -nsp src tests + vendor/bin/phpcbf --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests +.PHONY: phpstan phpstan: vendor/bin/phpstan analyse -c phpstan.neon +.PHONY: tests tests: vendor/bin/tester -s -p php --colors 1 -C tests/Cases +.PHONY: coverage coverage: ifdef GITHUB_ACTION - vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.xml --coverage-src src tests/Cases + vendor/bin/tester -s -p php --colors 1 -C --coverage coverage.xml --coverage-src src tests/Cases else - vendor/bin/tester -s -p phpdbg --colors 1 -C --coverage coverage.html --coverage-src src tests/Cases + vendor/bin/tester -s -p php --colors 1 -C --coverage coverage.html --coverage-src src tests/Cases endif diff --git a/README.md b/README.md index 786dc40..7f1be02 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@

- +

@@ -34,8 +34,8 @@ For details on how to use this package, check out our [documentation](.docs). | State | Version | Branch | Nette | PHP | |-------------|---------|----------|-------|---------| -| dev | `^0.5` | `master` | 3.1+ | `>=8.1` | -| stable | `^0.4` | `master` | 3.1+ | `>=8.1` | +| dev | `^0.6` | `master` | 4.0+ | `>=8.2` | +| stable | `^0.5` | `master` | 3.1+ | `>=8.1` | ## Development diff --git a/composer.json b/composer.json index da0c213..cd6c054 100644 --- a/composer.json +++ b/composer.json @@ -18,14 +18,14 @@ } ], "require": { - "php": ">=8.1", - "contributte/tracy": "^0.6.0", - "contributte/utils": "^0.6.0" + "php": ">=8.2", + "nette/utils": "^4.0.3", + "tracy/tracy": "^2.10.2" }, "require-dev": { + "contributte/qa": "^0.4.0", "contributte/phpstan": "^0.1.0", - "contributte/phpunit": "^0.1.0", - "contributte/qa": "^0.4.0" + "contributte/tester": "^0.4.0" }, "autoload": { "psr-4": { @@ -44,10 +44,11 @@ "prefer-stable": true, "extra": { "branch-alias": { - "dev-master": "0.5.x-dev" + "dev-master": "0.6.x-dev" } }, "config": { + "sort-packages": true, "allow-plugins": { "dealerdirect/phpcodesniffer-composer-installer": true } diff --git a/phpstan.neon b/phpstan.neon index ae70d2c..3df97c9 100644 --- a/phpstan.neon +++ b/phpstan.neon @@ -3,7 +3,7 @@ includes: parameters: level: 9 - phpVersion: 80100 + phpVersion: 80200 scanDirectories: - src diff --git a/ruleset.xml b/ruleset.xml index 38b9b8e..4e82ea7 100644 --- a/ruleset.xml +++ b/ruleset.xml @@ -1,7 +1,7 @@ - + diff --git a/src/Dev.php b/src/Dev.php index 590a5e9..f3b3f23 100644 --- a/src/Dev.php +++ b/src/Dev.php @@ -2,7 +2,6 @@ namespace Contributte\Dev; -use Nette\StaticClass; use Nette\Utils\Json; use RuntimeException; use Tracy\Debugger; @@ -12,7 +11,10 @@ class Dev { - use StaticClass; + final private function __construct() + { + // Static class - cannot be instantiated. + } /** * Dump; diff --git a/tests/.coveralls.yml b/tests/.coveralls.yml deleted file mode 100644 index 8450382..0000000 --- a/tests/.coveralls.yml +++ /dev/null @@ -1,4 +0,0 @@ -# for php-coveralls -service_name: github-actions -coverage_clover: coverage.xml -json_path: coverage.json