Skip to content

Commit ff9c132

Browse files
committed
[Config] added type prefixes to resource ids
Makes sure that directory and the file resources with the same name will have different ids
1 parent ece489f commit ff9c132

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ public function exists()
210210
*/
211211
public function getId()
212212
{
213-
return md5($this->resource.$this->pattern);
213+
return md5('d'.$this->resource.$this->pattern);
214214
}
215215

216216
public function serialize()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public function exists()
9797
*/
9898
public function getId()
9999
{
100-
return md5($this->resource);
100+
return md5('f'.$this->resource);
101101
}
102102

103103
public function serialize()

0 commit comments

Comments
 (0)