Skip to content

Commit c299c44

Browse files
committed
Migrates internal tooling to Mago
1 parent 4b565f6 commit c299c44

File tree

3 files changed

+25
-3
lines changed

3 files changed

+25
-3
lines changed

.gitattributes

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ example/ export-ignore
1818
LICENSE.md export-ignore
1919
llms.txt export-ignore
2020
lpv-logo.png export-ignore
21+
mago.toml export-ignore
2122
peck.json export-ignore
2223
phpstan.neon.dist export-ignore
2324
phpunit.xml.dist export-ignore

composer.json

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
"scripts": {
4545
"lpv:test": "phpunit",
4646
"lpv:test-with-coverage": "export XDEBUG_MODE=coverage && phpunit --coverage-html coverage-reports",
47-
"lpv:cs-fix": "php-cs-fixer --allow-risky=yes fix . -vv || true",
48-
"lpv:cs-lint": "php-cs-fixer fix --diff --stop-on-violation --verbose --dry-run --allow-risky=yes",
47+
"lpv:cs-fix": "mago fix",
48+
"lpv:cs-lint": "mago lint",
4949
"lpv:configure-commit-template": "git config --add commit.template .gitmessage",
5050
"lpv:application-version-guard": "php bin/application-version --verify-tag-match=bin",
5151
"lpv:application-phar-version-guard": "php bin/application-version --verify-tag-match=phar",
@@ -65,9 +65,13 @@
6565
"config": {
6666
"preferred-install": "dist",
6767
"sort-packages": true,
68-
"optimize-autoloader": true
68+
"optimize-autoloader": true,
69+
"allow-plugins": {
70+
"carthage-software/mago": true
71+
}
6972
},
7073
"require-dev": {
74+
"carthage-software/mago": "^0.26.1",
7175
"friendsofphp/php-cs-fixer": "^3.70.1",
7276
"mockery/mockery": "^1.0",
7377
"peckphp/peck": "^0.1.2",

mago.toml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Mago configuration file
2+
# For more information, see https://mago.carthage.software/#/getting-started/configuration
3+
php_version = "8.1.0"
4+
5+
[source]
6+
paths = ["src/", "tests/"]
7+
includes = ["vendor"]
8+
excludes = []
9+
10+
[format]
11+
print_width = 120
12+
tab_width = 4
13+
use_tabs = false
14+
15+
[linter]
16+
default_plugins = true
17+
plugins = ["symfony", "php-unit"]

0 commit comments

Comments
 (0)