-
-
Notifications
You must be signed in to change notification settings - Fork 365
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
Add possibility to add multiple phpstan configs #4798
Add possibility to add multiple phpstan configs #4798
Conversation
would be great to have both available imo, that's like |
@samsonasik Okay then we need to discuss the defaults of the following: Case A: Using $rectorConfig->phpstanConfigs(['some-test.neon']) Should the current default Case B: Using $rectorConfig->phpstanConfig('some-test.neon');
$rectorConfig->phpstanConfigs(['some-test.neon']); Does Case C: Using $rectorConfig->phpstanConfigs(['some-test.neon']);
$rectorConfig->phpstanConfig('some-test.neon'); Does Case D: Multiple $rectorConfig->phpstanConfigs(['some-test.neon']);
$rectorConfig->phpstanConfigs(['some-other.neon']); Does it replace or not load both? Case E: Multiple $rectorConfig->phpstanConfig('some-test.neon');
$rectorConfig->phpstanConfig('some-other.neon'); Does it replace or not load both? |
I think the config should merge like when we define: $rectorConfig->rule(FirstRector::class);
$rectorConfig->rules([
SecondRector::class,
ThirdRector::class,
]); The result of rules are 3. |
@samsonasik what I'm currently not understand how currently the fallback to |
adcedd9
to
788ae23
Compare
Or is this comment here: rector-src/packages/Config/RectorConfig.php Line 137 in e7f5510
|
That seems no longer true afaik |
788ae23
to
c915c41
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me 👍
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could it be covered by a test?
@alexander-schranz Thank you 👍 |
@TomasVotruba do you see any chance that we can get a Rector release with this fix in the near future? |
@bloep Sure, I'm on it :) |
I have just realized the container switch might be a BC break for anyone using Symfony internals (though they should not) 🤦 So I changed replaced the tag to a minor version jump, just to be sure: Use the Rector 0.18.0 tag instead. My appologies for confusion 🙏 |
Closes rectorphp/rector#8141