theseer / phpdox

Documentation generator for PHP Code using standard technology (SRC, DOCBLOCK, XML and XSLT)
http://phpdox.de
Other
601 stars 121 forks source link

Git version comparison bug in macOS #381

Closed inash closed 4 years ago

inash commented 4 years ago

https://github.com/theseer/phpdox/blob/3945e2d5f4298725688965baa0d79741f882eff2/src/generator/enricher/git/Git.php#L349

Git on macOS has an additional word in the version line which happens to be wrongly picked up to compare in method ensureGitVersionSupported. Instead of picking up 2.20.1, Git-117) is being picked up. Below is comparison of the git version string from different operating systems.

Instead of array_pop($parts), taking $parts[2] should be correct.

Qusonann commented 4 years ago

https://github.com/theseer/phpdox/pull/385 my MR should fix this (at least on macOS, haven't checked windows).

theseer commented 4 years ago

I'm not fully sure the implementation in PR #385 is the best yet, but it certainly will fix things.

Good enough for now and thus merged.