Skip to content

Commit

Permalink
Merge pull request #496 from City-of-Helsinki/update-configuration
Browse files Browse the repository at this point in the history
Automatic update
  • Loading branch information
rpnykanen authored Aug 30, 2023
2 parents 8802316 + 2619213 commit cf96c97
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 41 deletions.
65 changes: 34 additions & 31 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion conf/cmi/views.view.redirect.yml
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ display:
type: basic
options:
submit_button: Filter
reset_button: false
reset_button: true
reset_button_label: Reset
exposed_sorts_label: 'Sort by'
expose_sort_order: true
Expand Down
10 changes: 7 additions & 3 deletions tools/make/qa.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ TEST_TARGETS += test-phpunit
FIX_TARGETS :=
LINT_PHP_TARGETS :=
CS_INSTALLED := $(shell test -f $(COMPOSER_JSON_PATH)/vendor/bin/phpcs && echo yes || echo no)
CS_CONF_EXISTS := $(shell test -f phpcs.xml.dist && echo yes || echo no)
TESTSUITES ?= unit,kernel,functional

PHONY += fix
Expand Down Expand Up @@ -57,10 +58,13 @@ define test_result
@echo "\n${YELLOW}${1}:${NO_COLOR} ${GREEN}${2}${NO_COLOR}"
endef

ifeq ($(CS_INSTALLED),yes)
ifeq ($(CS_INSTALLED)-$(CS_CONF_EXISTS),yes-yes)
define cs
$(call docker_compose_exec,vendor/bin/$(1) --config-set installed_paths $(CS_STANDARD_PATHS))
$(call docker_compose_exec,vendor/bin/$(1) --standard=$(CS_STANDARDS) --extensions=$(CS_EXTS) --ignore=node_modules $(2))
$(call docker_compose_exec,$(1))
endef
else ifeq ($(CS_INSTALLED)-$(CS_CONF_EXISTS),yes-no)
define cs
$(call docker_compose_exec,$(1) --standard=$(CS_STANDARDS) --extensions=$(CS_EXTS) --ignore=node_modules $(2))
endef
else
define cs
Expand Down
12 changes: 6 additions & 6 deletions tools/make/symfony.mk
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
SF_FRESH_TARGETS := up build sf-cw sf-about sf-open
FIX_TARGETS += fix-symfony
LINT_PHP_TARGETS += lint-symfony
CS_FIXER_INSTALLED := $(shell test -f $(COMPOSER_JSON_PATH)/vendor/bin/php-cs-fixer && echo yes || echo no)

PHONY += encore-dev
encore-dev: ## Do Encore development build
Expand Down Expand Up @@ -49,13 +50,12 @@ fresh: ## Build fresh development environment
PHONY += fix-symfony
fix-symfony: ## Fix Symfony code style
$(call step,Fix Symfony code style...\n)
$(call docker_compose_exec,PHP_CS_FIXER_IGNORE_ENV=1 vendor/bin/php-cs-fixer fix --diff --ansi)
$(call cs_symfony,fix --ansi src)

PHONY += lint-symfony
lint-symfony: PATHS := src
lint-symfony: ## Lint Symfony code style
$(call step,Lint Symfony code style...\n)
$(call cs_symfony,$(PATHS))
$(call cs_symfony,fix --dry-run --diff --ansi src)

ifeq ($(RUN_ON),docker)
define sf_console
Expand All @@ -67,12 +67,12 @@ define sf_console
endef
endif

ifeq ($(CS_INSTALLED),yes)
ifeq ($(CS_FIXER_INSTALLED),yes)
define cs_symfony
$(call docker_compose_exec,vendor/bin/phpcs --ignore=node_modules $(1))
$(call docker_compose_exec,vendor/bin/php-cs-fixer $(1))
endef
else
define cs_symfony
$(call warn,CodeSniffer is not installed!)
$(call warn,PHP CS Fixer is not installed!)
endef
endif

0 comments on commit cf96c97

Please sign in to comment.