Skip to content

Composer

Marko Korhonen edited this page Feb 21, 2023 · 5 revisions

Composer related targets are defined in composer.mk.

This file is included IF $(COMPOSER_JSON_PATH)/composer.json exists

Project specific additional install target

Sometimes a project might have an additional Composer installation. E.g. SimpleSAMLphp which cannot be in the same composer.json with the projects (dependency conflicts).

That time you might wanna introduce custom target like this:

PHONY += simplesamlphp-build
simplesamlphp-build: COMPOSER_JSON_PATH := simplesamlphp
simplesamlphp-build: ## Build SimpleSAMLphp
	$(call step,Do Composer install for SimpleSAMLphp...)
	$(call composer,install)

Which will execute this:

printf "\n⚡ \033[0;33mDo Composer install for SimpleSAMLphp...\033[0m\n\n"
docker compose exec app sh -c "composer --ansi --working-dir=simplesamlphp install"
Clone this wiki locally