Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 650926 - www-apps/davical-1.1.7 - Critical PHP removed functionality found in code
Summary: www-apps/davical-1.1.7 - Critical PHP removed functionality found in code
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Deadline: 2018-12-31
Assignee: Till Schäfer
URL: https://gitlab.com/davical-project/da...
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks: PHP-7-compat
  Show dependency tree
 
Reported: 2018-03-19 18:34 UTC by Brian Evans (RETIRED)
Modified: 2018-12-06 01:07 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Brian Evans (RETIRED) gentoo-dev 2018-03-19 18:34:08 UTC
The following items will cause this application to likely break once PHP 5.6 is removed at the end of 2018/early 2019 due to End-of-Life (older versions have the same or more problems):


File: work/davical-1.1.7/inc/caldav-client.php
> Line 51: [Error] PHP 4 constructors are now deprecated
    function CalDAVClient($base_url, $user, $pass, $calendar = '')
    {
    }


File: work/davical-1.1.7/inc/PublicSession.php
> Line 62: [Error] PHP 4 constructors are now deprecated
    function PublicSession()
    {
    }


File: work/davical-1.1.7/inc/HTTPAuthSession.php
> Line 63: [Error] PHP 4 constructors are now deprecated
    function HTTPAuthSession()
    {
    }
Comment 1 Till Schäfer 2018-03-19 21:31:05 UTC
The first one (caldav-client.php) does not seem to have any effect, since it seems to be dead code that is not required anymore (will create a pull request for removal upstream).

I will have a look at the other cases in the next days, since the constructors seem to be non empty and are not matched by a __construct(). Thus they are no fallback versions of a constructor.

I am wondering if they are actually unused or the values get set after initialization since I am running davical 1.1.7 with PHP 7.1 since a while and have not noticed any breakage, but at least there are other files referencing them. Anyway, that should be fixed in one or the other way.

How did you stumble over this problem? Maybe I should include the step in my testing.
Comment 2 Brian Evans (RETIRED) gentoo-dev 2018-03-19 22:21:00 UTC
(In reply to Till Schäfer from comment #1)
> The first one (caldav-client.php) does not seem to have any effect, since it
> seems to be dead code that is not required anymore (will create a pull
> request for removal upstream).
> 
> I will have a look at the other cases in the next days, since the
> constructors seem to be non empty and are not matched by a __construct().
> Thus they are no fallback versions of a constructor.
> 
> I am wondering if they are actually unused or the values get set after
> initialization since I am running davical 1.1.7 with PHP 7.1 since a while
> and have not noticed any breakage, but at least there are other files
> referencing them. Anyway, that should be fixed in one or the other way.
> 
> How did you stumble over this problem? Maybe I should include the step in my
> testing.


I did not do any runtime testing.  Just a cursory overview using the https://github.com/sstalle/php7cc/releases tool to help me look at certain files.
Comment 3 Brian Evans (RETIRED) gentoo-dev 2018-03-19 22:22:05 UTC
FWIW, this will not cause an error directly, but the constructor will be assumed to be empty.  Therefore runtime results may vary between versions.
Comment 4 Till Schäfer 2018-03-21 17:25:30 UTC
Created upstream bug report and merge request to use __construct. I will wait for the upstream response for a while and decide if I will create a patched revision based on the feedback.

https://gitlab.com/davical-project/davical/issues/142
Comment 5 Larry the Git Cow gentoo-dev 2018-12-06 01:07:35 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=71c1797a48ef1d612091642a18e6b9cafe60346f

commit 71c1797a48ef1d612091642a18e6b9cafe60346f
Author:     Till Schäfer <till2.schaefer@uni-dortmund.de>
AuthorDate: 2018-11-28 17:40:06 +0000
Commit:     Virgil Dupras <vdupras@gentoo.org>
CommitDate: 2018-12-06 01:06:02 +0000

    www-apps/davical: fix php4 style constructors
    
    Closes: https://bugs.gentoo.org/650926
    Package-Manager: Portage-2.3.51, Repoman-2.3.11
    Signed-off-by: Till Schäfer <till2.schaefer@uni-dortmund.de>
    Closes: https://github.com/gentoo/gentoo/pull/10513
    Signed-off-by: Virgil Dupras <vdupras@gentoo.org>

 www-apps/davical/davical-1.1.7-r1.ebuild           | 61 ++++++++++++++++++++++
 ...davical-1.1.7-fix_php4_style_constructors.patch | 39 ++++++++++++++
 2 files changed, 100 insertions(+)