diff --git a/.github/renovate.json b/.github/renovate.json
index 33aafb0d..c613e7ee 100644
--- a/.github/renovate.json
+++ b/.github/renovate.json
@@ -2,7 +2,7 @@
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:base",
- ":semanticCommitTypeAll(ci)"
+ ":semanticCommitTypeAll(deps)"
],
"automerge": true,
"platformAutomerge": true,
diff --git a/.github/workflows/dependency-analysis.yml b/.github/workflows/dependency-analysis.yml
index 893c8c21..12f2df05 100644
--- a/.github/workflows/dependency-analysis.yml
+++ b/.github/workflows/dependency-analysis.yml
@@ -1,13 +1,17 @@
---
on: # yamllint disable-line rule:truthy
- pull_request:
+ push:
+ branches:
+ - master
paths:
- 'src/**'
- 'tests/**'
- '.php-cs-fixer.dist.php'
- 'composer.*'
- push:
+ pull_request:
+ branches:
+ - master
paths:
- 'src/**'
- 'tests/**'
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml
index 6497c27e..e5d8c0a8 100644
--- a/.pre-commit-config.yaml
+++ b/.pre-commit-config.yaml
@@ -9,6 +9,13 @@ repos:
- id: check-added-large-files
args: ['--maxkb=600']
+ - repo: https://github.com/commitizen-tools/commitizen
+ rev: v3.27.0
+ hooks:
+ - id: commitizen
+ stages:
+ - commit-msg
+
- repo: local
hooks:
- id: php-cs-fixer
diff --git a/Makefile b/Makefile
index 02e8a6cc..7d23b3d6 100644
--- a/Makefile
+++ b/Makefile
@@ -53,6 +53,8 @@ MARKDOWN_LINT_RUNNER ?= $(DOCKER) run --rm $$(tty -s && echo "-it" || echo) \
PHIVE_RUNNER ?= $(DOCKER_COMPOSE) run --rm --no-deps app
+NPM_RUNNER ?= pnpm
+
EXPORT_VARS = '\
$${COMPOSE_PROJECT_NAME} \
$${COMPOSER_AUTH} \
@@ -97,7 +99,7 @@ help: ## Show this menu
@echo ' ๐ Logs are stored in $(MAKE_LOGFILE)'
@echo
@echo ' ๐ฆ Package php-cs-fixer-config (https://github.com/wayofdev/php-cs-fixer-config)'
- @echo ' ๐ค Makefile Author Andrij Orlenko (https://github.com/lotyp)'
+ @echo ' ๐ค Author Andrij Orlenko (https://github.com/lotyp)'
@echo ' ๐ข ${YELLOW}Org wayofdev (https://github.com/wayofdev)${RST}'
@echo
.PHONY: help
diff --git a/README.md b/README.md
index af371b19..f391fcad 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-
+
-
-
-
-
-
-
-
-
+ Build
+
+
+
+ Project
+
+
+
+
+
+
+ Quality
+
+
+
+
+
+ Community
+
+
@@ -307,23 +318,18 @@ You are more than welcome. Before contributing, kindly check our [contribution g
## ๐ซก Contributors
-
-
-
-
-
+
+
+
+
+
## ๐ Social Links
* **Twitter:** Follow our organization [@wayofdev](https://twitter.com/intent/follow?screen_name=wayofdev) and the author [@wlotyp](https://twitter.com/intent/follow?screen_name=wlotyp).
* **Discord:** Join our community on [Discord](https://discord.gg/CE3TcCC5vr).
-
-
-
-
-
## ๐งฑ Resources
diff --git a/composer.json b/composer.json
index d304c4fd..28d8fdc6 100644
--- a/composer.json
+++ b/composer.json
@@ -1,6 +1,6 @@
{
"name": "wayofdev/cs-fixer-config",
- "description": "Package adds custom rule-sets to php-cs-fixer",
+ "description": "๐งน Adds custom rule-sets to PHP CS Fixer for consistent coding standards.",
"license": "MIT",
"type": "library",
"keywords": [
@@ -23,7 +23,8 @@
"homepage": "https://wayof.dev",
"support": {
"issues": "https://github.com/wayofdev/php-cs-fixer-config/issues",
- "source": "https://github.com/wayofdev/php-cs-fixer-config"
+ "source": "https://github.com/wayofdev/php-cs-fixer-config",
+ "security": "https://github.com/wayofdev/php-cs-fixer-config/blob/master/.github/SECURITY.md"
},
"require": {
"php": "^8.1",
@@ -38,11 +39,13 @@
"phpstan/phpstan-phpunit": "^1.4",
"phpstan/phpstan-strict-rules": "^1.6",
"phpunit/phpunit": "^10.5",
- "psalm/plugin-phpunit": "~0.19.0",
+ "psalm/plugin-phpunit": "^0.19",
"rector/rector": "^1.1",
"roave/infection-static-analysis-plugin": "^1.35",
- "vimeo/psalm": "^5.23.1"
+ "vimeo/psalm": "^5.24"
},
+ "minimum-stability": "dev",
+ "prefer-stable": true,
"autoload": {
"psr-4": {
"WayOfDev\\PhpCsFixer\\Config\\": "src/"
@@ -50,7 +53,7 @@
},
"autoload-dev": {
"psr-4": {
- "WayOfDev\\Tests\\": "tests/"
+ "WayOfDev\\Tests\\": "tests/src/"
}
},
"config": {
diff --git a/composer.lock b/composer.lock
index 9e715893..46b5888f 100644
--- a/composer.lock
+++ b/composer.lock
@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
- "content-hash": "f383c748c9c365420e939e598f62a637",
+ "content-hash": "d258c2b186e2b9a701d8a139c231097d",
"packages": [
{
"name": "clue/ndjson-react",
@@ -4678,20 +4678,20 @@
},
{
"name": "phpstan/extension-installer",
- "version": "1.3.1",
+ "version": "1.4.0",
"source": {
"type": "git",
"url": "https://github.com/phpstan/extension-installer.git",
- "reference": "f45734bfb9984c6c56c4486b71230355f066a58a"
+ "reference": "5b19a72c93e79bb0d410ac2cd55f02c4a6e0cfbe"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/f45734bfb9984c6c56c4486b71230355f066a58a",
- "reference": "f45734bfb9984c6c56c4486b71230355f066a58a",
+ "url": "https://api.github.com/repos/phpstan/extension-installer/zipball/5b19a72c93e79bb0d410ac2cd55f02c4a6e0cfbe",
+ "reference": "5b19a72c93e79bb0d410ac2cd55f02c4a6e0cfbe",
"shasum": ""
},
"require": {
- "composer-plugin-api": "^2.0",
+ "composer-plugin-api": "^2.6.0",
"php": "^7.2 || ^8.0",
"phpstan/phpstan": "^1.9.0"
},
@@ -4716,9 +4716,9 @@
"description": "Composer plugin for automatic installation of PHPStan extensions",
"support": {
"issues": "https://github.com/phpstan/extension-installer/issues",
- "source": "https://github.com/phpstan/extension-installer/tree/1.3.1"
+ "source": "https://github.com/phpstan/extension-installer/tree/1.4.0"
},
- "time": "2023-05-24T08:59:17+00:00"
+ "time": "2024-06-06T11:26:29+00:00"
},
{
"name": "phpstan/phpdoc-parser",
@@ -4769,16 +4769,16 @@
},
{
"name": "phpstan/phpstan",
- "version": "1.11.3",
+ "version": "1.11.4",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpstan.git",
- "reference": "e64220a05c1209fc856d58e789c3b7a32c0bb9a5"
+ "reference": "9100a76ce8015b9aa7125b9171ae3a76887b6c82"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/phpstan/phpstan/zipball/e64220a05c1209fc856d58e789c3b7a32c0bb9a5",
- "reference": "e64220a05c1209fc856d58e789c3b7a32c0bb9a5",
+ "url": "https://api.github.com/repos/phpstan/phpstan/zipball/9100a76ce8015b9aa7125b9171ae3a76887b6c82",
+ "reference": "9100a76ce8015b9aa7125b9171ae3a76887b6c82",
"shasum": ""
},
"require": {
@@ -4823,7 +4823,7 @@
"type": "github"
}
],
- "time": "2024-05-31T13:53:37+00:00"
+ "time": "2024-06-06T12:19:22+00:00"
},
{
"name": "phpstan/phpstan-deprecation-rules",
@@ -7029,9 +7029,9 @@
}
],
"aliases": [],
- "minimum-stability": "stable",
+ "minimum-stability": "dev",
"stability-flags": [],
- "prefer-stable": false,
+ "prefer-stable": true,
"prefer-lowest": false,
"platform": {
"php": "^8.1"
diff --git a/pest.xml.dist b/pest.xml.dist
index bfbd4483..953282e2 100644
--- a/pest.xml.dist
+++ b/pest.xml.dist
@@ -15,7 +15,7 @@
- tests/Arch
+ tests/src/Arch
diff --git a/phpstan.neon.dist b/phpstan.neon.dist
index aa4c93cc..93d9da40 100644
--- a/phpstan.neon.dist
+++ b/phpstan.neon.dist
@@ -8,5 +8,5 @@ parameters:
- tests/
- .php-cs-fixer.dist.php
excludePaths:
- - tests/Arch
+ - tests/src/Arch
tmpDir: .build/phpstan/
diff --git a/phpunit.xml.dist b/phpunit.xml.dist
index 5f7902ee..c77a7ee6 100644
--- a/phpunit.xml.dist
+++ b/phpunit.xml.dist
@@ -1,6 +1,6 @@
- tests/Unit
+ tests/src/Unit
diff --git a/psalm-baseline.xml b/psalm-baseline.xml
index e12f68ef..39c96402 100644
--- a/psalm-baseline.xml
+++ b/psalm-baseline.xml
@@ -5,7 +5,7 @@
-
+
builder->getConfig()->getFinder()]]>
@@ -27,7 +27,7 @@
-
+
diff --git a/psalm.xml b/psalm.xml
index f6563a6d..0aa15fc6 100644
--- a/psalm.xml
+++ b/psalm.xml
@@ -17,10 +17,11 @@
-
+
-
+
+
diff --git a/tests/Arch/DebugTest.php b/tests/src/Arch/DebugTest.php
similarity index 100%
rename from tests/Arch/DebugTest.php
rename to tests/src/Arch/DebugTest.php
diff --git a/tests/Unit/ConfigBuilderTest.php b/tests/src/Unit/ConfigBuilderTest.php
similarity index 91%
rename from tests/Unit/ConfigBuilderTest.php
rename to tests/src/Unit/ConfigBuilderTest.php
index 0802071c..212445f3 100644
--- a/tests/Unit/ConfigBuilderTest.php
+++ b/tests/src/Unit/ConfigBuilderTest.php
@@ -62,8 +62,8 @@ public function it_has_no_directories_by_default(): void
public function it_adds_directories(): void
{
$finder = $this->builder
- ->inDir(__DIR__ . '/../../src')
- ->inDir(__DIR__ . '/../../tests')
+ ->inDir(__DIR__ . '/../../../src')
+ ->inDir(__DIR__ . '/../../../tests/src')
->getConfig()
->getFinder()
;
@@ -71,7 +71,7 @@ public function it_adds_directories(): void
$items = $this->finderToArray($finder);
self::assertContains(__FILE__, $items);
- self::assertContains(realpath(__DIR__ . '/../../src/ConfigBuilder.php'), $items);
+ self::assertContains(realpath(__DIR__ . '/../../../src/ConfigBuilder.php'), $items);
}
#[Test]
@@ -123,15 +123,15 @@ public function it_overrides_default_rules(): void
public function it_excludes_directories(): void
{
$finder = $this->builder
- ->exclude([__DIR__ . '/../../src/RuleSets'])
- ->inDir(__DIR__ . '/../../src')
+ ->exclude([__DIR__ . '/../../../src/RuleSets'])
+ ->inDir(__DIR__ . '/../../../src')
->getConfig()
->getFinder()
;
$items = $this->finderToArray($finder);
- self::assertNotContains(__DIR__ . '/../../src/RuleSets/DefaultSet.php', $items);
+ self::assertNotContains(__DIR__ . '/../../../src/RuleSets/DefaultSet.php', $items);
}
#[Test]
diff --git a/tests/Unit/RuleSets/DefaultSetTest.php b/tests/src/Unit/RuleSets/DefaultSetTest.php
similarity index 100%
rename from tests/Unit/RuleSets/DefaultSetTest.php
rename to tests/src/Unit/RuleSets/DefaultSetTest.php