Skip to content

Commit b37dc21

Browse files
Remove doing_it_wrong
1 parent 0759bdd commit b37dc21

File tree

4 files changed

+2
-14
lines changed

4 files changed

+2
-14
lines changed

src/wp-includes/interactivity-api/class-wp-interactivity-api.php

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -559,14 +559,10 @@ private function _process_directives( string $html ) {
559559
/*
560560
* It returns null if the HTML is unbalanced because unbalanced HTML is
561561
* not safe to process. In that case, the Interactivity API runtime will
562-
* update the HTML on the client side during the hydration. It will also
563-
* display a notice to the developer to inform them about the issue.
562+
* update the HTML on the client side during the hydration. It will display
563+
* a notice to the developer in the console to inform them about the issue.
564564
*/
565565
if ( $unbalanced || 0 < count( $tag_stack ) ) {
566-
$tag_errored = 0 < count( $tag_stack ) ? end( $tag_stack )[0] : $tag_name;
567-
/* translators: %1s: Namespace processed, %2s: The tag that caused the error; could be any HTML tag. */
568-
$message = sprintf( __( 'Interactivity directives failed to process in "%1$s" due to a missing "%2$s" end tag.' ), end( $this->namespace_stack ), $tag_errored );
569-
_doing_it_wrong( __METHOD__, $message, '6.6.0' );
570566
return null;
571567
}
572568

tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-each.php

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -580,8 +580,6 @@ public function test_wp_each_nested_template_tags_using_previous_item_as_list()
580580
* @ticket 60356
581581
*
582582
* @covers ::process_directives
583-
*
584-
* @expectedIncorrectUsage WP_Interactivity_API::_process_directives
585583
*/
586584
public function test_wp_each_unbalanced_tags() {
587585
$original = '' .
@@ -600,8 +598,6 @@ public function test_wp_each_unbalanced_tags() {
600598
* @ticket 60356
601599
*
602600
* @covers ::process_directives
603-
*
604-
* @expectedIncorrectUsage WP_Interactivity_API::_process_directives
605601
*/
606602
public function test_wp_each_unbalanced_tags_in_nested_template_tags() {
607603
$this->interactivity->state( 'myPlugin', array( 'list2' => array( 3, 4 ) ) );

tests/phpunit/tests/interactivity-api/wpInteractivityAPI-wp-text.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,6 @@ public function test_wp_text_sets_inner_content_even_with_unbalanced_but_differe
131131
* @ticket 60356
132132
*
133133
* @covers ::process_directives
134-
*
135-
* @expectedIncorrectUsage WP_Interactivity_API::_process_directives
136134
*/
137135
public function test_wp_text_fails_with_unbalanced_and_same_tags_inside_content() {
138136
$html = '<div data-wp-text="myPlugin::state.text">Text<div></div>';

tests/phpunit/tests/interactivity-api/wpInteractivityAPI.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,8 +1192,6 @@ public function test_process_directives_process_the_directives_in_the_correct_or
11921192
*
11931193
* @dataProvider data_html_with_unbalanced_tags
11941194
*
1195-
* @expectedIncorrectUsage WP_Interactivity_API::_process_directives
1196-
*
11971195
* @param string $html HTML containing unbalanced tags and also a directive.
11981196
*/
11991197
public function test_process_directives_doesnt_change_html_if_contains_unbalanced_tags( $html ) {

0 commit comments

Comments
 (0)