Skip to content

Commit 9e8db58

Browse files
weaverryannicolas-grekas
authored andcommitted
[Config] Prefixing FileExistenceResource::__toString() to avoid conflict with FileResource
1 parent 0ff9ed4 commit 9e8db58

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public function __construct(string $resource)
3838

3939
public function __toString(): string
4040
{
41-
return $this->resource;
41+
return 'existence.'.$this->resource;
4242
}
4343

4444
public function getResource(): string

src/Symfony/Component/Config/Tests/Resource/FileExistenceResourceTest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ protected function tearDown(): void
3636

3737
public function testToString()
3838
{
39-
$this->assertSame($this->file, (string) $this->resource);
39+
$this->assertSame('existence.'.$this->file, (string) $this->resource);
4040
}
4141

4242
public function testGetResource()

0 commit comments

Comments
 (0)