Skip to content

Regression: run-script and composer-test no longer includes "vendor/bin" #3820

@Krinkle

Description

@Krinkle

I updated from 1.0.0-alpha9 825b4b9 to b8ac790 today and most project builds are failing due to vendor/bin no longer being part of the subshell path that composer run-script and composer test use.

Code like the following worked for over a year until this week:

{
    "require-dev": {
        "jakub-onderka/php-parallel-lint": "0.8.*",
        "phpunit/phpunit": "3.7.*",
        "squizlabs/php_codesniffer": "1.*"
    },
    "scripts": {
        "test": [
            "parallel-lint --exclude vendor .",
            "phpunit",
            "phpcs . --standard=./test/codesniffer --ignore=vendor/* --tab-width=4"
        ]
    }
}

Affecting local builds, Jenkins, and Travis CI. Afaik this is documented behaviour according to https://getcomposer.org/doc/articles/scripts.md#writing-custom-commands. And matches npm's behaviour (https://docs.npmjs.com/misc/scripts#path) which I imagine its inspired by..

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions