Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Config] Fix files sorting in GlobResource#43591

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:4.4fromlyrixx:config-glob-bug
Oct 19, 2021

Conversation

@lyrixx
Copy link
Member

@lyrixxlyrixx commentedOct 19, 2021
edited
Loading

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
Tickets
LicenseMIT
Doc PR

It should be on path and not on info

and it's a big perf boost:https://blackfire.io/profiles/compare/27f409a5-73c7-4285-9b58-e631abbdb325/graph

image

kissifrot and drupol reacted with thumbs up emojiwelcoMattic, kissifrot, bastnic, xorik, Nek-, and yceruto reacted with rocket emoji
@fabpot
Copy link
Member

That's a behavior change, so should be on 5.4.

\RecursiveIteratorIterator::LEAVES_ONLY
));
uasort($files,'strnatcmp');
uksort($files,'strnatcmp');

Choose a reason for hiding this comment

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

that's a bug to me: sorting was supposed to happen on keys, not on values

Copy link
Member

Choose a reason for hiding this comment

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

I get it, but it's been like that for years.

@stof
Copy link
Member

@fabpot I don't think it changes the behavior. casting the SplFileInfo to string (when passing the value tostrnatcmp) produces the same value than the key in the array (but slower). So the behavior should still be the same (and the proof is the fact that tests have not required changes).

For the initial sort, this is an optimisation to try to have an array that is already partially sorted when merging the arrays of different paths. Usingnatsort there is also a bugfix making the optimization actually work (by using the same sorting than in the final array)

@fabpot
Copy link
Member

Thank you@lyrixx.

@fabpotfabpot merged commit4218aa3 intosymfony:4.4Oct 19, 2021
@lyrixxlyrixx deleted the config-glob-bug branchOctober 19, 2021 15:35
This was referencedOct 29, 2021
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

@nicolas-grekasnicolas-grekasnicolas-grekas approved these changes

@stofstofstof approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

6 participants

@lyrixx@fabpot@stof@nicolas-grekas@javiereguiluz@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp