Repository navigation
Move the org to PHP 8.5/8.6, rename the Rector config, share dev files - #22
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
PHP 8.5 / 8.6
Raises the canonical PHP policy from
8.3/8.4/8.5to8.5/8.6.$phpCiVersionsdrivesphpstan.ymlandsyntax-php.ymlin every synced repo.ComposerPolicypinsrequire.phpto>=8.5andconfig.platform.phpto8.5.require>=8.5, platform8.5.0, PHPStan matrix['8.5', '8.6'],lint.ymlon 8.5,composer.lockrefreshed.ForeachToArrayAnyRectorinsrc/Config.php.Two notes:
8.6.0-dev) until GA on 19 November 2026. Theconfig.platform.phppin keepscomposer installresolving against 8.5, so a nightly runner does not break dependency resolution.sync.ymlstays on 8.5. A production run must not use a nightly build..rector.php->rector.phpRector discovers
rector.phpby itself, so the-cflag is gone from the composer script and fromlint.yml.The old name was a dotfile, which
glob()skipped, so the config never linted itself. It does now: henceis_dir(...)in its own path filter, and the corrected comments in both lint configs.A
replacesentry deletes the old.rector.phpin the same sync PR, so no repo keeps two configs..gitattributesand.editorconfigNew managed files for the
php-modulesandphp-librariesgroups, both based onmaho's.The
export-ignorelist keeps dev-only files out of the Composer tarball.git archiveignores 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
.gitattributesstillexport-ignore/.rector.php. Onlymahohad 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-datakeeps its own.gitattributes, because that file also export-ignores its generator scripts.Verification
composer lintpasses: 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/.gitattributesanddirectory-data/.gitattributesboth still say/.rector.php.Fixes MahoCommerce/module-template#17