PHP 5.3 support

0 views
Skip to first unread message

Palleas

unread,
Aug 24, 2010, 3:49:16 PM8/24/10
to habari-users
Hi,

I've been using Habari for a couple of weeks for my blog but I just
started to take a lot at the API to create my very first plugin. It's
a very simple one, I just want to add into my sidebar a list of posts
coming from the website Kontain.com. My plugin class starts like
this : http://cl.ly/26Ft and I'm having an issue with the namespaces
of the library I'm working on to fetch my posts.

This seems to come from the eval used to test plugins integrity and it
seems really "dirty" to me.
Are there any plans for supporting true php 5.3 plugins? I don't want
to downgrade all my code...

Do we really need this plugin integrity checking?

Cheers !

Romain

Colin

unread,
Sep 5, 2010, 11:44:04 AM9/5/10
to habari...@googlegroups.com
Hi Romain

First off, I've not actually used namespaces yet, so everything I'm about to state is based purely on what I've read about them coupled with my Habari knowledge.

I've had a look into this and I don't think this is specifically an issue with Habari not supporting PHP 5.3 plugins - it's more to do with the way eval() handles namespaces.

Yes, Habari does eval() plugin's code to verify it's integrity.  My understanding is this is done to try and prevent a single plugin from pulling down a whole Habari installation (with it's multisite functionality this could affect a lot of sites) due to something silly like a missing comma or other typo. This isn't really a problem when installing and enabling a single plugin, but it becomes a nightmare to troubleshoot if you have a large list of plugins and/or sites running off the same instance.

I'm interested to know more about how the plugin validation is causing problems with your plugin.  Could you please provide more examples of the errors or problems you are seeing.  A simple test case that illustrates the problem would be really useful too.

Cheers,
Colin




--
To post to this group, send email to habari...@googlegroups.com
To unsubscribe from this group, send email to habari-users...@googlegroups.com
For more options, visit this group at http://groups.google.com/group/habari-users



--
Colin Seymour
Blog: http://colinseymour.co.uk
Tech Stuff: http://lildude.co.uk
Barefoot Running: http://barefootrunner.co.uk
IRC: lildude #habari

Palleas

unread,
Sep 16, 2010, 4:27:06 AM9/16/10
to habari-users
Hi, and sorry for the late answer.
Actually it's very simple. My plugin uses a lib w/ namespaces and the
keyword "use", which must be in top of a PHP file. In the current
implementation of Habari, some of my "use" in the eval are not. I
don't know if that's clear...
> > this :http://cl.ly/26Ftand I'm having an issue with the namespaces
Reply all
Reply to author
Forward
0 new messages