Skip to content

Generators: remove deprecated methods #985

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
124 changes: 10 additions & 114 deletions src/Generators/HTML.php
Original file line number Diff line number Diff line change
Expand Up @@ -153,31 +153,11 @@ public function generate()
}//end generate()


/**
* Print the header of the HTML page.
*
* @deprecated 3.12.0 Use HTML::getFormattedHeader() instead.
*
* @codeCoverageIgnore
*
* @return void
*/
protected function printHeader()
{
trigger_error(
'The '.__METHOD__.'() method is deprecated. Use "echo '.__CLASS__.'::getFormattedHeader()" instead.',
E_USER_DEPRECATED
);

echo $this->getFormattedHeader();

}//end printHeader()


/**
* Format the header of the HTML page.
*
* @since 3.12.0 Replaces the deprecated HTML::printHeader() method.
* @since 3.12.0 Replaces the HTML::printHeader() method,
* which was deprecated in 3.12.0 and removed in 4.0.0.
*
* @return string
*/
Expand All @@ -202,33 +182,13 @@ protected function getFormattedHeader()
}//end getFormattedHeader()


/**
* Print the table of contents for the standard.
*
* @deprecated 3.12.0 Use HTML::getFormattedToc() instead.
*
* @codeCoverageIgnore
*
* @return void
*/
protected function printToc()
{
trigger_error(
'The '.__METHOD__.'() method is deprecated. Use "echo '.__CLASS__.'::getFormattedToc()" instead.',
E_USER_DEPRECATED
);

echo $this->getFormattedToc();

}//end printToc()


/**
* Format the table of contents for the standard.
*
* The TOC is just an unordered list of bookmarks to sniffs on the page.
*
* @since 3.12.0 Replaces the deprecated HTML::printToc() method.
* @since 3.12.0 Replaces the HTML::printToc() method,
* which was deprecated in 3.12.0 and removed in 4.0.0.
*
* @return string
*/
Expand Down Expand Up @@ -259,31 +219,11 @@ protected function getFormattedToc()
}//end getFormattedToc()


/**
* Print the footer of the HTML page.
*
* @deprecated 3.12.0 Use HTML::getFormattedFooter() instead.
*
* @codeCoverageIgnore
*
* @return void
*/
protected function printFooter()
{
trigger_error(
'The '.__METHOD__.'() method is deprecated. Use "echo '.__CLASS__.'::getFormattedFooter()" instead.',
E_USER_DEPRECATED
);

echo $this->getFormattedFooter();

}//end printFooter()


/**
* Format the footer of the HTML page.
*
* @since 3.12.0 Replaces the deprecated HTML::printFooter() method.
* @since 3.12.0 Replaces the HTML::printFooter() method,
* which was deprecated in 3.12.0 and removed in 4.0.0.
*
* @return string
*/
Expand Down Expand Up @@ -369,35 +309,13 @@ private function titleToAnchor($title)
}//end titleToAnchor()


/**
* Print a text block found in a standard.
*
* @param \DOMNode $node The DOMNode object for the text block.
*
* @deprecated 3.12.0 Use HTML::getFormattedTextBlock() instead.
*
* @codeCoverageIgnore
*
* @return void
*/
protected function printTextBlock(DOMNode $node)
{
trigger_error(
'The '.__METHOD__.'() method is deprecated. Use "echo '.__CLASS__.'::getFormattedTextBlock()" instead.',
E_USER_DEPRECATED
);

echo $this->getFormattedTextBlock($node);

}//end printTextBlock()


/**
* Format a text block found in a standard.
*
* @param \DOMNode $node The DOMNode object for the text block.
*
* @since 3.12.0 Replaces the deprecated HTML::printTextBlock() method.
* @since 3.12.0 Replaces the HTML::printTextBlock() method,
* which was deprecated in 3.12.0 and removed in 4.0.0.
*
* @return string
*/
Expand Down Expand Up @@ -444,35 +362,13 @@ protected function getFormattedTextBlock(DOMNode $node)
}//end getFormattedTextBlock()


/**
* Print a code comparison block found in a standard.
*
* @param \DOMNode $node The DOMNode object for the code comparison block.
*
* @deprecated 3.12.0 Use HTML::getFormattedCodeComparisonBlock() instead.
*
* @codeCoverageIgnore
*
* @return void
*/
protected function printCodeComparisonBlock(DOMNode $node)
{
trigger_error(
'The '.__METHOD__.'() method is deprecated. Use "echo '.__CLASS__.'::getFormattedCodeComparisonBlock()" instead.',
E_USER_DEPRECATED
);

echo $this->getFormattedCodeComparisonBlock($node);

}//end printCodeComparisonBlock()


