Skip to content

Overwriting php location causes console errors that --php is not a valid options #465

@paul999

Description

@paul999

Since #444 there is an option to provide a php binary location. If you are using this option, at least on macOS to overwrite your binary location for php version, this causes a
error from the symfony console that --php doesn't exists.

Without php binary, the following args are added:
[ '--target=/Users/paulsohier/PhpstormProjects/filament_uno/var/cache/fosRoutes.tmp.json', '--format=json' ]

With php binary added as option, it is:
[ '--target=/Users/paulsohier/PhpstormProjects/filament_uno/var/cache/fosRoutes.tmp.json', '--format=json' ]

which causes:

Error: Command failed: /opt/homebrew/bin/php bin/console fos:js-routing:dump --target=/Users/paulsohier/PhpstormProjects/filament_uno/var/cache/fosRoutes.tmp.json --php=/opt/homebrew/bin/php --format=json

                                      
  The "--php" option does not exist.  
                                      

fos:js-routing:dump [--callback CALLBACK] [--format FORMAT] [--target [TARGET]] [--locale [LOCALE]] [-p|--pretty-print] [--domain [DOMAIN]]


    at ChildProcess.exithandler (node:child_process:419:12)
    at ChildProcess.emit (node:events:512:28)
    at maybeClose (node:internal/child_process:1098:16)
    at ChildProcess._handle.onexit (node:internal/child_process:304:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: '/opt/homebrew/bin/php bin/console fos:js-routing:dump --target=/Users/paulsohier/PhpstormProjects/filament_uno/var/cache/fosRoutes.tmp.json --php=/opt/homebrew/bin/php --format=json',
  stdout: '',
  stderr: '\n' +
    '                                      \n' +
    '  The "--php" option does not exist.  \n' +
    '                                      \n' +
    '\n' +
    'fos:js-routing:dump [--callback CALLBACK] [--format FORMAT] [--target [TARGET]] [--locale [LOCALE]] [-p|--pretty-print] [--domain [DOMAIN]]\n' +
    '\n'
}

I do believe the php option shouldn't be included in args if the php binary is overwritten.

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