fredwu / kohana-phamlp

This module is a bridge between the Kohana PHP framework (http://kohanaframework.org/) and the PHamlP library (http://code.google.com/p/phamlp/).
http://fredwu.me/
25 stars 3 forks source link

kohana 3.1.2 #4

Closed ghost closed 13 years ago

d4rky-pl commented 13 years ago

Testing branch have this incorporated, but I don't have time to finish testing it ;)

d4rky-pl commented 13 years ago

I'd be glad if you'll test the current version of code and tell me if everything works correctly on Ko 3.1

d4rky-pl commented 13 years ago

better than I hoped, thanks :)

codeho commented 13 years ago

yo, this is me. figured i better not use my company account ;)

so, tested the haml part which works fine. had some trouble with the phamlp d4rky submodule with git, but removed the submodule linking because i know when i wanna go and update some code from other people and then i do it manually... i don't like surprises :)

other than that, cool. quite some extra hacking and overloading in there, maybe there's a better way to support the extension stuff?

haven't tested Sass yet. is this already working as well?

did you make any progress on the haml syntax? i remember it being different than the original syntax.

thanks :) t

codeho commented 13 years ago

there also seems to be an issue within HamlParser::hasChild() If the last line in a haml file has spaces in it but is otherwise empty, it explodes because the $this->source index gets out of sync with the level. :)

d4rky-pl commented 13 years ago

hey :)

submodule - what was exactly the problem? if I recall correctly, submodules aren't exactly updating by themselves (you have to use git submodule update), but I'm not a git master, so I might got that one wrong

about extension stuff, your question gave me an idea - considering that cache directory is always in application (it's forced in compile_haml method), I could just bypass the set_filename function and return the name statically (return APPPATH.'cache/'.self::$config['haml']['cache_dir'].'/'.$file.$ext or similar). I'll have to play around with that concept for a bit, I'll push it into testing if it works correctly.

when it comes to Sass, it's just an experimental feature. I'm not sure if it works, because I haven't had chance to use Sass in any recent projects. you're free to test it by yourself.

and the last one - Haml parser. MarcWeber has created a commercial alternative called HAML-to-PHP and I was supposed to work with him on that but we had a major disagreement, mostly about the way code was written, naming conventions and documentation (he believes in self-explanatory code, I believe in docs-oriented coding) so that just didn't work. I don't know if he is still working on the project or will it be succesful, you can buy and try ;)

I won't be fixing phamlp more than just by hacking it a little bit. It's too fscked up, even on the basic level and I don't feel confident in my abilities enough to write a better parser. If Marc releases his code on github, I'll probably scrap the kohana-phamlp and write a proper kohana-haml module, but that doesn't seem to happen any time soon ;)

d4rky-pl commented 13 years ago

As it was resolved a long time ago, I'm closing the issue. By the way, codeho - this module is back until HamlPHP solves it's problems.