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
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.md]
trim_trailing_whitespace = false
29 changes: 22 additions & 7 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
# Keep packaged tarballs (Packagist downloads) small by stripping dev-only files
/.github export-ignore
/.gitattributes export-ignore
/.gitignore export-ignore
/.php-cs-fixer.php export-ignore
/.phpstan.dist.neon export-ignore
/.rector.php export-ignore
# Keep Packagist/Composer downloads small: strip every file a consumer of the
# package never runs. `git archive` (which is what GitHub and Packagist serve)
# ignores a path that does not exist, so one canonical list works for every
# module and library.
/.claude export-ignore
/.editorconfig export-ignore
/.gitattributes export-ignore
/.github export-ignore
/.gitignore export-ignore
/.idea export-ignore
/.junie export-ignore
/.mcp.json export-ignore
/.php-cs-fixer.php export-ignore
/.phpstan.dist.baseline.neon export-ignore
/.phpstan.dist.neon export-ignore
/AGENTS.md export-ignore
/CLAUDE.md export-ignore
/composer.lock export-ignore
/phpstan-baseline.neon export-ignore
/phpunit.xml export-ignore
/rector.php export-ignore
/tests export-ignore

# Enforce LF line endings on checkout so the line-endings CI gate never fails
*.css text eol=lf
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:

- uses: shivammathur/setup-php@f3e473d116dcccaddc5834248c87452386958240 # 2.37.2
with:
php-version: '8.3'
php-version: '8.5'

- name: Install dependencies
run: composer install --no-interaction --no-progress
Expand All @@ -24,4 +24,4 @@ jobs:
run: php vendor/bin/php-cs-fixer fix --diff --dry-run

- name: Rector
run: php vendor/bin/rector -c .rector.php --dry-run
run: php vendor/bin/rector --dry-run
2 changes: 1 addition & 1 deletion .github/workflows/phpstan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:

strategy:
matrix:
php-version: ['8.3', '8.4', '8.5']
php-version: ['8.5', '8.6']

name: PHPStan (PHP ${{ matrix.php-version }})

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/syntax-php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
php-version: ['8.3', '8.4', '8.5']
php-version: ['8.5', '8.6']

name: PHP Syntax (PHP ${{ matrix.php-version }})

Expand Down
3 changes: 2 additions & 1 deletion .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@
__DIR__ . '/src',
], 'is_dir')))
// Root-level entry points (e.g. the infra tool's sync.php / config.php).
// glob skips dotfiles, so these very config files aren't included.
// glob skips dotfiles, so .php-cs-fixer.php is left out; rector.php is
// a plain name now, so it is formatted like any other file.
->append(glob(__DIR__ . '/*.php') ?: [])
->name('*.php')
->ignoreDotFiles(true)
Expand Down
4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"license": "OSL-3.0",
"type": "maho-module",
"require": {
"php": ">=8.3"
"php": ">=8.5"
},
"require-dev": {
"friendsofphp/php-cs-fixer": "*",
Expand All @@ -20,7 +20,7 @@
"mahocommerce/maho-composer-plugin": true
},
"platform": {
"php": "8.3"
"php": "8.5"
}
}
}
13 changes: 7 additions & 6 deletions .rector.php → rector.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ function gitUntrackedPaths(): array
__DIR__ . '/lib',
__DIR__ . '/public',
__DIR__ . '/src',
], 'is_dir'),
], is_dir(...)),
// Root-level entry points (e.g. the infra tool's sync.php / config.php).
// glob skips dotfiles, so this very config file isn't included.
// glob skips dotfiles, so .php-cs-fixer.php is left out; rector.php is
// a plain name now, so this config lints itself.
glob(__DIR__ . '/*.php') ?: [],
)))
// No argument: Rector reads the target PHP version from composer.json
Expand All @@ -55,10 +56,10 @@ function gitUntrackedPaths(): array
// package:
//
// - AddTypeToConst emits `const string FOO`. That is new syntax, not a
// rewrite, so a repo that declares no require.php floor (such as
// maho-composer-plugin) would ship code its own metadata never promised.
// A composer plugin also runs on the user's PHP, not on the platform the
// project resolved against.
// rewrite: it adds nothing the code needs, and it turns a floor bump into
// a hard parse error for anyone who installs with platform requirements
// ignored. A composer plugin also runs on the user's PHP, not on the
// platform the project resolved against.
// - ReadOnlyClass / ReadOnlyProperty change the contract, not the code: a
// readonly class cannot be extended by a normal child, and a readonly
// property cannot be written from one. Maho modules exist to be extended.
Expand Down
Loading