Skip to content

InputTask does not wait user input via composer task scripts #1776

Open
@dragomano

Description

@dragomano

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:

sshot-13

vendor/bin/phing:

sshot-14

Additional context
Phing 3.0.0-rc6
Composer 2.6.5
PHP 8.2.13

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions