Symfony 4 Composer scripts Symfony 4 Composer scripts symfony symfony

Symfony 4 Composer scripts


It's as Cerad says. auto-script is parsed by Symfony/Flex and the "right side" of a command:executable pair is processed by this switch-case.

switch ($type) {    case 'symfony-cmd':        return $this->expandSymfonyCmd($cmd);    case 'php-script':        return $this->expandPhpScript($cmd);    case 'script':        return $cmd;

Therefore Composer documentation can not say a word about that as it is Symfony-specific.

Personally don't like the mixing of standard Composer sections with custom ones on the composer.json root level. It simply confuses me and draws me into silent Composer documentation.Also the naming itself, auto-script, should be better. Something less magic and more self-explanatory, like flex-script.


I guess it uses extra configuration located in composer.json

"extra": {    "symfony-app-dir": "app",    "symfony-web-dir": "web",    "symfony-var-dir": "var",    "symfony-bin-dir": "bin",    "symfony-tests-dir": "tests",    ...},

Few days ago when I was migrating an application from 2.8 to 3.4, I had some trouble with these definitions.

I also had to clear composer's cache.