Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Jan 8, 2020. It is now read-only.

Add sorting to classmap generator#4725

Closed
atodd wants to merge 3 commits into
zendframework:masterfrom
atodd:master
Closed

Add sorting to classmap generator#4725
atodd wants to merge 3 commits into
zendframework:masterfrom
atodd:master

Conversation

@atodd
Copy link
Copy Markdown
Contributor

@atodd atodd commented Jun 25, 2013

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.

@mwillbanks
Copy link
Copy Markdown
Contributor

This is actually a very good change; we commonly have this happen as well :)

@mwillbanks
Copy link
Copy Markdown
Contributor

You're missing the comment in the docblock for sorting which is above the help documentation.

Comment thread bin/classmap_generator.php Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not just reuse the $map variable and do something like:
$map = (array) $map;

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally don't like changing variable values like that, but if more people want it changed I'm happy to do it.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That makes sense.

@atodd
Copy link
Copy Markdown
Contributor Author

atodd commented Jun 25, 2013

Thanks for checking it out. I just updated the docblock.

mwillbanks pushed a commit that referenced this pull request Jun 26, 2013
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants