On 19/11/14 12:00, Jakub Zelenka wrote:
> Hi,
> 
> BTW: if all extension maintainers use the same naming convention ('phpng
>> branch') it would make things somewhat easier.
>>
> 
> I don't think that all maintainers will need two branches for that. At
> least I don't want to have two branches and maintain the extension twice
> :). For that reason I started working on the compatibility header that will
> allow me to use the same code for 7 and 5. It's still very basic but it
> already works with long, string and hash + some zval operations (accessors
> mainly). You can see it on https://github.com/bukka/phpc/blob/master/phpc.h
> . You can also see some examples on
> https://github.com/bukka/php-extest/blob/master/extest_compat.c . As I said
> it's just a start and there are still lots of issues and things that need
> to be done but I believe that it's doable.
> 
> Of course it's not for everyone as some people won't like such macro
> wrapper and some extension might be too complex for that. However there
> will be extension that will be compilable for both versions so such
> convention doesn't sound too good to me.

I don't think this is a viable option. PHP/Zend internals dialect is
complicated enough even without another (compat) layer. Changes in PHP7
are just to many to make the code still look sane with all the #ifdefs,
and often enough, it's not only #ifdef'ing 1-3 lines but four out of
five code blocks.

The two extensions I converted were tiny, but it already looked like too
much of a hassle to me to keep it compatible with pre-PHP7.

-- 
Regards,
Mike

-- 
PECL development discussion Mailing List (http://pecl.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to