在低于预期输出目录的目录中推进构建模型


propel building models in directories below expected output dir

我在propel中有以下设置。Yml目录:

propel:
  paths:
    # The directory where Propel expects to find your `schema.xml` file.
    schemaDir: ./gateway/Propel/propelschema
    # The directory where Propel should output generated object model classes.
    phpDir: ./gateway/Propel/Model
    # The directory where Propel should output the compiled runtime configuration.
    phpConfDir: ./gateway/Propel
    # The directory where Propel should output the generated migrations.
    migrationDir: ./gateway/Propel/Migrations
    # The directory where Propel should output the generated DDL (or data insert statements, etc.)
    sqlDir: ./gateway
  database:
    connections:
      ...

我在gateway/Propel/propelschema/schema.xml中有以下内容:

<database name="default" defaultIdMethod="native" namespace="Propel'Model" defaultPhpNamingMethod="underscore">

这个条目在我的composer.json:

"autoload": {
  "psr-4": {
    "App''": "app/",
    "Gateway''": "gateway/",
    "Propel''Model''": "gateway/Propel/Model"
  },
  "classmap": [
    "database/"
  ]
}

当我运行。/propel model:build时,我希望模型在./gateway/Propel/Model中构建,但是它们正在./gateway/Propel/Model/Propel/Model中构建,但在文件中具有正确的命名空间…

不知道这里发生了什么,所以任何一个都很棒。

可根据需要提供进一步的细节。

在schema.xml中,使用'Propel'Model而不是Propel'Model。