Can composer add/set/get every schema element via cli?

8 views
Skip to first unread message

hanov.ru...@gmail.com

unread,
Nov 6, 2018, 2:43:34 AM11/6/18
to composer-dev
Can composer add/set/get every schema element via cli?

For now it is possible to set repos, extra, deps and dev-deps

I think it will be very usefull to modify any element of composer.json file

Marco Pivetta

unread,
Nov 6, 2018, 9:41:24 AM11/6/18
to compos...@googlegroups.com
What is the purpose of such a feature? This is generally feasible via json manipulation CLI tools like `jq`.


--
--
You received this message because you are subscribed to the "composer-dev" group.
To post to this group, send email to compos...@googlegroups.com
To unsubscribe from this group, send email to
composer-dev...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/composer-dev?hl=en

---
You received this message because you are subscribed to the Google Groups "composer-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to composer-dev...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Ruslan Hanov

unread,
Nov 7, 2018, 3:31:19 AM11/7/18
to compos...@googlegroups.com
The purpose is to have ability to bootstrap json file with all of available schema elements

For me these are
 - autoload
 - autoload-dev
 - extra. Some sub elements of this may contains arbitrary values maps (for example https://github.com/thecodingmachine/nodejs-installer/blob/1.0/README.md nodejs.version) and for now only two levels is available to control via `composer config`

 `composer config extra.first.second value`

add to json

```
"extra": {
  "first": {
    "second": "value"
  }
}
```

вт, 6 нояб. 2018 г. в 17:41, Marco Pivetta <ocra...@gmail.com>:

Marco Pivetta

unread,
Nov 7, 2018, 3:36:39 AM11/7/18
to compos...@googlegroups.com
Again: use jq
Reply all
Reply to author
Forward
0 new messages