Development

#5137 ([PATCH] Admin Generator : Bad configuration file)

You must first sign up to be able to contribute.

Ticket #5137 (closed defect: fixed)

Opened 7 months ago

Last modified 7 months ago

[PATCH] Admin Generator : Bad configuration file

Reported by: Vincent Bouzeran Assigned to: fabien
Priority: major Milestone: 1.2.1
Component: generator Version: 1.2.0
Keywords: Cc: gijs@digitalbase.eu
Qualification: Ready for core team

Description

Ok, let's have a look at : sfModelGenerator on line 394:

    $moduleDirs = array_keys($config->getControllerDirs($this->getModuleName()));
    if (is_file($moduleDirs[0].'/../lib/configuration.php'))
    {
      require_once $moduleDirs[0].'/../lib/configuration.php';
      $class = $this->getModuleName().'GeneratorConfiguration';
    }
    else
    {
      $class = 'Base'.ucfirst($this->getModuleName()).'GeneratorConfiguration';
    }

As we can see, the generator is looking for a file "configuration.php". If it doesn't exist, it'll load : "Base<Module>GeneratorConfiguration?".

But the generated configurations files are : "<Module>GeneratorConfiguration?.class.php"

So, we have to rename our auto generated configuration class into configuration.php or it doesn't work.

Change History

12/02/08 13:08:06 changed by FabianLange

  • milestone set to 1.2.1.

12/02/08 13:52:16 changed by DigitalBase

12/02/08 13:53:08 changed by DigitalBase

  • cc set to gijs@digitalbase.eu.

12/02/08 15:27:01 changed by DigitalBase

  • qualification changed from Unreviewed to Ready for core team.
  • summary changed from Admin Generator : Bad configuration file to [PATCH] Admin Generator : Bad configuration file.

patch supplied in #5140

12/11/08 15:15:32 changed by fabien

  • status changed from new to closed.
  • resolution set to fixed.

(In [13947]) [1.2] fixed admin generator configuration file loading (closes #5137, #5140)

The Sensio Labs Network

Since 1998, Sensio Labs has been promoting the Open-Source software movement by providing quality web application development, training, consulting, and supporting several large Open-Source projects.