Skip to content

Commit

Permalink
Merge pull request #165 from hydephp/remove-deprecated-getDocumentati…
Browse files Browse the repository at this point in the history
…onOutputPath

Remove deprecated  hydephp/develop@21e8e49
  • Loading branch information
github-actions committed Jul 3, 2022
1 parent 32fe145 commit 77d4ee0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/HydeServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function register(): void
BladePage::class => '',
MarkdownPage::class => '',
MarkdownPost::class => 'posts',
DocumentationPage::class => config('docs.output_directory', 'docs'),
DocumentationPage::class => unslash(config('docs.output_directory', 'docs')),
]);

$this->storeCompiledSiteIn(Hyde::path(
Expand Down
8 changes: 0 additions & 8 deletions src/Models/Pages/DocumentationPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,6 @@ public function getOnlineSourcePath(): string|false
return trim(config('docs.source_file_location_base'), '/').'/'.$this->slug.'.md';
}

/**
* @deprecated v0.44.x Use DocumentationPage::getOutputDirectory() instead
*/
public static function getDocumentationOutputPath(): string
{
return unslash(config('docs.output_directory', 'docs'));
}

/**
* Get the path to the frontpage for the documentation.
*
Expand Down
6 changes: 3 additions & 3 deletions tests/Unit/DocumentationPageTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ public function test_can_get_online_source_path_with_trailing_slash()

public function test_can_get_documentation_output_path()
{
$this->assertEquals('docs', DocumentationPage::getDocumentationOutputPath());
$this->assertEquals('docs', DocumentationPage::getOutputDirectory());
}

public function test_can_get_documentation_output_path_with_custom_output_directory()
{
config(['docs.output_directory' => 'foo']);
(new HydeServiceProvider($this->app))->register();
$this->assertEquals('foo', DocumentationPage::getDocumentationOutputPath());
$this->assertEquals('foo', DocumentationPage::getOutputDirectory());
}

public function test_can_get_documentation_output_path_with_trailing_slashes()
Expand All @@ -76,7 +76,7 @@ public function test_can_get_documentation_output_path_with_trailing_slashes()
foreach ($tests as $test) {
config(['docs.output_directory' => $test]);
(new HydeServiceProvider($this->app))->register();
$this->assertEquals('foo', DocumentationPage::getDocumentationOutputPath());
$this->assertEquals('foo', DocumentationPage::getOutputDirectory());
}
}
}

0 comments on commit 77d4ee0

Please sign in to comment.