diff --git a/.gitattributes b/.gitattributes index 0c5892c..c01e089 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1,9 +1,13 @@ +/.gemini export-ignore /.github export-ignore /tests export-ignore /.editorconfig export-ignore /.gitattributes export-ignore /.gitignore export-ignore -/phpcs.xml export-ignore -/phpstan.neon export-ignore +/CONTRIBUTING.md export-ignore +/index.php export-ignore +/phpcs.xml.dist export-ignore /phpstan-baseline.neon export-ignore -/phpunit.xml export-ignore +/phpstan.dist.neon export-ignore +/phpunit-watcher.yml export-ignore +/phpunit.xml.dist export-ignore diff --git a/.gitignore b/.gitignore index 49ff583..cb308cf 100644 --- a/.gitignore +++ b/.gitignore @@ -8,6 +8,8 @@ coverage/ *.sublime* clover.xml phpcs.xml +phpstan.neon +phpunit.xml .runway-config.json .runway-creds.json .DS_Store diff --git a/composer.json b/composer.json index ae0925e..6e8f79d 100644 --- a/composer.json +++ b/composer.json @@ -82,11 +82,13 @@ "rm server.pid", "echo \"Performance Tests Completed.\"" ], - "lint": "phpstan --no-progress --memory-limit=256M -cphpstan.neon", + "lint": "phpstan --no-progress --memory-limit=256M", "beautify": "phpcbf --standard=phpcs.xml", "phpcs": "phpcs --standard=phpcs.xml -n", "post-install-cmd": [ - "php -r \"if (!file_exists('phpcs.xml')) copy('phpcs.xml.dist', 'phpcs.xml');\"" + "php -r \"if (!file_exists('phpcs.xml')) copy('phpcs.xml.dist', 'phpcs.xml');\"", + "php -r \"if (!file_exists('phpstan.neon')) copy('phpstan.dist.neon', 'phpstan.neon');\"", + "php -r \"if (!file_exists('phpunit.xml')) copy('phpunit.xml.dist', 'phpunit.xml');\"" ] }, "suggest": { @@ -97,4 +99,4 @@ "replace": { "mikecao/flight": "2.0.2" } -} \ No newline at end of file +} diff --git a/phpstan.dist.neon b/phpstan.dist.neon new file mode 100644 index 0000000..f2de10d --- /dev/null +++ b/phpstan.dist.neon @@ -0,0 +1,14 @@ +includes: + - vendor/phpstan/phpstan/conf/bleedingEdge.neon + - phpstan-baseline.neon + +parameters: + level: 6 + excludePaths: + - vendor + - flight/util/ReturnTypeWillChange.php + - tests/named-arguments + paths: + - flight + - index.php + treatPhpDocTypesAsCertain: false diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..b890bb7 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,33 @@ + + + + + flight/ + + + flight/autoload.php + + + + + tests/ + tests/named-arguments/ + + + + + + + +