uecode / qpush-bundle

Asynchronous processing for Symfony using Push Queues
qpush-bundle.readthedocs.org
Apache License 2.0
168 stars 54 forks source link

Windows command line #112

Closed scottgutman closed 8 years ago

scottgutman commented 8 years ago

Hello, I am using a Windows 10 dev machine and can run php from windows cmd console. When I run the following command from the command line I get an error: C:\PhpstormProjects\dir>php app/console uecode:qpush:publish director '{"message":"message"}'

[Symfony\Component\Debug\Exception\ContextErrorException]
Catchable Fatal Error: Argument 1 passed to Uecode\Bundle\QPushBundle\Provider\AwsProvider::publish() must be of the type array, null given, called in C:\PhpstormProjects\dir\vendor\uecode\qpush-bundle\src\Command\QueuePublishCommand.php on line 95 and defined

When I run the same command from a git bash shell, the command works perfectly. Do you know how I can make it work for windows? I know that the json is not being interpreted as a single string.

scottgutman commented 8 years ago

Nevermind I just figured it out from this: http://stackoverflow.com/questions/28648473/windows-curl-with-json-data-on-the-command-line. Windows's cmd doesn't support strings with single quotes. Use " in-place of ' and escape the inner ones with \".
For example: php app/console uecode:qpush:publish director "{\"message\":\"message\"}"