wilmoore/php-version

Support for release-candidates installed by Homebrew

SimonSimCity opened this issue · 2 comments

I installed the first release-candidate for PHP 5.6 today and was wondering why it wasn't marked as selected after calling php-version 5.6.

The reason is, that homebrew installs it to a directory called /usr/local/Cellar/php56/5.6.0-rc.1/bin, what is (correctly) added to the path variable, but it doesn't show up as marked, because the PHP binary returns 5.6.0RC1 as it's version number. Do you have an idea on to fix this? This may also apply to alpha or beta releases - haven't tested it yet.

One possibility (would take a tiny bit more time) would be to call each binary and compare the version-result instead of checking it by the name of the folder.

Could be fixed by #43

call each binary and compare the version-result instead of checking it by the name of the folder

I agree; though we would just need to make sure that the matching still works by directory name and by calling php-config --version. This would also have to continue to work for fuzzy matching.

Thanks for giving this a go. I've also commented on #43.