Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
vendor/
.phpunit.result.cache
32 changes: 32 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
.RECIPEPREFIX =
.DEFAULT_GOAL := help

COMPOSER :=$(shell which composer | grep -o composer)

.PHONY: help
help:
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'

.PHONY: composer
composer: ## Composer install task
ifeq ($(COMPOSER),composer)
@COMPOSER_ALLOW_SUPERUSER=1 composer install --no-scripts
else
@echo 'composer not found!'
endif

.PHONY: test
test: composer phpunit ## Test task: composer, phpunit

.PHONY: phpunit
phpunit: ## PHPUnit
@COMPOSER_ALLOW_SUPERUSER=1 ./vendor/bin/phpunit spec

.PHONY: composer-upgrade
composer-upgrade:
ifeq ($(COMPOSER),composer)
@COMPOSER_ALLOW_SUPERUSER=1 composer upgrade --no-scripts
else
@echo 'composer not found!'
endif

4 changes: 2 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@
}
],
"require": {
"php": ">=5.6.0"
"php": ">=7.4"
},
"require-dev": {
"phpunit/phpunit": "~4.0"
"phpunit/phpunit": "^9"
},
"autoload": {
"psr-0": {
Expand Down
Loading