Skip to content
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

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

Merged

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

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 !

@@ -316,7 +316,7 @@ public function update( $args, $assoc_args ) { // phpcs:ignore Generic.CodeAnaly
}

/**
* 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 changed the title GH-94: Adds deprecation hint in wp language core activate's docblock [Main] Add deprecation hint in wp language core activate's docblock Aug 27, 2023
@danielbachhuber danielbachhuber merged commit 962c420 into wp-cli:main Aug 27, 2023
30 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add deprecation notice to wp language core activate help text
3 participants