Currently Zephir forces fixed directory structure that may lead to some perfectionist starvation:
Zephir forces to replicate namespace structure as directories, forcing developer to have extra complexity in their project and preventing from placing .zep files right next to their PHP counterparts
Zephir forces sources location next to config.json (while most projects store their configuration in root, and sources under src/lib/name it directory)
Zephir places ext directory next to sources, which is usually unwanted (usually build directory stands aside from project sources, and it's name may vary)
So i suggest to add paths configuration option with following children:
sources: tells Zephir where source files are located. If set, it is implied that directory specified in sources contains namespace specified in namespace, so if i have namespace AmaTeam\Utilities, paths.sources equal to src and file src/Strings.zep, class FQCN would be AmaTeam\Utilities\Strings. If not set, Zephir continues to act as now.
build: tells Zephir where to execute the build, defaulting to ext relative to config.json
Hi!
Currently Zephir forces fixed directory structure that may lead to some perfectionist starvation:
So i suggest to add
paths
configuration option with following children:sources
: tells Zephir where source files are located. If set, it is implied that directory specified insources
contains namespace specified innamespace
, so if i have namespaceAmaTeam\Utilities
,paths.sources
equal tosrc
and filesrc/Strings.zep
, class FQCN would beAmaTeam\Utilities\Strings
. If not set, Zephir continues to act as now.build
: tells Zephir where to execute the build, defaulting toext
relative to config.jsonlogs
: self-explanatorytmp
: self-explanatory