Skip to content

Commit 2fdfca4

Browse files
authored
Merge pull request #299 from wayofdev/docs/updates
2 parents 71ed174 + 47a5ad4 commit 2fdfca4

15 files changed

+82
-59
lines changed

.github/renovate.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
33
"extends": [
44
"config:base",
5-
":semanticCommitTypeAll(ci)"
5+
":semanticCommitTypeAll(deps)"
66
],
77
"automerge": true,
88
"platformAutomerge": true,

.github/workflows/dependency-analysis.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
11
---
22

33
on: # yamllint disable-line rule:truthy
4-
pull_request:
4+
push:
5+
branches:
6+
- master
57
paths:
68
- 'src/**'
79
- 'tests/**'
810
- '.php-cs-fixer.dist.php'
911
- 'composer.*'
10-
push:
12+
pull_request:
13+
branches:
14+
- master
1115
paths:
1216
- 'src/**'
1317
- 'tests/**'

.pre-commit-config.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,13 @@ repos:
99
- id: check-added-large-files
1010
args: ['--maxkb=600']
1111

12+
- repo: https://github.com/commitizen-tools/commitizen
13+
rev: v3.27.0
14+
hooks:
15+
- id: commitizen
16+
stages:
17+
- commit-msg
18+
1219
- repo: local
1320
hooks:
1421
- id: php-cs-fixer

Makefile

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,8 @@ MARKDOWN_LINT_RUNNER ?= $(DOCKER) run --rm $$(tty -s && echo "-it" || echo) \
5353

5454
PHIVE_RUNNER ?= $(DOCKER_COMPOSE) run --rm --no-deps app
5555

56+
NPM_RUNNER ?= pnpm
57+
5658
EXPORT_VARS = '\
5759
$${COMPOSE_PROJECT_NAME} \
5860
$${COMPOSER_AUTH} \
@@ -97,7 +99,7 @@ help: ## Show this menu
9799
@echo ' 📑 Logs are stored in $(MAKE_LOGFILE)'
98100
@echo
99101
@echo ' 📦 Package php-cs-fixer-config (https://github.com/wayofdev/php-cs-fixer-config)'
100-
@echo ' 🤠 Makefile Author Andrij Orlenko (https://github.com/lotyp)'
102+
@echo ' 🤠 Author Andrij Orlenko (https://github.com/lotyp)'
101103
@echo ' 🏢 ${YELLOW}Org wayofdev (https://github.com/wayofdev)${RST}'
102104
@echo
103105
.PHONY: help

README.md

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<div align="center">
1+
<p align="center">
22
<br>
33
<a href="https://wayof.dev" target="_blank">
44
<picture>
@@ -7,18 +7,29 @@
77
</picture>
88
</a>
99
<br>
10-
<br>
11-
</div>
10+
</p>
1211

1312
<p align="center">
14-
<a href="https://github.com/wayofdev/php-cs-fixer-config/actions" target="_blank"><img alt="Build Status" src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fwayofdev%2Fphp-cs-fixer-config%2Fbadge&style=flat-square&label=github%20actions"/></a>
15-
<a href="https://packagist.org/packages/wayofdev/php-cs-fixer-config" target="_blank"><img src="https://img.shields.io/packagist/dt/wayofdev/cs-fixer-config?&style=flat-square" alt="Total Downloads"></a>
16-
<a href="https://packagist.org/packages/wayofdev/php-cs-fixer-config" target="_blank"><img src="https://img.shields.io/packagist/v/wayofdev/cs-fixer-config?&style=flat-square" alt="Latest Stable Version"></a>
17-
<a href="https://packagist.org/packages/wayofdev/php-cs-fixer-config" target="_blank"><img alt="Commits since latest release" src="https://img.shields.io/github/commits-since/wayofdev/php-cs-fixer-config/latest?style=flat-square"></a>
18-
<a href="https://packagist.org/packages/wayofdev/php-cs-fixer-config" target="_blank"><img alt="PHP Version Require" src="https://poser.pugx.org/wayofdev/cs-fixer-config/require/php?style=flat-square"></a>
19-
<a href="https://app.codecov.io/gh/wayofdev/php-cs-fixer-config" target="_blank"><img alt="Codecov" src="https://img.shields.io/codecov/c/github/wayofdev/php-cs-fixer-config?style=flat-square&logo=codecov"></a>
20-
<a href="https://dashboard.stryker-mutator.io/reports/github.com/wayofdev/php-cs-fixer-config/master" target="_blank"><img alt="Mutation testing badge" src="https://img.shields.io/endpoint?style=flat-square&label=mutation%20score&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fwayofdev%2Fphp-cs-fixer-config%2Fmaster"></a>
21-
<a href=""><img src="https://img.shields.io/badge/phpstan%20level-9%20of%209-brightgreen?style=flat-square" alt="PHP Stan Level 9 of 9"></a>
13+
<strong>Build</strong><br>
14+
<a href="https://github.com/wayofdev/php-cs-fixer-config/actions" target="_blank"><img alt="Build Status" src="https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fwayofdev%2Fphp-cs-fixer-config%2Fbadge&style=flat-square&label=github%20actions"/></a>
15+
</p>
16+
<p align="center">
17+
<strong>Project</strong><br>
18+
<a href="https://packagist.org/packages/wayofdev/cs-fixer-config" target="_blank"><img src="https://img.shields.io/packagist/dt/wayofdev/cs-fixer-config?&style=flat-square" alt="Total Downloads"></a>
19+
<a href="https://packagist.org/packages/wayofdev/cs-fixer-config" target="_blank"><img src="https://img.shields.io/packagist/v/wayofdev/cs-fixer-config?&style=flat-square" alt="Latest Stable Version"></a>
20+
<a href="https://packagist.org/packages/wayofdev/cs-fixer-config" target="_blank"><img alt="Commits since latest release" src="https://img.shields.io/github/commits-since/wayofdev/php-cs-fixer-config/latest?style=flat-square"></a>
21+
<a href="https://packagist.org/packages/wayofdev/cs-fixer-config" target="_blank"><img alt="PHP Version Require" src="https://poser.pugx.org/wayofdev/cs-fixer-config/require/php?style=flat-square"></a>
22+
</p>
23+
<p align="center">
24+
<strong>Quality</strong><br>
25+
<a href="https://app.codecov.io/gh/wayofdev/php-cs-fixer-config" target="_blank"><img alt="Codecov" src="https://img.shields.io/codecov/c/github/wayofdev/php-cs-fixer-config?style=flat-square&logo=codecov"></a>
26+
<a href="https://dashboard.stryker-mutator.io/reports/github.com/wayofdev/php-cs-fixer-config/master" target="_blank"><img alt="Mutation testing badge" src="https://img.shields.io/endpoint?style=flat-square&label=mutation%20score&url=https%3A%2F%2Fbadge-api.stryker-mutator.io%2Fgithub.com%2Fwayofdev%2Fphp-cs-fixer-config%2Fmaster"></a>
27+
<a href=""><img src="https://img.shields.io/badge/phpstan%20level-9%20of%209-brightgreen?style=flat-square" alt="PHP Stan Level 9 of 9"></a>
28+
</p>
29+
<p align="center">
30+
<strong>Community</strong><br>
31+
<a href="https://discord.gg/CE3TcCC5vr" target="_blank"><img alt="Discord" src="https://img.shields.io/discord/1228506758562058391?style=flat-square&logo=discord&labelColor=7289d9&logoColor=white&color=39456d"></a>
32+
<a href="https://x.com/intent/follow?screen_name=wayofdev" target="_blank"><img alt="Follow on Twitter (X)" src="https://img.shields.io/badge/-Follow-black?style=flat-square&logo=X"></a>
2233
</p>
2334

2435
<br>
@@ -307,23 +318,18 @@ You are more than welcome. Before contributing, kindly check our [contribution g
307318
## 🫡 Contributors
308319

309320
<p align="left">
310-
<a href="https://github.com/wayofdev/php-cs-fixer-config/graphs/contributors">
311-
<img align="left" src="https://img.shields.io/github/contributors-anon/wayofdev/php-cs-fixer-config?style=for-the-badge" alt="Contributors Badge"/>
312-
</a>
313-
</p>
314-
321+
<a href="https://github.com/wayofdev/php-cs-fixer-config/graphs/contributors">
322+
<img align="left" src="https://img.shields.io/github/contributors-anon/wayofdev/php-cs-fixer-config?style=for-the-badge" alt="Contributors Badge"/>
323+
</a>
324+
<br>
315325
<br>
326+
</p>
316327

317328
## 🌐 Social Links
318329

319330
* **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).
320331
* **Discord:** Join our community on [Discord](https://discord.gg/CE3TcCC5vr).
321332

322-
<p align="left">
323-
<a href="https://discord.gg/CE3TcCC5vr" target="_blank"><img alt="Discord Link" src="https://img.shields.io/discord/1228506758562058391?style=for-the-badge&logo=discord&labelColor=7289d9&logoColor=white&color=39456d"></a>
324-
<a href="https://x.com/intent/follow?screen_name=wayofdev" target="_blank"><img alt="Follow on Twitter (X)" src="https://img.shields.io/badge/-Follow-black?style=for-the-badge&logo=X"></a>
325-
</p>
326-
327333
<br>
328334

329335
## 🧱 Resources

composer.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "wayofdev/cs-fixer-config",
3-
"description": "Package adds custom rule-sets to php-cs-fixer",
3+
"description": "🧹 Adds custom rule-sets to PHP CS Fixer for consistent coding standards.",
44
"license": "MIT",
55
"type": "library",
66
"keywords": [
@@ -23,7 +23,8 @@
2323
"homepage": "https://wayof.dev",
2424
"support": {
2525
"issues": "https://github.com/wayofdev/php-cs-fixer-config/issues",
26-
"source": "https://github.com/wayofdev/php-cs-fixer-config"
26+
"source": "https://github.com/wayofdev/php-cs-fixer-config",
27+
"security": "https://github.com/wayofdev/php-cs-fixer-config/blob/master/.github/SECURITY.md"
2728
},
2829
"require": {
2930
"php": "^8.1",
@@ -38,19 +39,21 @@
3839
"phpstan/phpstan-phpunit": "^1.4",
3940
"phpstan/phpstan-strict-rules": "^1.6",
4041
"phpunit/phpunit": "^10.5",
41-
"psalm/plugin-phpunit": "~0.19.0",
42+
"psalm/plugin-phpunit": "^0.19",
4243
"rector/rector": "^1.1",
4344
"roave/infection-static-analysis-plugin": "^1.35",
44-
"vimeo/psalm": "^5.23.1"
45+
"vimeo/psalm": "^5.24"
4546
},
47+
"minimum-stability": "dev",
48+
"prefer-stable": true,
4649
"autoload": {
4750
"psr-4": {
4851
"WayOfDev\\PhpCsFixer\\Config\\": "src/"
4952
}
5053
},
5154
"autoload-dev": {
5255
"psr-4": {
53-
"WayOfDev\\Tests\\": "tests/"
56+
"WayOfDev\\Tests\\": "tests/src/"
5457
}
5558
},
5659
"config": {

composer.lock

Lines changed: 15 additions & 15 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pest.xml.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
</extensions>
1616
<testsuites>
1717
<testsuite name="Arch Tests">
18-
<directory>tests/Arch</directory>
18+
<directory>tests/src/Arch</directory>
1919
</testsuite>
2020
</testsuites>
2121
<source>

phpstan.neon.dist

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,5 @@ parameters:
88
- tests/
99
- .php-cs-fixer.dist.php
1010
excludePaths:
11-
- tests/Arch
11+
- tests/src/Arch
1212
tmpDir: .build/phpstan/

phpunit.xml.dist

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phpunit xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xsi:noNamespaceSchemaLocation="./vendor/phpunit/phpunit/phpunit.xsd"
3+
xsi:noNamespaceSchemaLocation="vendor/phpunit/phpunit/phpunit.xsd"
44
bootstrap="vendor/autoload.php"
55
colors="true"
66
cacheResultFile=".build/phpunit/result.cache"
@@ -15,7 +15,7 @@
1515
</extensions>
1616
<testsuites>
1717
<testsuite name="Unit Tests">
18-
<directory>tests/Unit</directory>
18+
<directory>tests/src/Unit</directory>
1919
</testsuite>
2020
</testsuites>
2121
<coverage>

psalm-baseline.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<code><![CDATA[ExtendedPERSet]]></code>
66
</UnusedClass>
77
</file>
8-
<file src="tests/Unit/ConfigBuilderTest.php">
8+
<file src="tests/src/Unit/ConfigBuilderTest.php">
99
<InvalidOperand>
1010
<code><![CDATA[$finder]]></code>
1111
<code><![CDATA[$this->builder->getConfig()->getFinder()]]></code>
@@ -27,7 +27,7 @@
2727
<code><![CDATA[invalidMethod]]></code>
2828
</UndefinedMagicMethod>
2929
</file>
30-
<file src="tests/Unit/RuleSets/DefaultSetTest.php">
30+
<file src="tests/src/Unit/RuleSets/DefaultSetTest.php">
3131
<PossiblyUnusedMethod>
3232
<code><![CDATA[it_allows_risky_rules]]></code>
3333
<code><![CDATA[it_merges_custom_rules_with_default_rules]]></code>

psalm.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,11 @@
1717

1818
<projectFiles>
1919
<directory name="src/"/>
20-
<directory name="tests/"/>
20+
<directory name="tests/src/"/>
2121
<ignoreFiles>
22-
<directory name="tests/Arch"/>
22+
<directory name="tests/src/Arch/"/>
2323
</ignoreFiles>
2424
<file name=".php-cs-fixer.dist.php"/>
25+
<file name="rector.php"/>
2526
</projectFiles>
2627
</psalm>
File renamed without changes.

tests/Unit/ConfigBuilderTest.php renamed to tests/src/Unit/ConfigBuilderTest.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,16 +62,16 @@ public function it_has_no_directories_by_default(): void
6262
public function it_adds_directories(): void
6363
{
6464
$finder = $this->builder
65-
->inDir(__DIR__ . '/../../src')
66-
->inDir(__DIR__ . '/../../tests')
65+
->inDir(__DIR__ . '/../../../src')
66+
->inDir(__DIR__ . '/../../../tests/src')
6767
->getConfig()
6868
->getFinder()
6969
;
7070

7171
$items = $this->finderToArray($finder);
7272

7373
self::assertContains(__FILE__, $items);
74-
self::assertContains(realpath(__DIR__ . '/../../src/ConfigBuilder.php'), $items);
74+
self::assertContains(realpath(__DIR__ . '/../../../src/ConfigBuilder.php'), $items);
7575
}
7676

7777
#[Test]
@@ -123,15 +123,15 @@ public function it_overrides_default_rules(): void
123123
public function it_excludes_directories(): void
124124
{
125125
$finder = $this->builder
126-
->exclude([__DIR__ . '/../../src/RuleSets'])
127-
->inDir(__DIR__ . '/../../src')
126+
->exclude([__DIR__ . '/../../../src/RuleSets'])
127+
->inDir(__DIR__ . '/../../../src')
128128
->getConfig()
129129
->getFinder()
130130
;
131131

132132
$items = $this->finderToArray($finder);
133133

134-
self::assertNotContains(__DIR__ . '/../../src/RuleSets/DefaultSet.php', $items);
134+
self::assertNotContains(__DIR__ . '/../../../src/RuleSets/DefaultSet.php', $items);
135135
}
136136

137137
#[Test]

0 commit comments

Comments
 (0)