/**
* Format a code comparison block found in a standard.
*
* @param \DOMNode $node The DOMNode object for the code comparison block.
*
* @since 3.12.0 Replaces the deprecated HTML::printCodeComparisonBlock() method.
* @since 3.12.0 Replaces the HTML::printCodeComparisonBlock() method,
* which was deprecated in 3.12.0 and removed in 4.0.0.
*
* @return string
*/
Expand Down
100 changes: 8 additions & 92 deletions src/Generators/Markdown.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,31 +46,11 @@ public function generate()
}//end generate()


/**
* Print the markdown header.
*
* @deprecated 3.12.0 Use Markdown::getFormattedHeader() instead.
*
* @codeCoverageIgnore
*
* @return void
*/
protected function printHeader()
{
trigger_error(
'The '.__METHOD__.'() method is deprecated. Use "echo '.__CLASS__.'::getFormattedHeader()" instead.',
E_USER_DEPRECATED
);

echo $this->getFormattedHeader();

}//end printHeader()


/**
* Format the markdown header.
*
* @since 3.12.0 Replaces the deprecated Markdown::printHeader() method.
* @since 3.12.0 Replaces the Markdown::printHeader() method,
* which was deprecated in 3.12.0 and removed in 4.0.0.
*
* @return string
*/
Expand All @@ -83,31 +63,11 @@ protected function getFormattedHeader()
}//end getFormattedHeader()


/**
* Print the markdown footer.
*
* @deprecated 3.12.0 Use Markdown::getFormattedFooter() instead.
*
* @codeCoverageIgnore
*
* @return void
*/
protected function printFooter()
{
trigger_error(
'The '.__METHOD__.'() method is deprecated. Use "echo '.__CLASS__.'::getFormattedFooter()" instead.',
E_USER_DEPRECATED
);

echo $this->getFormattedFooter();

}//end printFooter()


/**
* Format the markdown footer.
*
* @since 3.12.0 Replaces the deprecated Markdown::printFooter() method.
* @since 3.12.0 Replaces the Markdown::printFooter() method,
* which was deprecated in 3.12.0 and removed in 4.0.0.
*
* @return string
*/
Expand Down Expand Up @@ -154,35 +114,13 @@ protected function processSniff(DOMNode $doc)
}//end processSniff()


/**
* Print a text block found in a standard.
*
* @param \DOMNode $node The DOMNode object for the text block.
*
* @deprecated 3.12.0 Use Markdown::getFormattedTextBlock() instead.
*
* @codeCoverageIgnore
*
* @return void
*/
protected function printTextBlock(DOMNode $node)
{
trigger_error(
'The '.__METHOD__.'() method is deprecated. Use "echo '.__CLASS__.'::getFormattedTextBlock()" instead.',
E_USER_DEPRECATED
);

echo $this->getFormattedTextBlock($node);

}//end printTextBlock()


/**
* Format a text block found in a standard.
*
* @param \DOMNode $node The DOMNode object for the text block.
*
* @since 3.12.0 Replaces the deprecated Markdown::printTextBlock() method.
* @since 3.12.0 Replaces the Markdown::printTextBlock() method,
* which was deprecated in 3.12.0 and removed in 4.0.0.
*
* @return string
*/
Expand Down Expand Up @@ -227,35 +165,13 @@ protected function getFormattedTextBlock(DOMNode $node)
}//end getFormattedTextBlock()


/**
* Print a code comparison block found in a standard.
*
* @param \DOMNode $node The DOMNode object for the code comparison block.
*
* @deprecated 3.12.0 Use Markdown::getFormattedCodeComparisonBlock() instead.
*
* @codeCoverageIgnore
*
* @return void
*/
protected function printCodeComparisonBlock(DOMNode $node)
{
trigger_error(
'The '.__METHOD__.'() method is deprecated. Use "echo '.__CLASS__.'::getFormattedCodeComparisonBlock()" instead.',
E_USER_DEPRECATED
);

echo $this->getFormattedCodeComparisonBlock($node);

}//end printCodeComparisonBlock()


/**
* Format a code comparison block found in a standard.
*
* @param \DOMNode $node The DOMNode object for the code comparison block.
*
* @since 3.12.0 Replaces the deprecated Markdown::printCodeComparisonBlock() method.
* @since 3.12.0 Replaces the Markdown::printCodeComparisonBlock() method,
* which was deprecated in 3.12.0 and removed in 4.0.0.
*
* @return string
*/
Expand Down
Loading