phing
phing copied to clipboard
InputTask does not wait user input via composer task scripts
Describe the bug My build has a simple input with InputTask:
<?xml version="1.0" encoding="UTF-8" ?>
<project name="Test" default="build">
<target name="build">
<input message="What is your release type?" propertyName="release.type" defaultValue="thesame" validargs="thesame,major,minor,bugfix" />
<echo message="Release type: ${release.type}" />
</target>
</project>
When I am running "vendor/bin/phing" via composer script - composer run build
, user input does not work, it's skipped.
Steps To Reproduce
Add "vendor/bin/phing" to composer scripts
section:
{
"require-dev": {
"phing/phing": "3.*"
},
"minimum-stability": "alpha",
"scripts": {
"build": "vendor/bin/phing"
}
}
Then run composer run build
in your console.
Expected behavior
I want to get the same result from both commands: composer run build
and vendor/bin/phing
.
Screenshots / terminal output
composer run build
:
vendor/bin/phing
:
Additional context Phing 3.0.0-rc6 Composer 2.6.5 PHP 8.2.13
I'm unable to reproduce this (PHP 8.3.1). Phing prompts in both cases.
It's not a matter of whether it prompts or not, it's a matter of whether it waits for the user's response (input) in one case, and just automatically selects the default answer and completes the input itself without waiting for the user in the other case.
That's what I mean, in both cases I get a prompt which waits for input.
There must be a problem with something else. For example, in Windows.
Could be. I don't have access to a Windows machine so I can't confirm that (or write a fix).