add development tools
This commit is contained in:
parent
7ddeff8ec5
commit
29a764bcfb
34
.php-cs-fixer.php
Normal file
34
.php-cs-fixer.php
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
$finder = (new PhpCsFixer\Finder())
|
||||||
|
->in(__DIR__)
|
||||||
|
;
|
||||||
|
|
||||||
|
$header = <<<EOF
|
||||||
|
Copyright (c) D3 Data Development (Inh. Thomas Dartsch)
|
||||||
|
|
||||||
|
For the full copyright and license information, please view
|
||||||
|
the LICENSE file that was distributed with this source code.
|
||||||
|
|
||||||
|
https://www.d3data.de
|
||||||
|
|
||||||
|
@copyright (C) D3 Data Development (Inh. Thomas Dartsch)
|
||||||
|
@author D3 Data Development - Daniel Seifert <info@shopmodule.com>
|
||||||
|
@link https://www.oxidmodule.com
|
||||||
|
EOF;
|
||||||
|
|
||||||
|
$config = new PhpCsFixer\Config();
|
||||||
|
return $config->setRules([
|
||||||
|
'@PHP80Migration' => true,
|
||||||
|
'@PSR12' => true,
|
||||||
|
'header_comment' => [
|
||||||
|
'comment_type' => 'PHPDoc',
|
||||||
|
'header' => $header,
|
||||||
|
'location' => 'after_open',
|
||||||
|
'separate' => 'both',
|
||||||
|
],
|
||||||
|
'php_unit_test_class_requires_covers' => true,
|
||||||
|
'doctrine_annotation_indentation' => true,
|
||||||
|
])
|
||||||
|
->setFinder($finder)
|
||||||
|
;
|
@ -16,7 +16,7 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
"require": {
|
"require": {
|
||||||
"php": ">=8.0",
|
"php": "^8.0",
|
||||||
"composer/composer": "^2.7.1",
|
"composer/composer": "^2.7.1",
|
||||||
"doctrine/collections": "^1.8.0",
|
"doctrine/collections": "^1.8.0",
|
||||||
"guzzlehttp/guzzle": "~7.0",
|
"guzzlehttp/guzzle": "~7.0",
|
||||||
@ -26,12 +26,23 @@
|
|||||||
"phpunit/phpunit": "^9.3",
|
"phpunit/phpunit": "^9.3",
|
||||||
"overtrue/phplint": "^1.2",
|
"overtrue/phplint": "^1.2",
|
||||||
"squizlabs/php_codesniffer": "3.*",
|
"squizlabs/php_codesniffer": "3.*",
|
||||||
"phpstan/phpstan": "^1.9"
|
"phpstan/phpstan": "^2.0",
|
||||||
|
"friendsofphp/php-cs-fixer": "^3.65"
|
||||||
},
|
},
|
||||||
"autoload": {
|
"autoload": {
|
||||||
"psr-4": {
|
"psr-4": {
|
||||||
"D3\\KlicktippPhpClient\\": "src/"
|
"D3\\KlicktippPhpClient\\": "src/"
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"autoload-dev": {
|
||||||
|
"psr-4": {
|
||||||
|
"D3\\KlicktippPhpClient\\tests\\": "tests/"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"scripts": {
|
||||||
|
"test": "./vendor/bin/phpunit --no-coverage",
|
||||||
|
"check-style": "./vendor/bin/php-cs-fixer fix --verbose --dry-run",
|
||||||
|
"fix-style": "./vendor/bin/php-cs-fixer fix --verbose",
|
||||||
|
"check-code": "./vendor/bin/phpstan analyse -c phpstan.neon --no-progress --ansi"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
5
phpstan.neon
Normal file
5
phpstan.neon
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
parameters:
|
||||||
|
paths:
|
||||||
|
- src
|
||||||
|
level: 10
|
||||||
|
phpVersion: 80000
|
20
phpunit.xml
Normal file
20
phpunit.xml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
<?xml version="1.0"?>
|
||||||
|
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||||
|
bootstrap="vendor/autoload.php"
|
||||||
|
convertErrorsToExceptions="true"
|
||||||
|
convertNoticesToExceptions="true"
|
||||||
|
convertWarningsToExceptions="true"
|
||||||
|
xsi:noNamespaceSchemaLocation="https://schema.phpunit.de/9.3/phpunit.xsd">
|
||||||
|
<coverage>
|
||||||
|
<include>
|
||||||
|
<directory suffix=".php">src</directory>
|
||||||
|
</include>
|
||||||
|
<report>
|
||||||
|
<clover outputFile="build/logs/clover.xml"/>
|
||||||
|
</report>
|
||||||
|
</coverage>
|
||||||
|
<testsuite name="KlicktippPhpClient">
|
||||||
|
<directory>./tests</directory>
|
||||||
|
</testsuite>
|
||||||
|
<logging/>
|
||||||
|
</phpunit>
|
Loading…
x
Reference in New Issue
Block a user