PHP-CS-Fixer / PHP-CS-Fixer

A tool to automatically fix PHP Coding Standards issues
https://cs.symfony.com
MIT License
12.67k stars 1.57k forks source link

feat(GroupImportFixer): Ability to configure which type of imports should be grouped #8046

Closed Wirone closed 1 month ago

Wirone commented 1 month ago

Fixes #7220

Some existing test cases were changed because after changing the imports manipulation approach (each type separately) the final order of imports have changed (also because I've changed how $insertIndex is determined, as it's safer to insert group import where first removed import was, not the last - see the test case with \DontTouch::me()). I think it does not matter, as this fixer is not about the ordering, but about grouping.

coveralls commented 1 month ago

Coverage Status

coverage: 95.635% (-0.02%) from 95.653% when pulling 76d1377a22548790117c7477f1c05a47f58bdc35 on Wirone:codito/7220-configurable-import-groupping into 6cad43de7f0b8b801f709754107021b0fccf7a00 on PHP-CS-Fixer:master.