[pLog-general] On php5...

Oscar Renalias oscar at renalias.net
Sun Nov 7 17:05:29 GMT 2004


Hello,

I have decided to start the php5 thread based on Su's first few 
comments... Hope Su doesn't mind :-)

> 1 Will only work under php5, because I use some php5 concepts such as
> abstract, static, final, private... and etc.

As I said, we shoulnd't release anything which can only be run in php5 
for a while but that doesn't mean that we shouldn't work on it. A php5/ 
branch in svn sounds like the best idea to me. Would you like to take 
care of it?

> 2 Rename class name according to its real class name, borrowed from
> java. Such as, action.class.php -> Action.class. I rename the class 
> name
> because:
> a) Borrowed from Java:-)
> b) I want to use phpunit2, and this is a must change.

you mean, you transformed the class names to upper case?

Also, are you writing unit tests? If so, that sounds very good and it's 
about time somebody did it!

> 3 Add module support, and move admin class,view and etc to
> modules/admin,sumamry action,view and etc to modules/summary,other
> module can be added too. More generally, I think only plog core classes
> should be putted into class directory, others should be treated as
> modules or plugins.

I don't quite agree with this but I think we could discuss about it...

> 4 And, I give up log4php,but using PEAR::Log, because I just can not
> make log4php work under php5:-(, but PEAR::Log works fine.

There are several classes borrowed from PEAR in the code but I have 
never been very fond of PEAR as a framework itself. First of all, 
because plog is already based on its own framework so we already have 
our own Object, Execption, etc classes, there is no need to carry the 
burden of additional PEAR, PEAR_Error, etc classes. If you take a look 
at things like class/data/Date.php, or class/xml/parser/Parser.php, 
you'll see that I spent some time removing all references to PEAR in 
them...

Also, another negative opinion about PEAR: 
http://www.sitepoint.com/blog-post-view.php?id=172065

What was the reason for log4php not to work in php5? I understood that 
the last version was supposed to work fine... I liked the package very 
much and I don't think we should get rid of it just like that! 
Specially after you recommended it so strongly!!!

Would you care to reconsider your decision?

> I'd like to open another thread to discuss porting plog to php5, anyone
> interested in it?

We can consider this first message as the start :-)

Oscar




More information about the pLog-general mailing list