Skip to content

Commit

Permalink
Do not try to make phpstan on PHP 7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
phil-davis committed Mar 12, 2019
1 parent 42a3a8b commit c9672b7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -384,8 +384,17 @@ vendor-bin/phan/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/phan/compo
vendor-bin/phan/composer.lock: vendor-bin/phan/composer.json
@echo phan composer.lock is not up to date.

# The first line of "php --version" output looks like:
# PHP 7.2.16-1+ubuntu18.04.1+deb.sury.org+1 (cli) (built: Mar 7 2019 20:23:29) ( NTS )
# We want the 2nd "word", then the first 2 numbers separated by the dot
PHP_MINOR_VERSION = $(shell php --version | head -n 1 | cut -d' ' -f2 | cut -d'.' -f1-2)

vendor-bin/phpstan/vendor: vendor/bamarni/composer-bin-plugin vendor-bin/phpstan/composer.lock
ifeq "$(PHP_MINOR_VERSION)" "7.0"
@echo "phpstan is not supported on PHP 7.0 so it is not being installed"
else
composer bin phpstan install --no-progress
endif

vendor-bin/phpstan/composer.lock: vendor-bin/phpstan/composer.json
@echo phpstan composer.lock is not up to date.
Expand Down

0 comments on commit c9672b7

Please sign in to comment.