Skip to content

Commit 13bb1e5

Browse files
authored
Merge pull request #931 from hydephp/remove-stringable-from-project-file-class
ProjectFile and inheritors no longer implement Stringable interface
2 parents ecb50cd + 3668a89 commit 13bb1e5

File tree

4 files changed

+1
-22
lines changed

4 files changed

+1
-22
lines changed

packages/framework/src/Support/Filesystem/ProjectFile.php

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,13 @@
1010
use Hyde\Support\Concerns\Serializable;
1111
use Hyde\Support\Contracts\SerializableContract;
1212
use function pathinfo;
13-
use Stringable;
1413

1514
/**
1615
* Filesystem abstraction for a file stored in the project.
1716
*
1817
* @see \Hyde\Framework\Testing\Feature\Support\ProjectFileTest
1918
*/
20-
abstract class ProjectFile implements SerializableContract, Stringable
19+
abstract class ProjectFile implements SerializableContract
2120
{
2221
use Serializable;
2322

@@ -39,11 +38,6 @@ public function __construct(string $path)
3938
$this->path = Hyde::pathToRelative($path);
4039
}
4140

42-
public function __toString(): string
43-
{
44-
return $this->path;
45-
}
46-
4741
/**
4842
* @return array{name: string, path: string}
4943
*/

packages/framework/tests/Feature/Support/MediaFileTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,6 @@ public function test_absolute_path_is_normalized_to_relative()
3636
$this->assertEquals('foo', MediaFile::make(Hyde::path('foo'))->path);
3737
}
3838

39-
public function test_to_string_returns_path()
40-
{
41-
$this->assertSame('foo', (string) MediaFile::make('foo'));
42-
}
43-
4439
public function test_get_name_returns_name_of_file()
4540
{
4641
$this->assertSame('foo.txt', MediaFile::make('foo.txt')->getName());

packages/framework/tests/Feature/Support/ProjectFileTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ public function test_absolute_path_is_normalized_to_relative()
3535
$this->assertEquals('foo', ProjectFileTestClass::make(Hyde::path('foo'))->path);
3636
}
3737

38-
public function test_to_string_returns_path()
39-
{
40-
$this->assertSame('foo', (string) ProjectFileTestClass::make('foo'));
41-
}
42-
4338
public function test_get_name_returns_name_of_file()
4439
{
4540
$this->assertSame('foo.txt', ProjectFileTestClass::make('foo.txt')->getName());

packages/framework/tests/Feature/Support/SourceFileTest.php

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,6 @@ public function test_absolute_path_is_normalized_to_relative()
5454
$this->assertEquals('foo', SourceFile::make(Hyde::path('foo'))->path);
5555
}
5656

57-
public function test_to_string_returns_path()
58-
{
59-
$this->assertSame('foo', (string) SourceFile::make('foo'));
60-
}
61-
6257
public function test_get_name_returns_name_of_file()
6358
{
6459
$this->assertSame('foo.txt', SourceFile::make('foo.txt')->getName());

0 commit comments

Comments
 (0)