Skip to content

Commit

Permalink
ENH Suppress deprecation notices for API we can't avoid
Browse files Browse the repository at this point in the history
  • Loading branch information
GuySartorelli committed Oct 14, 2024
1 parent 4763bda commit 2f4bc11
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions src/Publisher.php
Original file line number Diff line number Diff line change
Expand Up @@ -175,11 +175,11 @@ protected function generatePHPCacheFile($response)
*/
protected function generateHTMLCacheRedirection($destination)
{
return SSViewer::execute_template(
'SilverStripe\\StaticPublishQueue\\HTMLRedirection',
ArrayData::create([
'URL' => DBField::create_field('Varchar', $destination),
])
);
$viewer = SSViewer::create('SilverStripe\\StaticPublishQueue\\HTMLRedirection');
$viewer->setRewriteHashLinks(false);
$viewer->includeRequirements(false);
return $viewer->process(ArrayData::create([
'URL' => DBField::create_field('Varchar', $destination),
]));
}
}
2 changes: 1 addition & 1 deletion tests/php/Publisher/FilesystemPublisherTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ public function testUrlToPathWithDomainBasedCaching(): void

public function testMenu2LinkingMode(): void
{
SSViewer::set_themes(null);
SSViewer::set_themes([]);

$reflection = new \ReflectionClass(FilesystemPublisher::class);
$urlToPath = $reflection->getMethod('URLtoPath');
Expand Down

0 comments on commit 2f4bc11

Please sign in to comment.