server-command icon indicating copy to clipboard operation
server-command copied to clipboard

Passthrough args via `--`?

Open lkraav opened this issue 6 years ago • 2 comments

Feature Request

Describe your use case and the problem you are facing

I want to load Xdebug module into the web server via php -S -dzend_extension=xdebug.so.

Describe the solution you'd like

wp server could pass through additional arguments to php after -- argument.

Example: wp server --docroot=public -- -dzend_extension=xdebug.so

Doing this via wp server --config argument is problematic, because I want to define universally usable commands centrally in composer.json scripts. Due to variety of INI configuration file locations on user's system, which we actually don't want to replace, this doesn't seem to be achievable with a single --config argument.

lkraav avatar Oct 25 '19 08:10 lkraav

Sounds like a reasonable use case.

schlessera avatar Nov 12 '19 01:11 schlessera

In the meanwhile, I discovered it's possible to successfully set up both regular and Xdebug configurations in PhpStorm, by inspecting wp server command line in the process list, and using that to configure wp-cli embedded router in PhpStorm PHP interpreter panel.

But still, that passthrough argument would be nice to have for cross-IDE, -platform etc purposes.

lkraav avatar Nov 13 '19 16:11 lkraav