Re: [PEAR] HTML_Quickform and php7

[email protected] (Alexey Borzov) Thu, 31 Dec 2015 12:36:10 +0300
Newsgroups php.pear.general
Message-ID <[email protected]>
Hi Mads,

On 31.12.2015 0:12, Mads Lie Jensen wrote:
> I want to upgrade my server to php7, but I have a lot of code that uses the old
> and deprecated HTML_QuickForm.

I see a bit of a contradiction here.

> Quickform uses the '=& new' pattern in some places. This is not compatible with
> php7.

Not compatible as in "Doesn't run" or as in "Runs, but emits notices"?

In the latter case the safest bet would be "Suppress notices".

> What would be the suggested way to proceed?
> I wouldn't mind to fix the package and have it released on PEAR, but the package
> is said to be compatible with php 4.3 and forward. So I am not sure that it will
> work if this pattern is just replaced with '= new'?
>
> Or should I make my modifications to my own private branch of this?

If you want to support HTML_QuickForm afterwards then definitely go for an 
official release and become a maintainer. As for whether it will work on PHP 4 
after your changes --- difficult to say, HTML_QuickForm doesn't have a test 
suite to check this (and that's why I never wanted to do the changes myself and 
support them later).

You may, though, just up the PHP requirement as Christian suggested, getting rid 
of other PHP4 artifacts in the process.