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] Allow empty globs#22985

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:3.3fromnicolas-grekas:empty-glob
May 31, 2017
Merged

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?3.3
Bug fix?yes
New feature?no
BC breaks?no
Deprecations?no
Tests pass?yes
Fixed tickets#22950
LicenseMIT
Doc PR-

This considers globs as valid even if they return no matches when they have a prefix (and when that prefix exists, according to$ignoreErrors).
This means there is an edge-case:
*.abc with at least one match is OK, but when it has no match, it falls back to regular import, then usually will fil.
But rewriting this to./*.abc resolves the ambiguity and turns this into a glob that won't fail if no matches are found.

This should provide the expected behavior in most cases (but ambiguous described one of course).

@sstok
Copy link
Contributor

How would this look like for$loader->load($confDir.'/container'.self::CONFIG_EXTS, 'glob'); ?
Would the path be something like$configDir.'/./*.xml'?

@nicolas-grekas
Copy link
MemberAuthor

you can run the code to know ;)
the answer to your 2nd question is no

@fabpot
Copy link
Member

Thank you@nicolas-grekas.

sstok and alOneh reacted with hooray emoji

@fabpotfabpot merged commitc5b9c1a intosymfony:3.3May 31, 2017
fabpot added a commit that referenced this pull requestMay 31, 2017
This PR was merged into the 3.3 branch.Discussion----------[Config] Allow empty globs| Q             | A| ------------- | ---| Branch?       | 3.3| Bug fix?      | yes| New feature?  | no| BC breaks?    | no| Deprecations? | no| Tests pass?   | yes| Fixed tickets |#22950| License       | MIT| Doc PR        | -This considers globs as valid even if they return no matches when they have a prefix (and when that prefix exists, according to `$ignoreErrors`).This means there is an edge-case:`*.abc` with at least one match is OK, but when it has no match, it falls back to regular import, then usually will fil.But rewriting this to `./*.abc` resolves the ambiguity and turns this into a glob that won't fail if no matches are found.This should provide the expected behavior in most cases (but ambiguous described one of course).Commits-------c5b9c1a [Config] Allow empty globs
@Majkl578
Copy link
Contributor

@nicolas-grekas Thanks, this definitely makes more sense for Flex-based apps (using glob patterns). 👍

@nicolas-grekasnicolas-grekas deleted the empty-glob branchJune 1, 2017 14:38
@fabpotfabpot mentioned this pull requestJun 5, 2017
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

3.3

Development

Successfully merging this pull request may close these issues.

5 participants

@nicolas-grekas@sstok@fabpot@Majkl578@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp