For a CMS i have a little Script that writes the routing.yml by reading out a pages Table of the CMS.
The Problem: if the final URL is longer than 40 characters, the sfYaml::dump() method creates an entry with ">" in the beginning, because sfYaml thinks it could be a long Text... Thats OK. But using Syck and reading this routing.yml every URL wich was writen with such a ">" gets an Space-Character in the end. So the genurl() - method generates something like "http://my.domain.com/morethan40characters/index .html". Of course this URL can not be found.
After searching a some houres i found a simple solution. I overwrote the dump() Method form sfYaml-Class (sfYaml.class.php).
I added the parameters $indent and $wordwrap which are defined in Spyc::dump(). [public static function dump($array, $indent = false, $wordwrap = false) ] and gave them also to the dump()-Method of the class "Spyc" [ return $spyc->dump($array, $indent, $wordwrap); ]
Now I can use the sfYaml::dump() as follows and everything is fine :-)
sfYaml::dump($myArray,false,0)
With $wordwrap=0 no String is wraped and my Script is running perfectly also with Syck.
Would be nice to see this Change in the next Update.
Thx for reading...