Skip to content

Allow using a canonical dist file#7845

Merged
TomasVotruba merged 1 commit intorectorphp:mainfrom
carlos-granados:add-canonical-configuration
Feb 3, 2026
Merged

Allow using a canonical dist file#7845
TomasVotruba merged 1 commit intorectorphp:mainfrom
carlos-granados:add-canonical-configuration

Conversation

@carlos-granados
Copy link
Contributor

Most code quality/testing tools allow you to have a "canonical" (dist) config file which is stored in the repository and a local config file which replaces/extends the canonical file, allowing you to have a base configuration which is shared by all users and which can be overridden locally

This PR adds this capability to Rector. Rector will load a rector.php file if it exists but will also use a rector.dist.php file if the rector.php file does not exist

Adds two new end-to-end tests that check this new functionality

@TomasVotruba
Copy link
Member

Let's ship this, thank you 👍

@TomasVotruba TomasVotruba merged commit a134f6a into rectorphp:main Feb 3, 2026
64 of 65 checks passed
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.

3 participants