phalcon / phalcon-devtools

Phalcon Developer Tools
https://docs.phalcon.io/latest/en/devtools
Other
1.33k stars 630 forks source link

"Option namespace hasn't been defined" on generating model #1491

Closed flyingangel closed 3 years ago

flyingangel commented 3 years ago

Error Option namespace hasn't been defined when generating a class with constraint relation.

There's 2 typos errors in the file Model.php

Used if ($this->modelOptions->getOption('namespace')) instead of if ($this->modelOptions->hasOption('namespace'))

A quick, dirty fix is to put --namespace="" in the command line

Devtool tag 4.0.5

BeMySlaveDarlin commented 3 years ago

Fixed check behavior for namespace and abstract options on model creation

Jeckerson commented 3 years ago

Fixed in #1494