Skip to content
This repository has been archived by the owner on Jan 10, 2020. It is now read-only.

Uncaught exception "Routes must be provided as an array..." #30

Closed
PipStyles opened this issue Jan 27, 2015 · 0 comments
Closed

Uncaught exception "Routes must be provided as an array..." #30

PipStyles opened this issue Jan 27, 2015 · 0 comments

Comments

@PipStyles
Copy link

(Windows 7, WAMP running locally, PHP 5.5.12)

I have a fresh install of Apigility. Having made a small number of DB-connected REST services in the Admin (worked fine), attempting to try out a basic deployment, I've run vendor/bin/zfdeploy.php build api.zip which yields:

Warning: include(C:\<PATH TO MY LOCAL SERVER ROOT>\<my app folder>\apigility\vendor\bi
n/../config/routes.php): failed to open stream: 
No such file or directory in C:\<PATH TO MY LOCAL SERVER ROOT>\<my app folder>\apigility\vendor\bin\zfdeploy.php on line 31

InvalidArgumentException: Routes must be provided as an array or Traversable object in 
C:\<PATH TO MY LOCAL SERVER ROOT>\<my app folder>\apigility\vendor\zfcampus\zf-console\src\Application.php
on line 91

(exact paths redacted ^)

In fact, just running vendor/bin/zfdeploy.php to check zf-deploy is installed ok is giving me that.

Seems like vendor/config/routes.php is not being found, though that seems like an odd place for it to look for that as routes.php actually resides in vendor/zfcampus/zf-deploy.

Previewing the API locally in Chrome>Postman works fine, so I think the issue is with zfdeploy or zf-console. Zfdeploy has previously worked for me, but now from a completely fresh installation, it refuses to build.

UPDATE: running zf-deploy in vendor/zfcampus/zf-deploy/bin WORKS, so this appears to be an issue with running it from vendor/bin.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant