Skip to content

Comments

Add passthrough arguments to PHP binary via -- separator#90

Open
Copilot wants to merge 7 commits intomainfrom
copilot/add-passthrough-args-support
Open

Add passthrough arguments to PHP binary via -- separator#90
Copilot wants to merge 7 commits intomainfrom
copilot/add-passthrough-args-support

Conversation

Copy link
Contributor

Copilot AI commented Nov 10, 2025

Implementation Plan: Passthrough Arguments via --

  • Explore repository structure and understand current implementation
  • Modify Server_Command.php to capture and handle passthrough arguments after --
  • Update command documentation with the new passthrough feature
  • Add Behat tests to verify passthrough arguments work correctly
  • Address review feedback:
    • Update test to actually verify the passthrough arg was applied (outputs memory_limit value)
    • Remove dead code (-- check in loop), simplify with str_repeat + array_merge
    • Add @param annotations for $args and $assoc_args
Original prompt

This section details on the original issue you should resolve

<issue_title>Passthrough args via --?</issue_title>
<issue_description>## 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.</issue_description>

Comments on the Issue (you are @copilot in this section)

@schlessera Sounds like a reasonable use case.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI self-assigned this Nov 10, 2025
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Copilot AI changed the title [WIP] Add support for passthrough args via '--' in wp server Add passthrough arguments to PHP binary via -- separator Nov 10, 2025
Copilot AI requested a review from swissspidy November 10, 2025 18:46
@codecov
Copy link

codecov bot commented Nov 10, 2025

Codecov Report

❌ Patch coverage is 0% with 15 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/Server_Command.php 0.00% 15 Missing ⚠️

📢 Thoughts on this report? Let us know!

@swissspidy swissspidy requested a review from Copilot November 10, 2025 20:59

This comment was marked as resolved.

@swissspidy swissspidy marked this pull request as ready for review November 10, 2025 21:04
@swissspidy swissspidy requested a review from a team as a code owner November 10, 2025 21:04
@swissspidy swissspidy added the command:server Related to 'server' command label Nov 10, 2025
@swissspidy

This comment was marked as resolved.

gemini-code-assist[bot]

This comment was marked as resolved.

@swissspidy swissspidy added this to the 2.0.17 milestone Jan 22, 2026
Co-authored-by: swissspidy <841956+swissspidy@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

command:server Related to 'server' command

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Passthrough args via --?

2 participants