Skip to content

[Finder] Add methods to sort by extension & size #46591

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 22, 2022
Merged

Conversation

sandoba
Copy link
Contributor

@sandoba sandoba commented Jun 6, 2022

Q A
Branch? 6.2
Bug fix? no
New feature? yes
Deprecations? no
Tickets n/a
License MIT
Doc PR todo

The Finder component had functionality to filter by extension and size but no sortBy*() methods to sort by extension or size (e.g. for a media manager in a CMS). This adds sortByExtension() + sortBySize(). Performance is the same as with e.g. sortByType() (depending on # of files/directories).

Likely requires changes to "/src/Symfony/Component/Finder/CHANGELOG.md" + https://symfony.com/doc/current/components/finder.html#sorting-results if accepted.

@carsonbot
Copy link

Hey!

I think @simPod has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@fabpot
Copy link
Member

fabpot commented Jul 22, 2022

Thank you @sandoba.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants