Alexey Zakhlestin's Blog

Programming for Mac and Web

Syck 0.9.2

Permalink

I’ve just released syck for php 0.9.2 (a parser and emitter of YAML documents. If you don’t know anything about YAML and why it is good: check my previous posts on the subject). A lot of new and tasty features ;)

First, and most important: a lot of stability and consistency fixes (previous release wasn’t properly dealing with some kinds of number-like strings and with mixed-keys arrays). This release is HIGHLY recommended to anyone who uses syck-php in production. I was using this version for several weeks as a server-to-server exchange format under heavy load and coudn’t be satisfied more.

I started to dive into object-serialization and unserialization topics. Any object which implements Serializable interface can be dumped into yaml-document now. It will be stored using !php/object::ClassName signature. And, of course, you would be able load the object afterwards. Important: at the moment of loading yaml-file, all of the classes mentioned in it have to be either declared, or be available to php’s autoload mechanism.

I also implemented loading of objects with !php/array::ClassName and !php/hash::ClassName signatures. These have to implement ArrayAccess interface. Unfortunately, I didn’t implement dumping of such objects yet. That is planned for the next releae.

As always, I am open to hear any of your comments and bug-reports.

Comments