Re: [PEAR] HTML_Quickform and php7
[email protected] (Mads Lie Jensen) Thu, 31 Dec 2015 10:55:33 +0100
| Newsgroups | php.pear.general |
|---|---|
| Message-ID | <[email protected]> |
Hi > 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. Yes, I agree. I have "always" used the most recent version of php on my server, but have also for many years been using Pear. It has always worked ok, but now some of the packages I use, were originally written for php 4, like HTML_QuickForm, and running them on php7 does not work. >> 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"? Doesn't run. The Assign new by reference ($obj =& new StdClass) is not allowed in php7) >> 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. I will do as Christian suggest. First probably just make it run. I just wasn't sure if it was allowed to increase the required php version for a Pear-package, without making a new major release of it? -- Mads Lie Jensen http://www.gartneriet.dk/