Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
/.github export-ignore
/.vitepress export-ignore
/docs export-ignore
/tests export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/package.json export-ignore
/phpunit.xml.dist export-ignore
/README.md export-ignore
/.php-cs-fixer.dist.php export-ignore
/CHANGELOG.md export-ignore
/CONTRIBUTING.md export-ignore
/codecov.yml export-ignore
/Makefile export-ignore
/package.json export-ignore
/phpunit.xml.dist export-ignore
23 changes: 12 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
.vitepress/dist
.vitepress/cache
/node_modules/
/vendor/
/demo/vendor/
/demo/.vagrant/
/report/
.DS_Store
/report
/vendor
# PHP CS Fixer configuration
/.php-cs-fixer.cache
/.php-cs-fixer.php
.phpunit.result.cache
composer.lock
phpunit.xml
/tests/_output/
.phplint-cache
coverage.xml
.phpunit.result.cache
package-lock.json
.DS_Store
phpunit.xml

.vitepress/dist
.vitepress/cache
.idea
32 changes: 32 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?php

declare(strict_types=1);

use PhpCsFixer\Config;
use PhpCsFixer\Finder;
use PhpCsFixer\Runner\Parallel\ParallelConfigFactory;

return (new Config())
->setParallelConfig(ParallelConfigFactory::detect())
->setRiskyAllowed(false)
->setRules([
'@PSR12' => true,
// '@PSR12:risky' => true,
'@PhpCsFixer' => true,
// '@PhpCsFixer:risky' => true,
'yoda_style' => false,
'concat_space' => ['spacing' => 'one'],
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => true,
'import_functions' => true,
],
'multiline_whitespace_before_semicolons' => ['strategy' => 'no_multi_line'],
'php_unit_test_class_requires_covers' => false, // bug #
// 'declare_strict_types' => true,
])
->setFinder(
(new Finder())
// 💡 root folder to check
->in(__DIR__)
);
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,17 @@ vendor: $(wildcard composer.lock)
composer install --prefer-dist

lint: vendor
vendor/bin/phplint . --exclude=vendor/
vendor/bin/ecs check src tests
vendor/bin/php-cs-fixer check

lint-fix: vendor
vendor/bin/ecs check src tests --fix
vendor/bin/php-cs-fixer fix --diff

rector:
vendor/bin/rector --clear-cache --dry-run

rector-fix:
vendor/bin/rector --clear-cache
vendor/bin/ecs check src tests --fix
vendor/bin/php-cs-fixer fix --diff

unit: vendor
phpdbg -qrr vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml --coverage-html=./report/
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@
},
"require-dev": {
"equip/dispatch": "^2.0",
"friendsofphp/php-cs-fixer": "^3.95",
"laminas/laminas-diactoros": "^1.3|^2.0|^3.0",
"overtrue/phplint": "^3.0|^4.0|^5.0|^6.0",
"phpstan/phpstan": "^1.11",
"phpunit/phpunit": "^8.5.30|^9.0",
"rector/rector": "^0.14.5",
"symplify/easy-coding-standard": "^11.1"
"rector/rector": "^0.14.5"
},
"config": {
"sort-packages": true
Expand Down
29 changes: 0 additions & 29 deletions ecs.php

This file was deleted.

Loading
Loading