[wp-trac] [WordPress Trac] #63912: Make Composer available via npm run on host machine
WordPress Trac
noreply at wordpress.org
Tue Sep 2 21:19:21 UTC 2025
#63912: Make Composer available via npm run on host machine
------------------------------+-----------------------------
Reporter: paulbonneau | Owner: (none)
Type: enhancement | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version: trunk
Severity: trivial | Keywords: has-patch
Focuses: |
------------------------------+-----------------------------
== Context
Working on a ticket on my `wordpress-develop` cloned instance, I wanted to
lint and format my code but :
* I couldn't find the command in composer.json in order to do so;
* I didn't want to install composer nor phpcs on my host machine because
those tools are already available in the container spawned.
== Solutions
To lint my code I used this command : `node ./tools/local-
env/scripts/docker.js run -T --rm php composer lint [my_file]`
@SirLouen suggested to create a new custom script in `package.json`
enabling developers to directly invoke the composer instance of the
`wordpressdevelop/php` container from their host machine. Implementing
this will simplifies future call to composer specific scripts from host
machine (linting, formating etc ...).
You will find the modified `package.json` in the attached .diff and the PR
related to this ticket.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/63912>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list