From 2f195f529dd6570d28f838e8340a08025c37fb5b Mon Sep 17 00:00:00 2001 From: Oliver Hader Date: Mon, 5 Dec 2022 13:47:34 +0100 Subject: [PATCH] [TASK] Postpone Sanitizer deprecations (#100) Postpone deprecation messages after v2.1.0 release. Fixes: #99 --- src/Sanitizer.php | 7 ------- tests/ScenarioTest.php | 2 ++ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/Sanitizer.php b/src/Sanitizer.php index f7760f9..9abaf4d 100644 --- a/src/Sanitizer.php +++ b/src/Sanitizer.php @@ -89,13 +89,6 @@ public function __construct(...$items) } } $this->parser = $this->createParser(); - - if (!$this->behavior instanceof Behavior) { - trigger_error( - 'Add `Behavior` when creating new `Sanitizer` instances, e.g. `new Sanitizer($behavior, $visitor)`', - E_USER_DEPRECATED - ); - } } public function sanitize(string $html, InitiatorInterface $initiator = null): string diff --git a/tests/ScenarioTest.php b/tests/ScenarioTest.php index 9a08bdb..8f0de82 100644 --- a/tests/ScenarioTest.php +++ b/tests/ScenarioTest.php @@ -30,6 +30,8 @@ class ScenarioTest extends TestCase */ public function missingBehaviorTriggersDeprecationError(): void { + $this->markTestSkipped('see https://github.com/TYPO3/html-sanitizer/issues/99'); + $this->expectDeprecation(); $this->expectDeprecationMessage( 'Add `Behavior` when creating new `Sanitizer` instances, e.g. `new Sanitizer($behavior, $visitor)`'