mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Merge pull request #10648 from creative-commoners/pulls/4/deprecate-html5
API Deprecate HTML4Value
This commit is contained in:
commit
c430011f19
@ -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
|
||||
|
@ -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();
|
||||
|
Loading…
Reference in New Issue
Block a user