Skip to content

Move the org to PHP 8.5/8.6, rename the Rector config, share dev files - #22

Merged
fballiano merged 1 commit into
mainfrom
php-8.5-8.6-and-shared-dev-files
Sep 15, 2026
Merged

fballiano merged 1 commit into
mainfrom
php-8.5-8.6-and-shared-dev-files

Conversation

@fballiano

@fballiano fballiano commented Sep 12, 2026 •

Copy link
Copy Markdown
Contributor

PHP 8.5 / 8.6

Raises the canonical PHP policy from 8.3/8.4/8.5 to 8.5/8.6.

  • $phpCiVersions drives phpstan.yml and syntax-php.yml in every synced repo.
  • ComposerPolicy pins require.php to >=8.5 and config.platform.php to 8.5.
  • Infra's own metadata follows: require >=8.5, platform 8.5.0, PHPStan matrix ['8.5', '8.6'], lint.yml on 8.5, composer.lock refreshed.
  • The new floor lets Rector apply ForeachToArrayAnyRector in src/Config.php.

Two notes:

  • 8.6 is a nightly build (8.6.0-dev) until GA on 19 November 2026. The config.platform.php pin keeps composer install resolving against 8.5, so a nightly runner does not break dependency resolution.
  • sync.yml stays on 8.5. A production run must not use a nightly build.

.rector.php -> rector.php

Rector discovers rector.php by itself, so the -c flag is gone from the composer script and from lint.yml.

The old name was a dotfile, which glob() skipped, so the config never linted itself. It does now: hence is_dir(...) in its own path filter, and the corrected comments in both lint configs.

A replaces entry deletes the old .rector.php in the same sync PR, so no repo keeps two configs.

.gitattributes and .editorconfig

New managed files for the php-modules and php-libraries groups, both based on maho's.

The export-ignore list keeps dev-only files out of the Composer tarball. git archive ignores a listed path that a repo does not have, so one canonical list fits every repo in the groups.

This also repairs drift the rename creates: all 10 repos in the org that have a .gitattributes still export-ignore /.rector.php. Only maho had an .editorconfig.

Out of scope: non-PHP repos (zed, vscode, phpstorm, docker-images, the two websites), where a 4-space indent rule would be wrong. directory-data keeps its own .gitattributes, because that file also export-ignores its generator scripts.

Verification

composer lint passes: php-cs-fixer, Rector and PHPStan level 8 are all clean.

Two files still need a manual one-line fix, because they are in no synced group: maho/.gitattributes and directory-data/.gitattributes both still say /.rector.php.

Fixes MahoCommerce/module-template#17

Raise the canonical PHP policy from 8.3/8.4/8.5 to 8.5/8.6. The CI matrix
($phpCiVersions) drives phpstan.yml and syntax-php.yml in every synced repo,
and ComposerPolicy now pins require.php to >=8.5 with config.platform.php 8.5.
8.6 is still a nightly (8.6.0-dev) until GA on 19 November 2026; the platform
pin keeps `composer install` resolving against 8.5, so a nightly runner does
not break dependency resolution. sync.yml stays on 8.5, because a production
run must not use a nightly build.

Infra's own metadata follows: require >=8.5, platform 8.5.0, phpstan matrix
8.5/8.6, lint.yml on 8.5, composer.lock refreshed. The new floor lets Rector
apply ForeachToArrayAnyRector in src/Config.php.

Rename .rector.php to rector.php. Rector discovers that name on its own, so
the -c flag is gone from the composer script and from lint.yml. The old name
was a dotfile that glob() skipped, so the config never linted itself; it does
now, hence is_dir(...) in its own path filter and the corrected comments in
both lint configs. A `replaces` entry deletes the old .rector.php in the same
sync PR, so no repo keeps two configs.

Add .gitattributes and .editorconfig as managed files for the php-modules and
php-libraries groups. Both are based on maho's. The export-ignore list keeps
dev-only files out of the Composer tarball; git archive ignores a listed path
a repo does not have, so one canonical list fits every repo in the groups.
This also repairs the drift the rename creates: every existing .gitattributes
in the org still export-ignores /.rector.php. Non-PHP repos are out of scope,
and directory-data keeps its own .gitattributes, which export-ignores its
generator scripts too.
@fballiano
fballiano merged commit 7d311eb into main Sep 15, 2026
3 checks passed
@fballiano
fballiano deleted the php-8.5-8.6-and-shared-dev-files branch September 15, 2026 11:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant