rectorphp / rector-phpunit

Rector upgrade rules for PHPUnit
http://getrector.com
MIT License
61 stars 46 forks source link

Feature/256 Transform assertEquals/assertSame in assertEqualsWithDelta when float is expected #257

Closed eerison closed 10 months ago

eerison commented 10 months ago

I did't change this rule, because it's fixing a specific deprecation for phpunit, that assertEquals does not accept delta argument, for the new versions.

Then I prefer to create a new rule.

Close #256

TomasVotruba commented 10 months ago

This looks good, thank you :+1:

I've just triggered the CI to see the tests.

TomasVotruba commented 10 months ago

Could you fix the PHPStan errors?

eerison commented 10 months ago

Yep, I'm on that ;)

eerison commented 10 months ago

finally 😄

TomasVotruba commented 10 months ago

Thank you, this looks great 😃

eerison commented 10 months ago

Hey @TomasVotruba

is there anyway to use dev-main ?

because when I run

composer req --dev rector/rector-phpunit:dev-main

I got this

Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Root composer.json requires rector/rector-phpunit dev-main -> satisfiable by rector/rector-phpunit[dev-main].
    - rector/rector-phpunit dev-main requires php >=8.1 -> your php version (7.4; overridden via config.platform, actual: 7.4.33) does not satisfy that requirement.

and it is not in my dependencies 😮

/app $ composer info rector/*
rector/rector 0.18.3 Instant Upgrade and Automated Refactoring of any PHP code
samsonasik commented 10 months ago

rector-phpunit is inside rector/rector in prefixed vendor

https://github.com/rectorphp/rector/tree/main/vendor/rector/rector-phpunit

You can test with:

composer require --dev rector/rector:dev-main
eerison commented 10 months ago

rector-phpunit is inside rector/rector in prefixed vendor

https://github.com/rectorphp/rector/tree/main/vendor/rector/rector-phpunit

You can test with:

composer require --dev rector/rector:dev-main

Thank you @samsonasik for the info, I will do that :)