-
-
Notifications
You must be signed in to change notification settings - Fork 154
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
Fix: Remove cacheResultFile attribute from phpunit.xml #582
Conversation
9de9688
to
f7c997a
Compare
@@ -210,6 +211,11 @@ private function addRandomTestsOrderAttributesIfNotSet(string $version, \DOMXPat | |||
} | |||
} | |||
|
|||
private function removeCacheResultFileAttribute(\DOMXPath $xPath): void | |||
{ | |||
$this->removeAttribute('cacheResultFile', $xPath); |
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.
Tested it in localheinz/phpstan-rules
by removing the cacheResultFile
attribute from the corresponding phpunit.xml
, and running infection
works fine.
That is, removing the cacheResultFile
attribute suffices.
Let me know if you would prefer to remove more attributes.
@@ -210,6 +211,11 @@ private function addRandomTestsOrderAttributesIfNotSet(string $version, \DOMXPat | |||
} | |||
} | |||
|
|||
private function removeCacheResultFileAttribute(\DOMXPath $xPath): void | |||
{ |
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.
Shouldn't this be part of XmlConfigurationHelper?
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.
Thank you - give me a moment!
1aeab13
to
4e785a7
Compare
Initially, you removed But now it's inside I think it should be in both Does it make sense? :) Also, could you please target to 0.11 branch? |
b42c85e
to
7065fc2
Compare
} | ||
|
||
/** @var \DOMElement $node */ | ||
$node = $xPath->query('/phpunit')[0]; |
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.
I think this can be slightly simpler, for example see removeExistingPrinters
53d3eb1
to
40bca15
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.
👍
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.
Hm, noticed the failed build. Could you please take a look @localheinz https://travis-ci.org/infection/infection/jobs/464321590#L583?
40bca15
to
249157f
Compare
@borNfreee Forgot to adjust the test case. Pushed now! |
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.
Thank you @localheinz
Thank you, @borNfreee and @sanmai! |
Released 0.11.3 |
@borNfreee @sanmai Just realized that I now end up with a dirty index because the default |
you mean to set |
On it! |
This PR:
cacheResultFile
attribute fromphpunit.xml
Fixes #572.