Development

#3296 (sfGuardPlugin README errors in fixture.yml)

You must first sign up to be able to contribute.

Ticket #3296 (closed documentation: invalid)

Opened 3 months ago

Last modified 1 month ago

sfGuardPlugin README errors in fixture.yml

Reported by: n7lyg Assigned to: fabien
Priority: minor Milestone:
Component: sfGuardPlugin Version: 1.1.0 BETA2
Keywords: Cc:
Qualification: Unreviewed

Description

sfGuardPlugin README states

  • Load default fixtures (optional - it creates a superadmin user)

mkdir data/fixtures/ cp plugins/sfGuardPlugin/data/fixtures/fixtures.yml.sample data/fixtures/sfGuard.yml

symfony propel:data-load frontend # replace frontend with the name of one of your application

If you install the sfGuardPlugin using the plugin:install function, there is no file named plugins/sfGuardPlugin/data/fixtures/fixtures.yml.sample. Instead, there is a file named plugins/sfGuardPlugin/data/fixtures/fixtures.yml. Using the normal propel:data-load function, it will find all files named fixtures.yml in either the standard data/fixtures directory or in all plugins/*/data/fixtures directories it can find. Therefore, there is no reasson to copy anything. Leaving the fixtures.yml file in place works just fine.

The only reason to copy things around is if you have your own fixtures.yml file includes some setting of sfGuardUserProfile that relies on sfGuardUser values. In that case, you want to remove the fixtures.yml file from the sfGuardPlugin directory and insert the contents at the beginning of your own fixtures.yml file. This is a lot more complex than copying or moving files.

More explanation needs to go in here about how fixtures get inserted. Right now, it does the data/fixtures insertion BEFORE the plugins/*/data/fixtures insertion. For sfGuardPlugin, you want the inseretion to come BEFORE the user-specified insertion, but there does not seem to be any way to accomplish this.

The instructions in this section clearly show that the person who wrote this did not understand how fixtures work. They clearly did not understand that all fixtures.yml files found in the various data/fixtures files all get treated exactly the same. There is no reason to copy fixtures.yml files around unless you have specific requirements for loading your own sfGuardUserProfile records based on the sfGuardUser entries.

Change History

04/16/08 00:17:51 changed by Carl.Vondrick

  • component changed from other to sfGuardPlugin.

05/26/08 21:17:15 changed by fabien

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