Skip to content
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

We need your help with testing Rector 0.9 #4913

Closed
TomasVotruba opened this issue Dec 17, 2020 · 9 comments
Closed

We need your help with testing Rector 0.9 #4913

TomasVotruba opened this issue Dec 17, 2020 · 9 comments

Comments

@TomasVotruba
Copy link
Member

TomasVotruba commented Dec 17, 2020

We're working hard last month on next release of Rector - 0.9.
First we waited for PHP 8.0, Symfony 5.2 and Symplify 9 to be released. We tested many PHP 8 rules for edge cases, so we could fix those and give you the final version.

How to Test Rector 0.9?

We want to let it out this week and we need your help with testing:

 {
     "require-dev": {
-        "rector/rector": "^0.8"
+        "rector/rector": "dev-master"
     }
 }

The more feedback we have on Rector 0.9, the sooner we can release it.


How to Upgrade?

Know changes between 0.8 and 0.9 are mentioned here: https://github.com/rectorphp/rector/blob/master/UPGRADE_09.md

Is something missing? Please create and issues, or if you want to help up, change the file and send us a PR.

@HDVinnie
Copy link
Contributor

On dev-master I'm still facing

 [ERROR] Could not process "app/Models/Type.php" file, due to:                                                          
         "_HumbugBox39a196d4601e\Roave\BetterReflection\Reflection\ReflectionClass "Carbon\Traits\Localization" could   
         not be found in the located source". 

Which is already logged here: #4406

I am indeed testing on a Laravel project. Will report more as I go through testing all the rule sets.

@lulco
Copy link
Contributor

lulco commented Dec 17, 2020

I have problems with apps where symfony 4.2 packages (especially symfony/config I think) are used as dependencies so I am waiting for prefixed version to test it

@stephanvierkant
Copy link
Contributor

Great work!

I'll take a closer look later on, but here are some things I've found so far:

Rector\SOLID\Rector\Variable\MoveVariableDeclarationNearReferenceRector has some 'false positives' in my test suite when using static methods:

$crawler = $kernelBrowser->request('GET', '/');
self::assertResponseIsSuccessful();
self::assertStringContainsString('Hello World', $crawler->filter('h1, h2, h3')->text());

Rector wants to move the first line to the second, but that breaks self::assertResponseIsSuccessful();. These static methods reminds me of the time I was using Wordpress, with all those terrible superglobals. But well, that's how phpunit works here.

And I get an Segmentation fault (core dumped) message, but no idea how to debug this.

@stephanvierkant
Copy link
Contributor

Thanks @samsonasik!

The only problem I have is a Segmentation fault on one method. I'll try to create a reproducible example.

@HDVinnie
Copy link
Contributor

On dev-master I'm still facing

 [ERROR] Could not process "app/Models/Type.php" file, due to:                                                          
         "_HumbugBox39a196d4601e\Roave\BetterReflection\Reflection\ReflectionClass "Carbon\Traits\Localization" could   
         not be found in the located source". 

Which is already logged here: #4406

I am indeed testing on a Laravel project. Will report more as I go through testing all the rule sets.

This appears to be fixed on Rector dev-master@8a64821

@TomasVotruba
Copy link
Member Author

@stephanvierkant Hi, thank you for looking into this.
Next step would be getting a failing demo link: https://getrector.org/demo

@TomasVotruba
Copy link
Member Author

TomasVotruba commented Dec 25, 2020

@lulco @HDVinnie

Good news! 🥳 The prefixed version is now passing on simple tests:

image


Could you give it more propper 💪 battle testing?
https://github.com/rectorphp/rector-prefixed

@TomasVotruba
Copy link
Member Author

It's out now! 👏 Thank you for testing and feedback ❤️

image

https://getrector.org/blog/2020/12/28/rector-09-released



(For any further issues, please make a new ones.)

@stephanvierkant
Copy link
Contributor

Thanks for this new version! I really like the new config.

The Segmentation fault magically disappeared.

@samsonasik samsonasik unpinned this issue Dec 29, 2020
TomasVotruba added a commit that referenced this issue Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants