Skip to content

Commit b6aafea

Browse files
authored
Merge pull request #1261 from hydephp/remove-deprecated-code
Remove deprecated `CreatesNewPageSourceFile::getOutputPath` method
2 parents 721b09e + ae85536 commit b6aafea

File tree

3 files changed

+5
-10
lines changed

3 files changed

+5
-10
lines changed

RELEASE_NOTES.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ This serves two purposes:
2828
- Removed `RenderData:.getCurrentRoute` method deprecated in v1.0.0-RC.2
2929
- Removed deprecated `HydePage::$canonicalUrl` property (replaced with `HydePage::getCanonicalUrl()`).
3030
- Removed deprecated `SourceFile::withoutDirectoryPrefix` method only used in one test.
31+
- Removed deprecated `CreatesNewPageSourceFile::getOutputPath` method as the save method now returns the path.
3132

3233
### Fixed
3334
- Fixed the blog post article view where metadata assembly used legacy hard-coded paths instead of dynamic path information.

packages/framework/src/Framework/Actions/CreatesNewPageSourceFile.php

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,12 +62,6 @@ public function save(): string
6262
return $this->outputPath;
6363
}
6464

65-
/** @deprecated This method may be removed as the save method now returns the path. */
66-
public function getOutputPath(): string
67-
{
68-
return $this->outputPath;
69-
}
70-
7165
protected function parseTitle(string $title): string
7266
{
7367
return Str::afterLast($title, '/');

packages/framework/tests/Feature/Actions/CreatesNewPageSourceFileTest.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,16 @@ public function test_that_the_file_path_can_be_returned()
137137
{
138138
$this->assertSame(
139139
Hyde::path('_pages/test-page.md'),
140-
(new CreatesNewPageSourceFile('Test Page'))->getOutputPath()
140+
(new CreatesNewPageSourceFile('Test Page'))->save()
141141
);
142142

143143
$this->assertSame(
144144
Hyde::path('_pages/test-page.blade.php'),
145-
(new CreatesNewPageSourceFile('Test Page', BladePage::class))->getOutputPath()
145+
(new CreatesNewPageSourceFile('Test Page', BladePage::class))->save()
146146
);
147147

148-
// Filesystem::unlink('_pages/test-page.md');
149-
// Filesystem::unlink('_pages/test-page.blade.php');
148+
Filesystem::unlink('_pages/test-page.md');
149+
Filesystem::unlink('_pages/test-page.blade.php');
150150
}
151151

152152
public function test_file_is_created_using_slug_generated_from_title()

0 commit comments

Comments
 (0)