Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Console - make:subscriber - interactive mode autocomplete - bug #26321

Closed
@ybenhssaien

Description

@ybenhssaien
Q A
Bug report? yes
Feature request? no
BC Break report? no
RFC? no
Symfony version 4.0.4

Description :

Using the command make:subscriber with an event suscriber kernel.controller on the interactive mode (Responding to the 'What event do you want to subscribe to?' question).
Submited : kernel.controller
Result : kernel.controller_arguments

Console :

image

Result :

image

Bug caused by :

When puting an Enter character on the console, a last check is made to verify even the character is a new line \n or a tabulation \t, then choose the returned autocomplete from the matches array with an $ofs = 0 which return $matches[0] = 'kernel.controller_arguments on the following lines :

}
} elseif (ord($c) < 32) {
if ("\t" === $c || "\n" === $c) {
if ($numMatches > 0 && -1 !== $ofs) {
$ret = $matches[$ofs];

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions