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.
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.