Skip to content

Use dotorg readme parser if available #947

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
May 24, 2025
Merged

Conversation

ernilambar
Copy link
Member

@ernilambar ernilambar commented May 23, 2025

This PR:

  • If WordPressdotorg\Plugin_Directory\Readme\Parser class is available, use it for parsing readme. Otherwise use WordPress\Plugin_Check\Lib\Readme\Parser

@ernilambar ernilambar force-pushed the use-directory-readme branch from 3c5398b to e3cce52 Compare May 23, 2025 05:36
@ernilambar ernilambar marked this pull request as ready for review May 23, 2025 05:48
Copy link

github-actions bot commented May 23, 2025

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: ernilambar <[email protected]>
Co-authored-by: dd32 <[email protected]>
Co-authored-by: davidperezgar <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@ernilambar ernilambar requested review from dd32 and swissspidy May 23, 2025 05:49
Copy link
Member

@dd32 dd32 left a comment

Choose a reason for hiding this comment

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

Haven't tested this, but looks like it'll work just fine for the intended purpose.

I got to thinking the WordPress.org plugin directory could probably do something like class_alias( '\WordPressdotorg\Plugin_Directory\Readme\Parser', '\WordPress\Plugin_Check\Lib\Readme\Parser' ); to override PCP :)

Probably best to do this on the PCP side though, as that'll leave the door open for a future where you need to use a custom parser for some reason..

I'll also have to remember to use class_exists( ImportedClassName::class ) :)

@ernilambar ernilambar added this to the 1.6.0 milestone May 24, 2025
@ernilambar ernilambar merged commit 68b88b1 into trunk May 24, 2025
40 of 52 checks passed
@ernilambar ernilambar deleted the use-directory-readme branch May 24, 2025 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants