Skip to content

Docker is preferred over global php & phpunit (and also doesn't work out-of-the-box) #117

@sm11963

Description

@sm11963

Repro

  1. Patch Fix ComposerDriver isInstalled falsy check #116 OR order ComposerDriver to the end of the list
  2. Only have php installed globally.
  3. Only have phpunit globally available in PATH (for me this is in ~/bin/phpunit)
  4. Have docker installed on your machine
  5. Try to run tests with the extension

Outcome

Test run failed with output:

 *  Executing task: docker run --rm -t -v ${pwd}:/app -w /app php php phpunit --colors=always --filter 'MathExpressionTest' '/app/modules/tests/MathExpressionTest.php' 

docker: invalid spec: :/app: empty section between colons.
See 'docker run --help'.

 *  The terminal process "/bin/zsh '-l', '-c', 'docker run --rm -t -v ${pwd}:/app -w /app php php phpunit --colors=always --filter 'MathExpressionTest' '/app/modules/tests/MathExpressionTest.php''" failed to launch (exit code: 125). 
 *  Terminal will be reused by tasks, press any key to close it. 

Expected outcome

Tests run successfully given I have php and phpunit globally available.

OR the docker command executes successfully, that would also work - but I would kind of expect global values to be used before docker. Especially since I see that some docker config is deprecated.

Logs / output / settings

Settings all at default if you applied #116, otherwise, you need to set ComposerDriver to the end of the order.

Environment Values
Extension version 4.16.1 with #116
Operating system MacOs 14.6.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions