Rector: Assert\Choice values are removed with PHP74 set

Created on 20 Jan 2020  路  4Comments  路  Source: rectorphp/rector

| Subject | Details |
| :------------- | :----------------------------------------------------------- |
| Rector version | 0.6.11 |
| PHP version | 7.4 |
| Full Command | bin/rector process src --set php74 |

Current Behaviour

The PHP74 set is removing values from Assert\Choice() constraint annotations

     /**
-     * @var string
      *
-     * @Assert\Choice({"sales_and_management", "management_only"})
+     * @Assert\Choice
      */

Expected Behaviour

     /**
-     * @var string
      */
bug

All 4 comments

We'll need more code,not just diffs

Could you provide minimal failing code via
https://getrector.org/demo

It's fresh website, so not sure if it will work with annotation classes, but there is just way to find out :)

I'm LOVING the test page!

Thanks! :heart:

It helps us to uncover issues more easily

Awesome thanks for the speedy fix.

Was this page helpful?
0 / 5 - 0 ratings