Skip to content

Unable to run commands through php -a #58993

Closed as not planned
Closed as not planned
@f2h2h1

Description

@f2h2h1

Symfony version(s) affected

6.4

Description

Unable to run commands through php -a in git for windows bash

How to reproduce

The following command will not have output

username@host MINGW64 /c/dev
php -a <<- 'EOF'
    require __DIR__.'/vendor/autoload.php';
    $application = new \Symfony\Component\Console\Application();
    $application->run();
EOF

Possible Solution

try changing it to this way

username@host MINGW64 /c/dev
php -a <<- 'EOF'
    require __DIR__.'/vendor/autoload.php';
    $application = new \Symfony\Component\Console\Application();
    putenv('COLUMNS=80');
    putenv('LINES=50');
    $application->run();
EOF

Additional Context

Tested environment

  • OS: windows 11
  • PHP: 8.1.26 NTS x64
  • Docker: NO
  • Shell: Bash
  • Symfony version: 6.4

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