Development

#9727 (sfToolkit::arrayDeepMerge not keeping element order)

You must first sign up to be able to contribute.

Ticket #9727 (new defect)

Opened 2 years ago

sfToolkit::arrayDeepMerge not keeping element order

Reported by: antitoxic Assigned to: fabien
Priority: minor Milestone:
Component: other Version: 1.4.10
Keywords: Cc:
Qualification: Unreviewed

Description

While looking into generator.yml inheritance I noticed an annoying bug. If you have the following generator.yml in a plugin:

form:
  display:
    "first fieldset name": []
    "second fieldset name": []
    "third fieldset name": []

and then another in module within apps directory

form:
  display:
    "first fieldset name": []
    "new custom fieldset": []
    "second fieldset name": []
    "third fieldset name": []

the "new custom fieldset" will always appear last in the admin edit/new page.

It is because when sfToolkit::arrayDeepMerge is called it doesn't keep the order of the elements.

I think this problem applies to all YAML files that can have inheritance.