Page MenuHomePhabricator

Replace abandoned phpstats package in Fundraising Operations Center
Closed, ResolvedPublic3 Estimated Story Points

Description

In the Fundraising Operations Center we're using the "phpstats" library to calculate the p-value. phpstats has been abandoned and pulled from github and packagist. As a workaround, we're using a local copy.

Acceptance Criteria

  • The phpstats library is replaced by markrogoyski/math-php).
  • The content of the folder /lib is removed from the repository.

Possible Solution

  • The calculation of the p value in ProbabilityCalculator::calculateProbability() should be done by something like this:
1 - ( new Continuous\ChiSquared( 1 ) )->cdf( $chi )

Notes

  • The library is only used by ProbabilityCalculator.
  • The phpstats package has been abandoned since 2015, so it's unlikely that the math itself is broken. But it could contain unknown security issues, so we should replace the library with a maintained one.

Event Timeline

kai.nissen set the point value for this task to 3.Jun 29 2020, 10:22 AM