YAML tutorials on the web 

Learn YAML in Five Minutes http://yaml.kwiki.org/?YamlInFiveMinutes

YAML is extremely simple to learn. YAML was designed to suit the agile language (such as Ruby, Python, Perl or PHP) well and borrows a few basic ideas from them.

Yaml Cookbook for Ruby — This version of the Yaml Cookbook focuses on the Ruby implementation of Yaml by comparing Yaml documents with their Ruby counterparts.

documented on: 2008-05-15

YAML format 

http://groups.google.com/group/symfony-devs/browse_thread/thread/debdacb2f6f9098c/05d21e961c351eb6#05d21e961c351eb6

I advice symfony developers to update the documentation and stress the usage of quotes in YAML files, because this is often the source of problems, if (for example) brackets are used in the text (string data types).

data_1: some text here works well
data_2: and (for example) this one fails due to usage of brackets
data_3: this will strip # this part, because it is commented out
data_4: "this still works again # ()()() # because it is enquoted in
double quotes"

I ended up with all strings enquoted in double quotes in my YAML files and for now on I strictly follow this rule.

Andrejs Verza

load fixtures unstable? 

http://trac.symfony-project.org/trac/ticket/2088

Hi,

I have the following table,

building:
  id:
  abbreviation: { type: varchar(5), required: true }
  name: varchar(63)
  order_no: integer
  note: longvarchar

And here is the fixtures file, and how I loaded it:

$ cat data/fixtures/fixtures.01.building.yml
Building:
  1
    abbreviation: A
    name: Alberta
    order_no: 10
  7
    abbreviation: N
    name: Newfoundland
    order_no: 70
  9
    abbreviation: ON
    name: Ontario
    order_no: 90
  10
    abbreviation: T
    name: Terraces
    order_no: 100
  12
    abbreviation: SK
    name: Saskatchewan
    order_no: 120
$ symfony propel-load-data management data/fixtures/fixtures.01.building.yml
>> propel    load data from "data/fixtures/fixtures.01.building.yml"

Everything looks to me pretty fine, but the result is not:

Id     Abbreviation     Name    Order no        Note
16     A       Alberta         10
17             Newfoundland    70
18     1       Ontario         90
19     T       Terraces        100
20     SK      Saskatchewan    120
$ symfony -V
symfony version 1.0.0

As you can see, "abbreviation: N" show up as nothing, whereas "abbreviation: ON" show up as "1".

Why is that?

load fixtures unstable? 

This is expected behavior. The values 'true', 'on', '+', 'yes', 'y', 'false', 'off', '-', 'no', 'n' are special in YAML files and are treated as boolean true/false.

To have them interpreted as strings enclose them in single or double quotes.

documented on: 08/13/2007, l2k

Using %% in confirmation alerts in admin generator 

The docs say:

In the string values of `generator.yml`, the value of a field can be accessed via the name of the field surrounded by `%%`.

This works great in titles but doesn't seem to work much of anywhere else. For example, I'd like my delete confirmation alerts to say "Are you sure you want to delete joeuser@domain.com?" instead of just "Are you sure?" My config includes this:

object_actions:
  delete:
    name: Delete User %%email%%
    action: delete
    icon: /images/icons/delete.png
    params: confirm=Are you sure you want to delete user %%email%%?

However, it renders both the button help text and the alert box text as the literal string "%%email%%" instead of the user's actual email address. Is this an oversight? Did I misunderstand what "string values" means, or am I out of luck?

Using %% in confirmation alerts in admin generator 

> have you tried %%=email%% ?

No difference, still shows the literal string '%%=email%%'

documented on: 02 August 2007, Yoglets