Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/239.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 在预期输出目录下的目录中推进构建模型_Php_Propel - Fatal编程技术网

Php 在预期输出目录下的目录中推进构建模型

Php 在预期输出目录下的目录中推进构建模型,php,propel,Php,Propel,我在根目录中的spreep.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

我在根目录中的spreep.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/prople/propelschema/schema.xml
中有以下内容:

<database name="default" defaultIdMethod="native" namespace="Propel\Model" defaultPhpNamingMethod="underscore">
当我运行./spreep model:build时,我希望模型是在
/gateway/spreep/model
中构建的,但是它们是在
/gateway/spreep/model/spreep/model
中构建的,但是在文件中具有正确的命名空间

我不知道这里发生了什么,所以任何事情都会很好


如果需要,可以提供更多详细信息。

在schema.xml中,使用\spreep\Model而不是spreep\Model。这是一个具有多个PRs的已知错误

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