Skip to content
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

Fix #15 [Breaking Change]: use same behavior of system glob #17

Conversation

thomasvargiu
Copy link

@thomasvargiu thomasvargiu commented Nov 22, 2020

Fix #15: Fixed operator precedence comparing flags on Glob.

Breaking change: it should be released in a next major version.

This will fix the wrong condition when comparing flags, allowing the use of system glob function when GLOB_BRACE is available (right now it will always use the fallback).
This will also fix the fallback method to use the same behaviour of the system glob function.

The fix will cause a breaking change, changing the behavior.
Right now, when GLOB_BRACE is used in flags, the behaviour is almost the same of using GLOB_BRACE | GLOB_NOSORT flags. Fallback method is fixed to correctly sort results when GLOB_NOSORT is used.

I would suggest to add a E_USER_DEPRECATED error in the current release with a warning of the future change behaviour when using GLOB_BRACE without GLOB_NOSORT.

@thomasvargiu
Copy link
Author

I noticed that the problem on different order depends on the used OS. On mac, files are not ordered alphabetically by default. BTW, the fix use the correct behaviour.

@weierophinney weierophinney added this to the 4.0.0 milestone Jun 28, 2021
@Ocramius Ocramius deleted the branch laminas:3.4.x January 21, 2022 15:07
@Ocramius Ocramius closed this Jan 21, 2022
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.

Bug on Glob evaluating GLOB_BRACE
3 participants