Skip to content

Commit 9d5757f

Browse files
authored
Merge pull request #291 from wayofdev/docs/updates
2 parents f7e848f + e7a0ab1 commit 9d5757f

33 files changed

+511
-183
lines changed

.gitattributes

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,15 @@
99
.gitignore export-ignore
1010
.php-cs-fixer.dist.php export-ignore
1111
.pre-commit-config.yaml export-ignore
12-
.yamllint.yaml export-ignore
1312
composer.lock export-ignore
1413
composer-require-checker.json export-ignore
1514
docker-compose.yaml export-ignore
1615
infection.json.dist export-ignore
1716
Makefile export-ignore
17+
pest.xml.dist export-ignore
1818
phpstan.neon.dist export-ignore
1919
phpstan-baseline.neon export-ignore
2020
phpunit.xml.dist export-ignore
2121
psalm.xml export-ignore
2222
psalm-baseline.xml export-ignore
23-
renovate.json export-ignore
2423
rector.php export-ignore
File renamed without changes.
File renamed without changes.

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
2+
3+
* @lotyp

.github/ISSUE_TEMPLATE.md

Lines changed: 0 additions & 13 deletions
This file was deleted.

.github/SECURITY.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,6 @@ Thank you for helping keep `wayofdev/php-cs-fixer-config` and its users safe. We
44

55
<br>
66

7-
## 🙋‍♂️ Supported Versions
8-
9-
Only certain versions of `wayofdev/php-cs-fixer-config` are currently being maintained with security updates. Please use or upgrade to one of these supported versions:
10-
11-
| Version | Supported |
12-
|---------|--------------------|
13-
| ^1.3 | :white_check_mark: |
14-
15-
Please ensure that you are using one of these supported versions before reporting a security issue.
16-
17-
<br>
18-
197
## 🚨 Reporting a Vulnerability
208

219
We take all security bugs in `wayofdev/php-cs-fixer-config` seriously. Please follow the instructions below to report security vulnerabilities.

.github/assets/.gitkeep

Whitespace-only changes.

.github/labeler.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
"type: documentation":
1313
- changed-files:
14-
- any-glob-to-any-file: ['assets/**/*', '.github/*', './*.md']
14+
- any-glob-to-any-file: ['.github/*', './*.md']
1515

1616
"type: maintenance":
1717
- changed-files:
File renamed without changes.

.github/workflows/auto-merge-release.yml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
on: # yamllint disable-line rule:truthy
66
pull_request:
7+
branches:
8+
- master
79

810
permissions:
911
pull-requests: write
@@ -13,15 +15,14 @@ name: 🤞 Auto merge release
1315

1416
jobs:
1517
auto-merge:
16-
if: github.actor == 'lotyp' && startsWith(github.head_ref, 'release-please--')
17-
runs-on: ubuntu-latest
18-
steps:
19-
- name: 🤞 Auto-merge pull request
20-
uses: peter-evans/enable-pull-request-automerge@v3
21-
with:
22-
pull-request-number: ${{ github.event.pull_request.number }}
23-
merge-method: merge
24-
# to trigger other workflows, pass PAT token instead of GITHUB_TOKEN
25-
token: ${{ secrets.GITHUB_TOKEN }}
18+
uses: wayofdev/gh-actions/.github/workflows/auto-merge-release.yml@v3.1.0
19+
with:
20+
os: ubuntu-latest
21+
pull-request-number: ${{ github.event.pull_request.number }}
22+
actor: lotyp
23+
merge-method: merge
24+
secrets:
25+
# to trigger other workflows, pass PAT token instead of GITHUB_TOKEN
26+
token: ${{ secrets.PERSONAL_GITHUB_TOKEN }}
2627

2728
...

.github/workflows/coding-standards.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
with:
2727
configFile: ${{ github.workspace }}/.github/.commitlint.config.mjs
2828
failOnWarnings: false
29-
failOnErrors: false
29+
failOnErrors: true
3030
helpURL: 'https://github.com/conventional-changelog/commitlint/#what-is-commitlint'
3131

3232
yaml-linting:
@@ -42,7 +42,7 @@ jobs:
4242
- name: 🧐 Lint YAML files
4343
uses: ibiqlik/action-yamllint@v3.1.1
4444
with:
45-
config_file: .yamllint.yaml
45+
config_file: .github/.yamllint.yaml
4646
file_or_dir: '.'
4747
strict: true
4848

@@ -59,6 +59,7 @@ jobs:
5959
- name: 🧐 Lint Markdown files
6060
uses: DavidAnson/markdownlint-cli2-action@v16.0.0
6161
with:
62+
config: '.github/.markdownlint.json'
6263
globs: |
6364
**/*.md
6465
!CHANGELOG.md

.github/workflows/dependency-analysis.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
11
---
22

3-
name: 🔐 Dependency analysis
4-
53
on: # yamllint disable-line rule:truthy
64
pull_request:
75
paths:
86
- 'src/**'
97
- 'tests/**'
108
- '.php-cs-fixer.dist.php'
11-
- 'composer.json'
12-
- 'composer.lock'
9+
- 'composer.*'
1310
push:
1411
paths:
1512
- 'src/**'
1613
- 'tests/**'
1714
- '.php-cs-fixer.dist.php'
18-
- 'composer.json'
19-
- 'composer.lock'
15+
- 'composer.*'
16+
17+
name: 🔐 Dependency analysis
2018

2119
jobs:
2220
dependency-analysis:

.github/workflows/security-analysis.yml

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

3-
name: 🔐 Security analysis
4-
53
on: # yamllint disable-line rule:truthy
64
pull_request:
5+
branches:
6+
- master
77
push:
8+
branches:
9+
- master
10+
11+
name: 🔐 Security analysis
812

913
jobs:
1014
security-analysis:

.github/workflows/shellcheck.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22

33
on: # yamllint disable-line rule:truthy
44
pull_request:
5+
branches:
6+
- master
57

68
name: 🐞 Differential shell-check
79

.github/workflows/static-analysis.yml

Lines changed: 59 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,28 +5,32 @@ on: # yamllint disable-line rule:truthy
55
branches:
66
- master
77
paths:
8+
- 'phpstan*'
9+
- 'psalm*'
10+
- 'composer.*'
811
- 'src/**'
912
- 'tests/**'
10-
- 'bin/trap'
1113
- '.php-cs-fixer.dist.php'
1214
pull_request:
1315
branches:
1416
- master
1517
paths:
18+
- 'phpstan*'
19+
- 'psalm*'
20+
- 'composer.*'
1621
- 'src/**'
1722
- 'tests/**'
18-
- 'bin/trap'
1923
- '.php-cs-fixer.dist.php'
2024

2125
name: 🔍 Static analysis
2226

2327
jobs:
24-
static-analysis:
28+
phpstan:
2529
timeout-minutes: 4
2630
runs-on: ${{ matrix.os }}
2731
concurrency:
2832
cancel-in-progress: true
29-
group: static-analysis-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
33+
group: phpstan-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
3034
strategy:
3135
fail-fast: true
3236
matrix:
@@ -71,3 +75,54 @@ jobs:
7175

7276
- name: 🔍 Run static analysis using phpstan/phpstan
7377
run: composer stan:ci
78+
79+
psalm:
80+
timeout-minutes: 4
81+
runs-on: ${{ matrix.os }}
82+
concurrency:
83+
cancel-in-progress: true
84+
group: psalm-${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
85+
strategy:
86+
fail-fast: true
87+
matrix:
88+
os:
89+
- ubuntu-latest
90+
php-version:
91+
- '8.1'
92+
dependencies:
93+
- locked
94+
steps:
95+
- name: 📦 Check out the codebase
96+
uses: actions/checkout@v4.1.6
97+
98+
- name: 🛠️ Setup PHP
99+
uses: shivammathur/setup-php@2.30.4
100+
with:
101+
php-version: ${{ matrix.php-version }}
102+
extensions: none, ctype, curl, dom, json, mbstring, phar, simplexml, tokenizer, xml, xmlwriter, opcache, pcntl, posix
103+
ini-values: error_reporting=E_ALL
104+
coverage: xdebug
105+
106+
- name: 🛠️ Setup problem matchers
107+
run: echo "::add-matcher::${{ runner.tool_cache }}/php.json"
108+
109+
- name: 🤖 Validate composer.json and composer.lock
110+
run: composer validate --ansi --strict
111+
112+
- name: 🔍 Get composer cache directory
113+
uses: wayofdev/gh-actions/actions/composer/get-cache-directory@v3.1.0
114+
115+
- name: ♻️ Restore cached dependencies installed with composer
116+
uses: actions/cache@v4.0.2
117+
with:
118+
path: ${{ env.COMPOSER_CACHE_DIR }}
119+
key: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-${{ hashFiles('composer.lock') }}
120+
restore-keys: php-${{ matrix.php-version }}-composer-${{ matrix.dependencies }}-
121+
122+
- name: 📥 Install "${{ matrix.dependencies }}" dependencies
123+
uses: wayofdev/gh-actions/actions/composer/install@v3.1.0
124+
with:
125+
dependencies: ${{ matrix.dependencies }}
126+
127+
- name: 🔍 Run static analysis using vimeo/psalm
128+
run: composer psalm:ci

.phive/phars.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<phive xmlns="https://phar.io/phive">
33
<phar name="composer-normalize" version="^2.42.0" installed="2.42.0" location="./.phive/composer-normalize" copy="false"/>
4-
<phar name="composer-require-checker" version="^4.10.0" installed="4.10.0" location="./.phive/composer-require-checker" copy="false"/>
4+
<phar name="composer-require-checker" version="^4.11.0" installed="4.11.0" location="./.phive/composer-require-checker" copy="false"/>
55
</phive>

.pre-commit-config.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ repos:
2929
description: Run markdownlint-cli2 on your Markdown files using the docker image
3030
language: docker_image
3131
types: [markdown]
32-
entry: davidanson/markdownlint-cli2-rules:latest
32+
entry: 'davidanson/markdownlint-cli2-rules:latest'
33+
args: ['--config', '.github/.markdownlint.json']
3334

3435
...

Makefile

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ ENVSUBST ?= $(BUILDER) envsubst
3636
YAML_LINT_RUNNER ?= $(DOCKER) run --rm $$(tty -s && echo "-it" || echo) \
3737
-v $(PWD):/data \
3838
cytopia/yamllint:latest \
39+
-c ./.github/.yamllint.yaml \
3940
-f colored .
4041

4142
ACTION_LINT_RUNNER ?= $(DOCKER) run --rm $$(tty -s && echo "-it" || echo) \
@@ -47,7 +48,8 @@ ACTION_LINT_RUNNER ?= $(DOCKER) run --rm $$(tty -s && echo "-it" || echo) \
4748
MARKDOWN_LINT_RUNNER ?= $(DOCKER) run --rm $$(tty -s && echo "-it" || echo) \
4849
-v $(shell pwd):/app \
4950
--workdir /app \
50-
davidanson/markdownlint-cli2-rules:latest
51+
davidanson/markdownlint-cli2-rules:latest \
52+
--config ".github/.markdownlint.json"
5153

5254
PHIVE_RUNNER ?= $(DOCKER_COMPOSE) run --rm --no-deps app
5355

@@ -94,9 +96,9 @@ help: ## Show this menu
9496
@echo
9597
@echo ' 📑 Logs are stored in $(MAKE_LOGFILE)'
9698
@echo
97-
@echo ' 📦 Package php-cs-fixer-config (github.com/wayofdev/php-cs-fixer-config)'
98-
@echo ' 🤠 Makefile Author Andrij Orlenko (github.com/lotyp)'
99-
@echo ' 🏢 ${YELLOW}Org wayofdev (github.com/wayofdev)${RST}'
99+
@echo ' 📦 Package php-cs-fixer-config (https://github.com/wayofdev/php-cs-fixer-config)'
100+
@echo ' 🤠 Makefile Author Andrij Orlenko (https://github.com/lotyp)'
101+
@echo ' 🏢 ${YELLOW}Org wayofdev (https://github.com/wayofdev)${RST}'
100102
@echo
101103
.PHONY: help
102104

@@ -140,6 +142,10 @@ down: # Stops and removes containers of this project
140142
$(DOCKER_COMPOSE) down --remove-orphans --volumes
141143
.PHONY: down
142144

145+
stop: ## Stops all containers, without removing them
146+
$(DOCKER_COMPOSE) stop
147+
.PHONY: stop
148+
143149
restart: down up ## Runs down and up commands
144150
.PHONY: restart
145151

@@ -267,10 +273,17 @@ infect-ci: ## Runs infection – mutation testing framework with github output (
267273
$(APP_COMPOSER) infect:ci
268274
.PHONY: lint-infect-ci
269275

270-
test: ## Run project php-unit and pest tests
276+
test: test-unit test-arch ## Run project php-unit and pest tests
277+
.PHONY: test
278+
279+
test-unit: ## Run project php-unit tests
271280
$(APP_COMPOSER) test
272281
.PHONY: test
273282

283+
test-arch: ## Run project pest tests with architecture checks
284+
$(APP_COMPOSER) test:arch
285+
.PHONY: test-arch
286+
274287
test-cc: ## Run project php-unit and pest tests in coverage mode and build report
275288
$(APP_COMPOSER) test:cc
276289
.PHONY: test-cc

0 commit comments

Comments
 (0)