Phalcon 4 dev tools cannot generate controller

when i tried to use the command : phalcon controller <name> it threw an error like this Phalcon DevTools (4.0.1)

Error: Builder can't locate the configuration file



3.3k

did you move /app/config/config.php?

What is your Phalcon version?

I did not move any files.

What is your Phalcon version? Phalcon 4.x



3.3k

check the phalcon version used in php CLI

php -r "var_dump(Phalcon\Version::get());"


3.3k

sorry for the late response

i'm actually using v3 at the moment and i had to match your environment and i was using osx at first and then i had another crack at it with another device which was windows and finally i got the same exception

it is a bug on windows environment

file: src/Builder/Path.php line: 63

change it to

if (preg_match('/config\.php$/i', $f->getPathName())) {

or

if (preg_match('/config\.php$/i', $f->getFilename())) {