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

Appearance settings

GLOB_BRACE is not defined on all platforms #7477

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 2 commits into from
Jul 18, 2018
Merged

GLOB_BRACE is not defined on all platforms #7477

merged 2 commits into from
Jul 18, 2018

Conversation

staabm
Copy link
Contributor

@staabm staabm commented Jul 18, 2018

Should address #7444 (comment)

@stof
Copy link
Contributor

stof commented Jul 18, 2018

should we also detect the usage of braces in the glob, and fail loudly if trying to use such path repository on a platform not supporting it ?

@alcohol
Copy link
Member

alcohol commented Jul 18, 2018

I think what @stof suggests makes sense and would be a nice addition. Can you take that into account in this PR @staabm or should I just merge this and leave that open for someone else to pick up?

@staabm
Copy link
Contributor Author

staabm commented Jul 18, 2018

Not sure we can detect the braces, as the regex could also contain e.g. abc{1,3} couldnt it?

@alcohol
Copy link
Member

alcohol commented Jul 18, 2018

What do you mean? glob() does not handle regex AFAIK

@staabm
Copy link
Contributor Author

staabm commented Jul 18, 2018

Ohh .. you are right... mixed things up.

@stof
Copy link
Contributor

stof commented Jul 18, 2018

see https://github.com/symfony/symfony/blob/ce73293532f6df48b2cac2aad8d040817429cea3/src/Symfony/Component/Config/Resource/GlobResource.php#L96

Symfony uses false === strpos($this->pattern, '{') to detect cases not needing GLOB_BRACE and so being able to use native globs even when they don't support it.

@alcohol
Copy link
Member

alcohol commented Jul 18, 2018

If you could add that check, would very much appreciate it :-)

@staabm
Copy link
Contributor Author

staabm commented Jul 18, 2018

Here we go

@alcohol
Copy link
Member

alcohol commented Jul 18, 2018

LGTM. @stof ?

@alcohol alcohol merged commit b44c9ac into composer:master Jul 18, 2018
@alcohol
Copy link
Member

alcohol commented Jul 18, 2018

Thanks guys

@staabm staabm deleted the patch-1 branch July 18, 2018 15:03
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.

3 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.