Use overriden composer bin-dir if it exists

Issue information

From user: dimitriskr

Related to !423 (merged)

Contribution record

Fork management

Problem/Motivation

A project might have a different bin-dir for its executables (phpcs/phpstan). Check if it exists in the project's composer and use this path for jobs
https://getcomposer.org/doc/06-config.md#bin-dir

Steps to reproduce

Add the following to the composer.json of a project

    "config": {
        "bin-dir": "custom/path/to/bin"
    }

Get the following error
sudo: vendor/bin/phpunit: command not found

Proposed resolution

  1. Change scripts/expand_composer_json.php to check for this [no]
  2. OR create a symlink to the custom path from ./vendor/bin [no]
  3. OR create a variable to hold the full path to the custom directory [yes]
Edited by drupalbot
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information