Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rollback RectorConfig::configure()->withRules() on config/set/privatization.php config set to old style config #5560

Merged
merged 1 commit into from
Feb 5, 2024

Conversation

samsonasik
Copy link
Member

@samsonasik samsonasik commented Feb 5, 2024

@jlherren @TomasVotruba this is a quick fix to fix rectorphp/rector#8461

the existing RectorConfig is overriden when RectorConfig::configure() is not called in the root config, using this config:

use Rector\Config\RectorConfig;
use Rector\Set\ValueObject\SetList;

return static function (RectorConfig $config): void {
    $config->paths([__DIR__ . '/src']);
    // The following seems to overwrite the paths.  Swapping the two lines makes it work again.
    $config->sets([SetList::PRIVATIZATION]);
};

cause error:

 [ERROR] The given paths do not match any files

this patch resolve it.

@samsonasik samsonasik enabled auto-merge (squash) February 5, 2024 09:57
@samsonasik samsonasik merged commit c0079e3 into main Feb 5, 2024
41 checks passed
@samsonasik samsonasik deleted the fix-rector-config-configure branch February 5, 2024 09:57
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.

SetList::PRIVATIZATION overwrites the previously configured paths
1 participant