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

Only use version from plugin header. #93

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

BrianHenryIE
Copy link
Member

@BrianHenryIE BrianHenryIE commented May 2, 2024

The minimum definition for a plugin file says its set of headers must have the Plugin Name header. This PR changes the version parsing code to only consider a parsed version if it is part of a PHP file's plugin headers, by checking does the "Plugin Name" header exist first.

Previously, it was considering any @version in any PHP docblock.

Fixes #92

Edit: looks like I didn't start the branch off upstream/master. I'll rewrite it soon.

@BrianHenryIE BrianHenryIE requested a review from a team as a code owner May 2, 2024 04:39
@BrianHenryIE BrianHenryIE marked this pull request as draft May 2, 2024 04:43
@swissspidy swissspidy changed the title Only use version from plugin header. Fix #92 May 2, 2024
@BrianHenryIE BrianHenryIE force-pushed the Uses-version-from-plugin-header-when-multiple-versions-are-present branch from 529293a to 1c1e5bb Compare July 12, 2024 01:17
@BrianHenryIE BrianHenryIE marked this pull request as ready for review July 12, 2024 01:18
@@ -0,0 +1,119 @@
<?php

class Version_Tool {
Copy link
Member

Choose a reason for hiding this comment

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants