diff --git a/src/View/Parsers/HTML4Value.php b/src/View/Parsers/HTML4Value.php
index 528802df938..263f5964136 100644
--- a/src/View/Parsers/HTML4Value.php
+++ b/src/View/Parsers/HTML4Value.php
@@ -2,8 +2,24 @@
namespace SilverStripe\View\Parsers;
+use SilverStripe\Dev\Deprecation;
+
+/*
+ * @deprecated 4.13.0 Will be removed without equivalent functionality to replace it
+ */
class HTML4Value extends HTMLValue
{
+ public function __construct($fragment = null)
+ {
+ Deprecation::withNoReplacement(function () {
+ Deprecation::notice(
+ '4.13.0',
+ 'Will be removed without equivalent functionality to replace it',
+ Deprecation::SCOPE_CLASS
+ );
+ });
+ parent::__construct($fragment);
+ }
/**
* @param string $content
diff --git a/tests/php/View/Parsers/HTML4ValueTest.php b/tests/php/View/Parsers/HTML4ValueTest.php
index 833b1004776..0f8645b9443 100644
--- a/tests/php/View/Parsers/HTML4ValueTest.php
+++ b/tests/php/View/Parsers/HTML4ValueTest.php
@@ -2,11 +2,20 @@
namespace SilverStripe\View\Tests\Parsers;
+use SilverStripe\Dev\Deprecation;
use SilverStripe\Dev\SapphireTest;
use SilverStripe\View\Parsers\HTML4Value;
class HTML4ValueTest extends SapphireTest
{
+ protected function setUp(): void
+ {
+ parent::setUp();
+ if (Deprecation::isEnabled()) {
+ $this->markTestSkipped('Test calls deprecated code');
+ }
+ }
+
public function testInvalidHTMLSaving()
{
$value = new HTML4Value();