8000 bug #34398 [Config] fix id-generation for GlobResource (nicolas-grekas) · symfony/symfony@a90de43 · GitHub
[go: up one dir, main page]

Skip to content

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

Commit a90de43

Browse files
bug #34398 [Config] fix id-generation for GlobResource (nicolas-grekas)
This PR was merged into the 4.3 branch. Discussion ---------- [Config] fix id-generation for GlobResource | Q | A | ------------- | --- | Branch? | 4.3 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | - | License | MIT | Doc PR | - I never encountered any issues related to this but still, it's a fix. Commits ------- 6adbfa2 [Config] fix id-generation for GlobResource
2 parents 8522a88 + 6adbfa2 commit a90de43

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/Symfony/Component/Config/Resource/GlobResource.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ class GlobResource implements \IteratorAggregate, SelfCheckingResourceInterface
4141
*/
4242
public function __construct(?string $prefix, string $pattern, bool $recursive, bool $forExclusion = false, array $excludedPrefixes = [])
4343
{
44+
ksort($excludedPrefixes);
4445
$this->prefix = realpath($prefix) ?: (file_exists($prefix) ? $prefix : false);
4546
$this->pattern = $pattern;
4647
$this->recursive = $recursive;
@@ -62,7 +63,7 @@ public function getPrefix()
6263
*/
6364
public function __toString()
6465
{
65-
return 'glob.'.$this->prefix.$this->pattern.(int) $this->recursive;
66+
return 'glob.'.$this->prefix.(int) $this->recursive.$this->pattern.(int) $this->forExclusion.implode("\0", $this->excludedPrefixes);
6667
}
6768

6869
/**

0 commit comments

Comments
 (0)
0