diff --git a/.editorconfig b/.editorconfig index 3faf149..352f1e9 100644 --- a/.editorconfig +++ b/.editorconfig @@ -1,5 +1,3 @@ -# EditorConfig is awesome: http://EditorConfig.org - root = true [*] @@ -11,6 +9,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 index 12910b6..ab3bf9a 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,11 +1,9 @@ -# Not archived -.docs export-ignore -tests export-ignore -.editorconfig export-ignore -.gitattributes export-ignore -.gitignore export-ignore -.travis.yml export-ignore -Makefile export-ignore -phpstan.neon export-ignore -README.md export-ignore -ruleset.xml export-ignore +/.docs export-ignore +/.github export-ignore +/tests export-ignore +.editorconfig export-ignore +.gitattributes export-ignore +.gitignore export-ignore +Makefile export-ignore +phpstan.neon export-ignore +ruleset.xml export-ignore diff --git a/.github/workflows/codesniffer.yml b/.github/workflows/codesniffer.yml index d5ff803..590394f 100644 --- a/.github/workflows/codesniffer.yml +++ b/.github/workflows/codesniffer.yml @@ -15,4 +15,4 @@ jobs: name: "Codesniffer" uses: contributte/.github/.github/workflows/codesniffer.yml@master with: - php: "8.3" + php: "8.4" diff --git a/.github/workflows/coverage.yml b/.github/workflows/coverage.yml index 85f1300..75a3f89 100644 --- a/.github/workflows/coverage.yml +++ b/.github/workflows/coverage.yml @@ -8,11 +8,12 @@ on: branches: ["*"] schedule: - - cron: "0 8 * * 1" + - cron: "0 9 * * 1" jobs: coverage: name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester-coverage-v2.yml@master with: - php: "8.3" + php: "8.4" + secrets: inherit diff --git a/.github/workflows/phpstan.yml b/.github/workflows/phpstan.yml index 9827fdd..cd37eba 100644 --- a/.github/workflows/phpstan.yml +++ b/.github/workflows/phpstan.yml @@ -8,11 +8,11 @@ on: branches: ["*"] schedule: - - cron: "0 8 * * 1" + - cron: "0 10 * * 1" jobs: phpstan: name: "Phpstan" uses: contributte/.github/.github/workflows/phpstan.yml@master with: - php: "8.3" + php: "8.4" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e4b0ffb..909d734 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,4 +1,4 @@ -name: "Tests" +name: "Nette Tester" on: pull_request: @@ -8,29 +8,36 @@ on: branches: ["*"] schedule: - - cron: "0 8 * * 1" + - cron: "0 10 * * 1" jobs: - tests-82: - name: "Nette Tester (PHP 8.2)" + test85: + name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester.yml@master with: - php: "8.2" + php: "8.5" + + test84: + name: "Nette Tester" + uses: contributte/.github/.github/workflows/nette-tester.yml@master + with: + php: "8.4" - tests-83: - name: "Nette Tester (PHP 8.3)" + test83: + name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester.yml@master with: php: "8.3" - tests-84: - name: "Nette Tester (PHP 8.4)" + test82: + name: "Nette Tester" uses: contributte/.github/.github/workflows/nette-tester.yml@master with: - php: "8.4" + php: "8.2" - tests-85: - name: "Nette Tester (PHP 8.5)" + testlowest: + name: "Nette Tester Lowest" uses: contributte/.github/.github/workflows/nette-tester.yml@master with: - php: "8.5" + php: "8.2" + composer: "composer update --no-interaction --no-progress --prefer-dist --prefer-lowest --prefer-stable" diff --git a/.gitignore b/.gitignore index b1b6f4d..f0b3670 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,9 @@ /composer.lock # Tests -/temp -/coverage.xml +/tests/tmp +/coverage.* +/tests/**/*.log +/tests/**/*.html +/tests/**/*.expected +/tests/**/*.actual diff --git a/Makefile b/Makefile index 8f5528e..6655ff5 100644 --- a/Makefile +++ b/Makefile @@ -1,29 +1,34 @@ -.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 + vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions=php,phpt --colors -nsp -q --report=checkstyle src tests | cs2pr else - vendor/bin/phpcs --standard=ruleset.xml --encoding=utf-8 --extensions="php,phpt" --colors -nsp src tests + 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 --extensions="php,phpt" --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 + 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 phpdbg --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 phpdbg --colors 1 -C --coverage coverage.html --coverage-src src tests/Cases endif diff --git a/README.md b/README.md index 88304f3..6084b03 100644 --- a/README.md +++ b/README.md @@ -32,11 +32,10 @@ For details on how to use this package, check out our [documentation](.docs). ## Versions -| State | Version | Branch | Nette | PHP | -|-------------|---------|----------|-------|---------| -| dev | `^0.5` | `master` | 3.0+ | `>=7.2` | -| stable | `^0.4` | `master` | 3.0+ | `>=7.2` | -| stable | `^0.2` | `master` | 2.4 | `>=7.1` | +| State | Version | Branch | Nette | PHP | +|--------|---------|----------|-------|---------| +| dev | `^0.6` | `master` | 3.2+ | `>=8.2` | +| stable | `^0.5` | `master` | 3.0+ | `>=7.2` | ## Development diff --git a/composer.json b/composer.json index c0e8333..3598c2e 100644 --- a/composer.json +++ b/composer.json @@ -37,6 +37,11 @@ "Contributte\\Http\\": "src" } }, + "autoload-dev": { + "psr-4": { + "Tests\\": "tests" + } + }, "minimum-stability": "dev", "prefer-stable": true, "config": { diff --git a/tests/cases/Client/FakeClient.phpt b/tests/Cases/Client/FakeClient.phpt similarity index 100% rename from tests/cases/Client/FakeClient.phpt rename to tests/Cases/Client/FakeClient.phpt diff --git a/tests/cases/Client/Request.phpt b/tests/Cases/Client/Request.phpt similarity index 100% rename from tests/cases/Client/Request.phpt rename to tests/Cases/Client/Request.phpt diff --git a/tests/cases/Client/Response.phpt b/tests/Cases/Client/Response.phpt similarity index 100% rename from tests/cases/Client/Response.phpt rename to tests/Cases/Client/Response.phpt diff --git a/tests/cases/Curl/CurlBuilder.phpt b/tests/Cases/Curl/CurlBuilder.phpt similarity index 100% rename from tests/cases/Curl/CurlBuilder.phpt rename to tests/Cases/Curl/CurlBuilder.phpt diff --git a/tests/cases/DI/BasicAuthExtension.phpt b/tests/Cases/DI/BasicAuthExtension.phpt similarity index 100% rename from tests/cases/DI/BasicAuthExtension.phpt rename to tests/Cases/DI/BasicAuthExtension.phpt diff --git a/tests/cases/DI/CurlExtension.phpt b/tests/Cases/DI/CurlExtension.phpt similarity index 100% rename from tests/cases/DI/CurlExtension.phpt rename to tests/Cases/DI/CurlExtension.phpt diff --git a/tests/cases/DI/SapiRequestExtension.phpt b/tests/Cases/DI/SapiRequestExtension.phpt similarity index 100% rename from tests/cases/DI/SapiRequestExtension.phpt rename to tests/Cases/DI/SapiRequestExtension.phpt diff --git a/tests/cases/Url.phpt b/tests/Cases/Url.phpt similarity index 100% rename from tests/cases/Url.phpt rename to tests/Cases/Url.phpt