Rector: Wrong parameter removal

Created on 13 Dec 2020  路  4Comments  路  Source: rectorphp/rector

Bug Report

| Subject | Details |
| :------------- | :---------------------------------------------------------------|
| Installed as | docker |

See example

Minimal PHP Code Causing Issue

https://getrector.org/demo/ffa79f68-01fb-4f5c-a236-670249234720#demo_result

Expected Behaviour

do not remove parameter $io

bug

All 4 comments

Hi,

thanks for reporting. That should not happen.

We need a failing test case to be added into RemoveUnusedParameterRectorTest

@calvera that's because the parameter class SymfonyStyle is not loaded. It may because it not defined in use statement or not defined before, see https://getrector.org/demo/0fab175f-1fde-4fa9-9555-d58a42b157e9#demo_result that working ok.

I am closing it.

@calvera Still, we need a failing test case as I linked

Was this page helpful?
0 / 5 - 0 ratings