fix(php): let +phpunit-docker-compose-mode be disabled (#5648)
This commit is contained in:
parent
3e89872e8c
commit
9aba0aea23
2 changed files with 15 additions and 4 deletions
|
@ -9,6 +9,9 @@
|
|||
(defvar +php-default-docker-compose "docker-compose.yml"
|
||||
"Path to docker-compose file.")
|
||||
|
||||
(defvar +php-run-tests-in-docker nil
|
||||
"Whether or not to run tests in a docker environment")
|
||||
|
||||
(after! projectile
|
||||
(add-to-list 'projectile-project-root-files "composer.json"))
|
||||
|
||||
|
@ -164,8 +167,12 @@
|
|||
:files ("composer.json"))
|
||||
|
||||
(def-project-mode! +phpunit-docker-compose-mode
|
||||
:when +php-run-tests-in-docker
|
||||
:modes '(php-mode docker-compose-mode)
|
||||
:files (and "phpunit.xml" (or +php-default-docker-compose "docker-compose.yml"))
|
||||
:on-enter
|
||||
(setq phpunit-args `("exec" ,+php-default-docker-container "php" "vendor/bin/phpunit")
|
||||
phpunit-executable (executable-find "docker-compose")))
|
||||
phpunit-executable (executable-find "docker-compose"))
|
||||
:on-exit
|
||||
(setq phpunit-args nil
|
||||
phpunit-executable nil))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue