Test hardening#22799
Conversation
|
@LamentXU123 I noticed your like and since you own Aside: since I didn't built with all extensions |
|
Is the \PHP_EOF really necessary? I think it just is silly in the tests. Just PHP_EOF should be fine. |
Nah. Picked it out of habit. No strong opinion; can adjust to whatever we decide. |
|
I actually think this change is trivial. I don't have strong opinions on this (I am on the fence of this huge code churn) so might need to wait for other's opinion. |
|
nit: any reasons for targeting 8.5? |
Sometimes not avoidable to move things forward. :) Personally, I think it adds enough value to be justified. Flipping
Nope. Could be anything. Which one you want? |
Should be targeting master. (hint: convert this to draft when you are changing the base to avoid accidentally request a review from everyone) |
Given that you mentioned code churn, I am wondering if targeting master is the right call? Like, when someone diffs 8.6 against 8.5 this would all be extra in the diff. Why not 8.5 and then upmerge to master? Madee a full run over all tests, merging it up would have only 37 merge conflicts on a total of 2424 affected files. After the upmerge a separate master targeted run would only affect 83 new files. Moderate, no? |
Test files sweep to make exception assertions more robust, and slightly unify style.
Specifically:
Target format:
Approach:
Rewrites are handled by this deterministic helper for conservative and safe, automated replacements. All exception assertion "flavours" from
php-srcwere extracted, and the tests where they were found promoted to source fixtures. Rules were then ran against the fixtures, the results manually reviewed, and promoted to target fixtures. All replacement rules are tested against the source and target fixtures. The actual "fixing" works as follows:catchblocks.run-tests.php; skipped or already failing tests are not rewritten.run-tests.php.Modules & Commits
Extensions
Zend
Changelog:
ext/intlandext/pharPoC, marked as draft for now, and in coordination with Tim
for now only applied to.ext/randomandext/uri