Skip to content

Deprecations break rector #9859

Description

@bobvandevijver

Bug Report

Having a deprecated rule configured results in a failure (exit code 1), instead of the documented "it only prints a message".

Subject Details
Rector version 2.6.3
 [ERROR] Could not process                                                      
         "/builds/8bAKuozDA/0/idb/idb/src/Idb/AdminGeneratorBundle/Form/Type/Adm
         inLottery/Options.php" file, due to:                                   
         "System error:                                                         
         ""Rector\Transform\Rector\Class_\AddInterfaceByTraitRector" rule is    
         deprecated, as too niche; use a custom rule scoped to your own trait   
         and interface pair instead"                                            
         Run Rector with "--debug" option and post the report here: https://github.com/rectorphp/rector/issues/new". On line:
         47
 [WARNING] Registered rule "Rector\Transform\Rector\Class_\AddInterfaceByTraitRector" is deprecated and will be removed.
           Upgrade your config to use another rule or remove it

Minimal PHP Code Causing Issue

Use the AddInterfaceByTraitRector rector.

Expected Behaviour

Rector should not end with exit code 1.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions