neronmoon / scriptsdev

Scripts-dev directive for composer

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Question] Support scripts-descriptions

hanovruslan opened this issue · comments

Hi! Thanks again for this very useful composer plugin!

But i have an other one question (problem?): Lately composer got nice feature "scripts-descriptions" but i found that composer validate fires warning on scripts related to dev env

{
    "extra": {
        "branch-alias": {
            "dev-master": "1.0-dev"
        },
        "scripts-dev": {
            "dev-script": [
                "@composer update --no-scripts nothing",
                "@composer check-platform-reqs",
                "@composer validate --strict"
            ]
        }
    },
    "scripts-descriptions": {
        "dev-script": "Do dev stuff"
    }
}

and i wonder does this behavior depends on scriptdev plugin only or not not at all ? Or partly ?

Hey

You're right, scriptsdev causing warnings like this on validation.

./composer.json is valid, but with a few warnings
See https://getcomposer.org/doc/04-schema.md for details on the schema
Description for non-existent script "test" found in "scripts-descriptions"

Currently, due to implementation of composer validate command and ConfigValidator i can't fix this.
You can see implementation here. ConfigValidator architecture doesn't provide an opportunity to intervene in the file validation process

Thank you for pointing this out. I'll put a comment into known issues section in readme