Skip to content

Fixed file sorting#5

Merged
coolamit merged 2 commits into
masterfrom
feature/fix-file-sorting
May 7, 2026
Merged

Fixed file sorting#5
coolamit merged 2 commits into
masterfrom
feature/fix-file-sorting

Conversation

@coolamit
Copy link
Copy Markdown
Owner

@coolamit coolamit commented May 7, 2026

This pull request improves the ordering of folders and files in the rendered output, ensuring that both folders and files are always sorted alphabetically. It also adds new unit tests to verify this behavior.

Ordering improvements:

  • Updated the flattenTree and renderTree methods in TemplateRenderer.php to sort folders and files alphabetically using ksort before rendering or flattening the tree structure. [1] [2]

Testing enhancements:

  • Added two new tests in TemplateRendererTest.php to confirm that folders and files are sorted alphabetically in the rendered output, both across subfolders and within the same folder.

@coolamit coolamit merged commit d380c5e into master May 7, 2026
15 checks passed
@coolamit coolamit deleted the feature/fix-file-sorting branch May 7, 2026 10:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant