Skip to content
Advertisement

How to make propel build models with namespaces in the right directory?

Default directory for my classes is: app/

Composer autoload config is:

JavaScript

On propel’s schema.xml my namespace is "AppModels"

JavaScript

My propel.php.dist is:

JavaScript

When I execute vendor/bin/propel model:build the resulting structure is like this:

JavaScript

I need the structure to be like this:

JavaScript

I tried every combination in this manual: Database Attributes

Is there a different way to approach this?

Thanks in advance.

Advertisement

Answer

The configuration specified in the question looks correct, except for one thing that is missing, which made it work in my case: set namespaceAutoPackage to false. In the case of the question’s php configuration file, that looks like this:

JavaScript
User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement