Skip to content

Commit

Permalink
fix: Adjust wording related to deprecations (#7332)
Browse files Browse the repository at this point in the history
  • Loading branch information
localheinz committed Sep 27, 2023
1 parent f1abe95 commit 656defb
Show file tree
Hide file tree
Showing 15 changed files with 31 additions and 31 deletions.
4 changes: 2 additions & 2 deletions doc/list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -773,12 +773,12 @@ List of Available Rules

- | ``annotation_include``
| Class level attribute or annotation tags that must be set in order to fix the class (case insensitive).
| warning:: This option is deprecated and will be removed on next major version. Use ``include`` to configure PHPDoc annotations tags and attributes.
| warning:: This option is deprecated and will be removed in the next major version. Use ``include`` to configure PHPDoc annotations tags and attributes.
| Allowed types: ``array``
| Default value: ``['@internal']``
- | ``annotation_exclude``
| Class level attribute or annotation tags that must be omitted to fix the class, even if all of the white list ones are used as well (case insensitive).
| warning:: This option is deprecated and will be removed on next major version. Use ``exclude`` to configure PHPDoc annotations tags and attributes.
| warning:: This option is deprecated and will be removed in the next major version. Use ``exclude`` to configure PHPDoc annotations tags and attributes.
| Allowed types: ``array``
| Default value: ``['@final', '@Entity', '@ORM\\Entity', '@ORM\\Mapping\\Entity', '@Mapping\\Entity', '@Document', '@ODM\\Document']``
- | ``include``
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ PHP single-line arrays should not have trailing comma.
Warning
-------

This rule is deprecated and will be removed on next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This rule is deprecated and will be removed in the next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You should use ``no_trailing_comma_in_singleline`` instead.

Expand Down
4 changes: 2 additions & 2 deletions doc/rules/basic/braces.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ placed. Body of braces should be properly indented.
Warning
-------

This rule is deprecated and will be removed on next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This rule is deprecated and will be removed in the next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You should use ``single_space_around_construct``, ``control_structure_braces``,
``control_structure_continuation_position``, ``declare_parentheses``,
Expand Down
4 changes: 2 additions & 2 deletions doc/rules/class_notation/final_internal_class.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Configuration
``annotation_include``
~~~~~~~~~~~~~~~~~~~~~~

.. warning:: This option is deprecated and will be removed on next major version. Use ``include`` to configure PHPDoc annotations tags and attributes.
.. warning:: This option is deprecated and will be removed in the next major version. Use ``include`` to configure PHPDoc annotations tags and attributes.

Class level attribute or annotation tags that must be set in order to fix the
class (case insensitive).
Expand All @@ -30,7 +30,7 @@ Default value: ``['@internal']``
``annotation_exclude``
~~~~~~~~~~~~~~~~~~~~~~

.. warning:: This option is deprecated and will be removed on next major version. Use ``exclude`` to configure PHPDoc annotations tags and attributes.
.. warning:: This option is deprecated and will be removed in the next major version. Use ``exclude`` to configure PHPDoc annotations tags and attributes.

Class level attribute or annotation tags that must be omitted to fix the class,
even if all of the white list ones are used as well (case insensitive).
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Remove trailing commas in list function calls.
Warning
-------

This rule is deprecated and will be removed on next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This rule is deprecated and will be removed in the next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You should use ``no_trailing_comma_in_singleline`` instead.

Expand Down
4 changes: 2 additions & 2 deletions doc/rules/function_notation/function_typehint_space.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Ensure single space between function's argument and its typehint.
Warning
-------

This rule is deprecated and will be removed on next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This rule is deprecated and will be removed in the next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You should use ``type_declaration_spaces`` instead.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ trailing comma after the last argument.
Warning
-------

This rule is deprecated and will be removed on next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This rule is deprecated and will be removed in the next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You should use ``no_trailing_comma_in_singleline`` instead.

Expand Down
4 changes: 2 additions & 2 deletions doc/rules/language_construct/class_keyword_remove.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Converts ``::class`` keywords to FQCN strings.
Warning
-------

This rule is deprecated and will be removed on next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This rule is deprecated and will be removed in the next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Examples
--------
Expand Down
4 changes: 2 additions & 2 deletions doc/rules/language_construct/single_space_after_construct.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Ensures a single space after language constructs.
Warning
-------

This rule is deprecated and will be removed on next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This rule is deprecated and will be removed in the next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You should use ``single_space_around_construct`` instead.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ There should be no blank lines before a namespace declaration.
Warning
-------

This rule is deprecated and will be removed on next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This rule is deprecated and will be removed in the next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You should use ``blank_lines_before_namespace`` instead.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ There should be exactly one blank line before a namespace declaration.
Warning
-------

This rule is deprecated and will be removed on next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This rule is deprecated and will be removed in the next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You should use ``blank_lines_before_namespace`` instead.

Expand Down
4 changes: 2 additions & 2 deletions doc/rules/whitespace/no_spaces_inside_parenthesis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ space before the closing parenthesis.
Warning
-------

This rule is deprecated and will be removed on next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This rule is deprecated and will be removed in the next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

You should use ``spaces_inside_parentheses`` instead.

Expand Down
2 changes: 1 addition & 1 deletion src/Console/Command/DescribeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ private function describeRule(OutputInterface $output, string $name): void
if ($fixer instanceof DeprecatedFixerInterface) {
$successors = $fixer->getSuccessorsNames();
$message = [] === $successors
? 'will be removed on next major version'
? 'will be removed in the next major version'
: sprintf('use %s instead', Utils::naturalLanguageJoinWithBackticks($successors));
$message = Preg::replace('/(`.+?`)/', '<info>$1</info>', $message);
$summary .= sprintf(' <error>DEPRECATED</error>: %s.', $message);
Expand Down
8 changes: 4 additions & 4 deletions src/Documentation/FixerDocumentGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ public function generateFixerDocumentation(FixerInterface $fixer): string
if ($fixer instanceof DeprecatedFixerInterface) {
$deprecationDescription = <<<'RST'
This rule is deprecated and will be removed on next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This rule is deprecated and will be removed in the next major version
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
RST;
$alternatives = $fixer->getSuccessorsNames();

Expand Down Expand Up @@ -135,13 +135,13 @@ public function generateFixerDocumentation(FixerInterface $fixer): string

if ($option instanceof DeprecatedFixerOptionInterface) {
$deprecationMessage = RstUtils::toRst($option->getDeprecationMessage());
$optionInfo .= "\n\n.. warning:: This option is deprecated and will be removed on next major version. {$deprecationMessage}";
$optionInfo .= "\n\n.. warning:: This option is deprecated and will be removed in the next major version. {$deprecationMessage}";
}

$optionInfo .= "\n\n".RstUtils::toRst($option->getDescription());

if ($option instanceof AliasedFixerOption) {
$optionInfo .= "\n\n.. note:: The previous name of this option was ``{$option->getAlias()}`` but it is now deprecated and will be removed on next major version.";
$optionInfo .= "\n\n.. note:: The previous name of this option was ``{$option->getAlias()}`` but it is now deprecated and will be removed in the next major version.";
}

$allowed = HelpCommand::getDisplayableAllowedValues($option);
Expand Down
4 changes: 2 additions & 2 deletions src/Documentation/ListDocumentGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,11 @@ public function generateListingDocumentation(array $fixers): string

if ($option instanceof DeprecatedFixerOptionInterface) {
$deprecationMessage = RstUtils::toRst($option->getDeprecationMessage(), 3);
$documentation .= "\n | warning:: This option is deprecated and will be removed on next major version. {$deprecationMessage}";
$documentation .= "\n | warning:: This option is deprecated and will be removed in the next major version. {$deprecationMessage}";
}

if ($option instanceof AliasedFixerOption) {
$documentation .= "\n | note:: The previous name of this option was ``{$option->getAlias()}`` but it is now deprecated and will be removed on next major version.";
$documentation .= "\n | note:: The previous name of this option was ``{$option->getAlias()}`` but it is now deprecated and will be removed in the next major version.";
}

$allowed = HelpCommand::getDisplayableAllowedValues($option);
Expand Down

0 comments on commit 656defb

Please sign in to comment.