From b1bfd846a8de938fc7b29bfb8da51d0e73d8f210 Mon Sep 17 00:00:00 2001 From: juniwalk Date: Thu, 2 May 2024 11:16:03 +0200 Subject: [PATCH] Added PHPStan and Nette Tester --- .gitignore | 3 +++ composer.json | 18 ++++++++++++++++++ phpstan.neon | 8 ++++++++ tests/.gitignore | 1 + tests/bootstrap.php | 12 ++++++++++++ 5 files changed, 42 insertions(+) create mode 100644 .gitignore create mode 100644 phpstan.neon create mode 100644 tests/.gitignore create mode 100644 tests/bootstrap.php diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..94ef125 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +vendor +composer.lock +version.json diff --git a/composer.json b/composer.json index ad5123f..82532d2 100644 --- a/composer.json +++ b/composer.json @@ -11,6 +11,15 @@ "psr-4": {"JuniWalk\\Nestor\\": "src/"} }, + "minimum-stability": "dev", + "prefer-stable": true, + "config": { + "sort-packages": true, + "allow-plugins": { + "phpstan/extension-installer": true + } + }, + "require": { "php": ">=8.1", "doctrine/orm": "^2.0|^3.0", @@ -18,6 +27,15 @@ "juniwalk/utils": "^3.0" }, + "require-dev": { + "nette/tester": "^2.5", + "phpstan/extension-installer": "^1.0", + "phpstan/phpstan": "^1.0", + "phpstan/phpstan-nette": "^1.0", + "staabm/phpstan-todo-by": "^0.1", + "tracy/tracy": "^2.10" + }, + "suggest": { "nette/di": "For integration into Nette project" } diff --git a/phpstan.neon b/phpstan.neon new file mode 100644 index 0000000..401d969 --- /dev/null +++ b/phpstan.neon @@ -0,0 +1,8 @@ +parameters: + level: 9 + paths: + - src + - tests + + todo_by: + referenceVersion: "nextMinor" diff --git a/tests/.gitignore b/tests/.gitignore new file mode 100644 index 0000000..e8d1edb --- /dev/null +++ b/tests/.gitignore @@ -0,0 +1 @@ +/*/output \ No newline at end of file diff --git a/tests/bootstrap.php b/tests/bootstrap.php new file mode 100644 index 0000000..25a65f8 --- /dev/null +++ b/tests/bootstrap.php @@ -0,0 +1,12 @@ +