Lets say I've included two traits within my class and I want to order them by name.
Before:
use SerializerTrait, DispatchesJobs;
After:
use DispatchesJobs, SerializerTrait;
Don't know if this will be a problem PHP-wise? Otherwise it would make a good feature.
I think this might change the behavior of the code if 2 traits are defining a method with the same name
If two traits insert a method with the same name, isn't a fatal error produced? If the conflict is not explicitly resolved?
Yeah a fatal error is thrown so the order of the traits shouldn't have an impact.
:+1: for feature, but it also must support aliasing and resolving conflicts.
Bump
@JarJak the best way of getting this implemented is to have a crack at it yourself! If you need any pointers feel free to as in the Gitter chat
added in https://github.com/FriendsOfPHP/PHP-CS-Fixer/pull/4701 by @julienfalque :)