Add sorting to classmap generator#4725
Conversation
|
This is actually a very good change; we commonly have this happen as well :) |
|
You're missing the comment in the docblock for sorting which is above the help documentation. |
There was a problem hiding this comment.
Why not just reuse the $map variable and do something like:
$map = (array) $map;
There was a problem hiding this comment.
I personally don't like changing variable values like that, but if more people want it changed I'm happy to do it.
There was a problem hiding this comment.
The only reason I prefer it is that you did not change the data but changed the type. In that case there is really no reason to hold onto a copy of the original type especially considering it is not leveraged again.
|
Thanks for checking it out. I just updated the docblock. |
This change adds an option to bin/classmap_generator.php to alphabetically sort the classmap list. This may seem unnecessary, but it has fixed several headaches for the group I work with. Every time a developer runs the script to build the classmap files, it builds a list in a different order. In many cases this would cause a conflict when an remote branch was merged locally. Even though conflicts are still possible with sorting, they are more manageable.