Add possibility to add multiple phpstan configs#4798
Add possibility to add multiple phpstan configs#4798TomasVotruba merged 4 commits intorectorphp:mainfrom
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
staabm
left a comment
There was a problem hiding this comment.
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