Skip to content

Add deprecation hint in wp language core activate's docblock#125

Merged
danielbachhuber merged 3 commits intowp-cli:mainfrom
Pathan-Amaankhan:GH-94-adds-deprication-notice
Aug 27, 2023
Merged

Add deprecation hint in wp language core activate's docblock#125
danielbachhuber merged 3 commits intowp-cli:mainfrom
Pathan-Amaankhan:GH-94-adds-deprication-notice

Conversation

@Pathan-Amaankhan
Copy link
Contributor

@Pathan-Amaankhan Pathan-Amaankhan commented Aug 27, 2023

Description

  • This PR adds a deprecation hint to wp language core activate's docblock & Readme.md file as suggested in this comment.

Screenshots of output

  1. Command: wp language core activate --help

    • Before
      • Synopsis text:

        wp language core activate <language>
        
        Screenshot 2023-08-27 at 8 38 16 PM
    • After
      • Synopsis text:

        wp language core activate <language>
        
        **Warning: 'wp language core activate is deprecated.**
        
        Screenshot 2023-08-27 at 8 35 44 PM

Fixes/Covers

@Pathan-Amaankhan Pathan-Amaankhan requested a review from a team as a code owner August 27, 2023 08:25
@swissspidy swissspidy linked an issue Aug 27, 2023 that may be closed by this pull request
@swissspidy swissspidy added the command:language-core-activate Related to 'language core activate' command label Aug 27, 2023
Copy link
Member

@danielbachhuber danielbachhuber left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR, @Pathan-Amaankhan !


/**
* Activates a given language.
* Activates a given language. (Deprecated: use wp site switch-language instead)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we put this on a new line, and make it similar to the deprecation notice for wp scaffold block? https://github.com/wp-cli/scaffold-command/blob/594f0b47a2af6a19664f0f4717998b2cf5cb3ed7/src/Scaffold_Command.php#L205-L208

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure! On it 👍.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @danielbachhuber,
Have updated the doc-comment as suggested.

Please do let me know if further changes are required 😃.

cc: @swissspidy

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Pathan-Amaankhan Thanks! I made one more minor tweak eeb97ff

@danielbachhuber danielbachhuber added this to the 2.0.16 milestone Aug 27, 2023
@danielbachhuber danielbachhuber self-requested a review August 27, 2023 15:35
@danielbachhuber danielbachhuber changed the title GH-94: Adds deprecation hint in wp language core activate's docblock [Main] Aug 27, 2023
@danielbachhuber danielbachhuber merged commit 962c420 into wp-cli:main Aug 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:language-core-activate Related to 'language core activate' command

3 participants