Search code examples
phpwindowshookdredd

Error with dredd hooks on Windows


I try use dredd with symfony on windows PC.

i do next: i create folder dredd in symfony poject

app dredd src vendor e.t.c

in symfony composer.json i add

"ddelnano/dredd-hooks-php":"dev"

Next step, i create this dredd.yml

dry-run: null
hookfiles: ./hooks.php
language: php
sandbox: false
server: null
server-wait: 3
init: false
custom:
  apiaryApiKey: 'apikey '
  apiaryApiName: 'apiname'
names: false
only: []
reporter: apiary
output: []
header: []
sorted: false
user: user:pass
inline-errors: true
details: true
method: []
color: true
level: info
timestamp: true
silent: false
path: []
hooks-worker-timeout: 5000
hooks-worker-connect-timeout: 1500
hooks-worker-connect-retry: 500
hooks-worker-after-connect-wait: 100
hooks-worker-term-timeout: 5000
hooks-worker-term-retry: 500
hooks-worker-handler-host: localhost
hooks-worker-handler-port: 61321
config: ./dredd.yml
blueprint: test.apib
endpoint: 'someendpoint'
and another needed file.

and dredd response

error: PHP hooks handler command not found: dredd-hooks-php Install php hooks handler by running: $ composer require ddelnano/dredd-hooks-php --dev

Why it does not work? What am I doing wrong?

P.S. sorry for my english.


Solution

  • As of now, Dredd is not officially supported on Windows. However, it should install and should work well as far as you don't need other than JavaScript hooks. Any other hooks do not work at the moment.

    Support for Windows is on the roadmap though - https://github.com/apiaryio/dredd/issues/204