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
[Windows] Add platform agnostic asserts #461
Conversation
8b0adb8
to
d028d34
Compare
ce6e5d4
to
94d3b1d
Compare
@staabm This is rebased version of #120 with some commits cherry-picked to There 2 things left:
Could you check those? First one has higher priority and would be easier to solve IMO. |
Btw, as an external contributor you should be able to checkout the PR like this: gh pr checkout 461 And commit right to it. I find GH CLI extermely for checking PRs from contributors and work with them quickly. |
thank you so much.
maybe we should start with testing on windows only in php8 (until we get it faster)?
I will have a look |
I only moved some bits of code. Thank you for all the effort you're putting into this. Lot of Windows users who are stuck on legacy (IMO more easily than any other OS) will benefits from your contributions 👍
We actually test only PHP 8, as that's min version before downgrade.
Thanks 👍 |
blackfire profilling reveals that the most time while running tests is spent on
|
should be fixed with the latest commit 04feea9 I can't rebase right now from this workstation, but I hope it should be green now. |
Exporting times of a phpunit run is described at https://stackoverflow.com/a/6775476 anotherway could be using speedtrap: https://phpmagazine.net/2021/02/speedtrap-detect-slow-phpunit-tests.html maybe we could also investigate in a parallel testsuite with https://theiconic.tech/how-to-reduce-your-php-tests-execution-time-up-to-85-690f70e28d41 alternatively running blackfire directly on the gh-action: https://blog.blackfire.io/github-actions-support-for-blackfire.html |
I think this PR is now mixing to many different topics at once - performance, windows in CI, failing test on Windows etc. That may lead to extreme prolonging and overcomplexity. I'd prefer go the other way around, small changes and merge early. |
The PR does not yet contain changes regarding performance. Its all about windows github actions. The comment maybe is misplaced, but I put it here as an repsonse to your initial request. Is this PR acceptable without performance improvements? |
If we don't have to wait longer for the feedback from CI than before, it's ok. |
I think we should drop the ci workflow and merge the changes, as it improves already the contribution flow for windows users. i dont have time right now to analyze the gh-win perf topic |
04feea9
to
72993e3
Compare
Thank you |
76b7591
to
d5514e4
Compare
👍 |
It seems make error in rector prefixed: https://github.com/rectorphp/rector/runs/3337580361
|
namespace Rector\Testing\PHPUnit; | ||
|
||
use Nette\Utils\FileSystem; | ||
use PHPUnit\Framework\Constraint\IsEqual; |
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.
this cause error in prefixed rector
https://github.com/rectorphp/rector/runs/3337580361#step:6:12
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 created PR #693 for it.
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.
thx @samsonasik
is this something I could have covered before merging the PR?
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.
it is fixed now, you can test scoping by run sh ./full_build.sh locally
Btw, the I could not find a quick solution, so for now, we're removing it from |
From reading rectorphp/rector#6709 I don't see how this issue relates to the trait. Could you give more details? |
You're right, it's not clear from the description. It was the first next blocker there when the reported issue was fixed. Here it's better described: Basically overriding native PHPUnit functions leads to BC breaks in case of their argument types + number changing. That's one of main reasons for composition (own methods) over extension (override). |
hey @TomasVotruba , I am just working on a similar windows-support topic in a different project. with https://github.com/staabm/phpunit-cross-os I utilized this API and added the capability to use regular if time allows I will see whether this also fits rector, without the problems mentioned in rectorphp/rector#6709 |
Merge of https://github.com/rectorphp/rector-src/pull/120/checks with vendor detection fixes