symfony 的 propel admin 生成器错误
我正在开发一个基于现有 mysql 数据库的 symfony 项目,并从中生成了 shcema.yml。创建的第一个应用程序是后端。 但是当我尝试使用命令添加模块时
$ php symfony propel:generate-admin backend <ClassName> --module=<classname>
,当我尝试访问此后端模块的 url (http://localhost/project/web/backend_dev.php/<'classname>) 时,会抛出此错误:
致命错误:在.../www/proeject/apps/backend/modules/<'classname>/lib/<'classname>GeneratorConfiguration.class.php 中找不到类'Base<'ClassName>GeneratorConfiguration'第 12 行
我在其他项目(例如 jobeet 教程)中进行了搜索,并且在此文件中没有定义类。
编辑:
我认为错误是因为 symfony 找不到类 Base
,它是
的父类。所以我认为问题是我没有在项目中正确定位这个类。你知道我是否必须应用一些插件或从命令行调用一些任务来解决这个问题?
/编辑
你知道发生了什么吗?也许我在生成后端模块之前忘记声明一些东西......
i'm working on a symfony project based on an existing mysql database, and i generated the shcema.yml from it.The first app created is the backend.
But when i try to add a module with the command
$ php symfony propel:generate-admin backend <ClassName> --module=<classname>
so when i try to access to the url of this backend module (http://localhost/project/web/backend_dev.php/<'classname>) throws me this error:
Fatal error: Class 'Base<'ClassName>GeneratorConfiguration' not found in .../www/proeject/apps/backend/modules/<'classname>/lib/<'classname>GeneratorConfiguration.class.php on line 12
i've searched in other projects (the jobeet tutorial, for example) and in this file there are no classes defined.
Edit:
I think the error is because symfony can't find the class Base<ClassName>GeneratorConfiguration
, parent class of <ClassName>GeneratorConfiguration
. So i think the problem is that i have not located this class properly in the project. Do you know if i must apply some plugin or call some task from commandline to solve this?
/Edit
Do you have any idea of what is happening? Maybe i've forget to declare something before generate the backend modules...
已修复:这是因为我正在使用远程编辑在不同的计算机上测试项目。因此,当我生成管理模块时,创建了一些缓存文件,例如
BaseGeneratorConfiguration
,但是我使用的远程同步器,因为本地缓存文件夹没有这些生成的文件,因此将它们删除远程文件夹。FIx'd: This was because i'm using a remote editing to test the project on a different machine. So when i generated the admin module, some caché files were created, such as
Base<ClassName>GeneratorConfiguration
, but the remote syncoronizer i use, as the local caché folder had no those generated files, erased them from the remote folder.