-
-
Notifications
You must be signed in to change notification settings - Fork 687
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 first "system level" (full-scale integration) tests #5784
Conversation
09d6bf7
to
2003a55
Compare
@TomasVotruba regarding #5775 (comment) – is this heading in the right direction? |
8ac6b94
to
2876628
Compare
I thought the problem was about Docker and mix of code version vs Docker version. But I don't see any Docker here |
Better start with 1 problem, so it's easier to review and finish. Then we can move to another. Otherwise it can be too complex to review and become stale. Then closed few weeks later. |
Ok, let's try to sort out things step by step. In this comment, you wrote:
This is what this PR is about: Let's have a minimalistic "project" or codebase that uses Symfony Console 2.8, or that uses PHP 7-specific language syntax, or that uses PHP 8-specific language syntax. And then let's run pure (unscoped) Rector on that code, using different PHP versions (7.3, 8.0, ?), to find out what happens. Do you agree so far? |
That would not work, as scoped version is also to avoid composer install conflicts. E.g. try this one: composer require symfony/console:2.8
composer require rector/rector:0.9 See https://getrector.org/blog/2020/01/20/how-to-install-rector-despite-composer-conflicts |
Seems I need to work on my explanation skills, I cannot get the point across 😔. Yes, there was room for misinterpretation and you found that weak spot... Let me try again. Yes, when you install Rector via Composer directly into your project, Composer will resolve package versions that work for both the project and for Rector. Or Composer will abort with an unresolvable conflict. So we cannot install Rector + a conflicting version e. g. of But lets look at another usage scenario where Composer resolution does not happen that way, and that's when running the Docker image. In this case, Rector in the Docker image brings along its own set of dependencies (i. e. The problem here is not due to Docker: We have the same situation if you clone the You agree so far? |
I'm not sure I see an issue. So this would not happen in Docker, but there is no Docker test in this PR. What is the point of such test that does not test a Docker then? The failing GitHub Action would tell it more clearly :) |
Let's put it this way: This PR is not about an issue, but it adds a few tests that document and guard a very important result you achieved with the static reflection PR (#5665). To better illustrate this, I have ported the tests from this PR here to the commit immediately before you merged #5665. You can see the result in this action run in my fork. They all fail, in part for different reasons.
But now, with #5665 (and I believe also #5772), this is no longer the case. All of those tests pass, here is the PHP 8 example. 🥳 So, what can we learn from all that?
(Unless, of course, you happen to know edge cases where 1. is not true? 🤞🏻) If we can agree that these points 1. – 4. are correct, then
What do you think? |
I'm sorry, I have troubles with long texts with dozens of links to understand. I'm unable to process this. Could you process the comment I made so we have the failing output in CI? |
Sorry, how impolite of me 🙈. I tried to answer your comments as briefly as possible. There is no failing test here. This PR adds a few ✅ tests for important results of your #5665. If we take the same tests, but run them just before you merged #5665, there are failures: https://github.com/mpdude/rector/actions/runs/639331588 |
Before any further review from my side, the commens above must be resolved. It does not make sense to me to give the same feedback again and drag in circles. |
7c7dfbc
to
a5aea05
Compare
@TomasVotruba I think finally understood your remarks above. System tests are now a dedicated workflow, |
8200bf8
to
054d5c1
Compare
Rebased, all checks are now ok. @TomasVotruba did I resolve your comments appropriately? |
054d5c1
to
81f3265
Compare
Thanks for simplification 👍 Now it's much clearer what is the goal of this. It seems like e2e tests - we definitely need that 👍 This repository is split-only after last weekend. The development is moving to I'll move this PR manually there and test it locally, to save your the booring work. I think you've invested already enough time and energy. Thank you for that 🙇 |
It's up and running: https://github.com/rectorphp/rector/runs/2555050237 👏 |
I'll look into way how to make them parallel in CI, so CI fails on the broken test not for all. |
rectorphp/rector-src@4c40eb6 [TypeDeclaration] Handle initialized on getter on ReturnTypeFromStrictTypedPropertyRector (#5784)
This adds three "system" level tests for problem areas I am aware of:
These tests do a full-scale integration, i. e. they will run
bin/rector
as separate processes for all fixture projects belowtests/system-tests
.tests/system-tests/run-tests.sh
is provided to run all these tests in succession.