Closed adaniloff closed 1 year ago
Hello @adaniloff
Havent had the time to play with the provided repo, but from the grumphp file I can tell that you need to provide additional environment variables; You can do so either by adding them to grumphp.yaml or to your docker container:
More info:
By running grumphp -v
, you can see the paths that got detected automatically:
$ ./vendor/bin/grumphp -v
Config file: /Users/xxxx/grumphp.yml
Working dir: /Users/xxxx
Project dir: /Users/xxxx
GIT working dir: /Users/xxxx
GIT repository dir: /Users/xxxx/.git
Bin dir: /Users/xxxx/vendor/bin
Composer file: /Users/xxxx/composer.json
You can overwrite these paths by setting env vars:
GRUMPHP_PROJECT_DIR=...
GRUMPHP_GIT_WORKING_DIR=....
GRUMPHP_GIT_REPOSITORY_DIR=...
GRUMPHP_COMPOSER_DIR=...
GRUMPHP_BIN_DIR=...
PATH=/additional/bin/dirs:$PATH
SInce you are using docker, you can hardcode these to absolute paths in docker-compose.yaml right?
Closing this one because of inactivity If the issue still persists - feel free to reopen and provide some additional context.
Note: the configuration is quite hard (exotic infrastructure, in containers) to explain, we made a reproducer just for you: https://github.com/NazarioR9/grumphp-exoctic-issue. Check the readme and after cloning and a few commands you should be able to reproduce the issue (reproducer made & tested on a linux env).
My configuration
Steps to reproduce:
services: app_php: container_name: app_php restart: unless-stopped volumes:
Your actions
Run GrumPHP:
docker-compose exec app_php bin/dev/grumphp run
Result:
Hint: The file exists from the projet's path (
/home/username/projects/exotic-project
), but grumphp seems to try to get if from the application path (/home/username/projects/exotic-project/api
), thus we get the previous error message.